testUtilities.rhinoCallExpectingExceptionInContext("SYNTAX_ERR", "testNonHttp");
testUtilities.rhinoCallExpectingExceptionInContext("INVALID_STATE_ERR", "testSendNotOpenError");
testUtilities.rhinoCallInContext("testStateNotificationSync");
Notifier notifier = testUtilities.rhinoCallConvert("testAsyncHttpFetch1", Notifier.class);
testUtilities.rhinoCallInContext("testAsyncHttpFetch2");
boolean notified = notifier.waitForJavascript(100);
assertTrue(notified);
assertEquals("HEADERS_RECEIVED", Boolean.TRUE,
testUtilities.rhinoEvaluateConvert("asyncGotHeadersReceived", Boolean.class));
assertEquals("LOADING", Boolean.TRUE,
testUtilities.rhinoEvaluateConvert("asyncGotLoading", Boolean.class));