Methods Summary |
---|
public void | midletAdded(MIDletProxy midlet)Called when a MIDlet is added to the list.
if (TEST_MIDLET.equals(midlet.getClassName())) {
testMidlet = midlet;
return;
}
|
public void | midletRemoved(MIDletProxy midlet)Called when a MIDlet is removed from the list.
if (midlet == testMidlet) {
synchronized (this) {
testMidletRemovedFromList = true;
notifyAll();
}
}
|
public void | midletStartError(int externalAppId, int suiteId, java.lang.String className, int errorCode, java.lang.String errorDetails)Called when error occurred while starting a MIDlet object.
|
public void | midletUpdated(MIDletProxy midlet, int fieldId)Called when the state of a MIDlet in the list is updated.
|
public void | runTests()Run all tests.
declare("testMvmHandleFatalError");
testMvmHandleFatalError();
proxyList.removeListener(this);
|
void | testMvmHandleFatalError()Launch the test MIDlet and it it ends by the end of the time out period
than consider the test passed.
boolean assertion;
proxyList = MIDletProxyList.getMIDletProxyList();
proxyList.addListener(this);
if (MIDletSuiteUtils.execute(MIDletSuite.INTERNAL_SUITE_ID,
TEST_MIDLET, "no name")) {
// This is SVM mode, so cancel the execute and end the test.
MIDletSuiteUtils.execute(MIDletSuite.INTERNAL_SUITE_ID,
null, null);
return;
}
synchronized (this) {
try {
wait(TIMEOUT_PERIOD);
} catch (InterruptedException ie) {
}
}
assertion = testMidlet != null;
assertTrue(TEST_MIDLET + " not started", assertion);
if (!assertion) {
return;
}
if (!testMidletRemovedFromList) {
fail(TEST_MIDLET + " not removed from list of running MIDlets");
testMidlet.destroyMidlet();
return;
}
|