diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 8a3370fbd5b..d580440b939 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -8,6 +8,15 @@ + + XMLHttpRequest-abort() sets the state to 0. + + + core-js: Various fixes for undefined. + + + core-js: Support ES2019 JSON superset. + core-js: globalThis implemented. diff --git a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java index 67876566c72..b7c66ec85e7 100644 --- a/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java +++ b/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequest.java @@ -180,7 +180,8 @@ public XMLHttpRequest(final boolean caseSensitiveProperties) { * @param state the new state */ private void setState(final int state) { - if (state == OPENED + if (state == UNSENT + || state == OPENED || state == HEADERS_RECEIVED || state == LOADING || state == DONE) { @@ -375,6 +376,8 @@ public void abort() { fireJavascriptEvent(Event.TYPE_READY_STATE_CHANGE); fireJavascriptEvent(Event.TYPE_ABORT); fireJavascriptEvent(Event.TYPE_LOAD_END); + + setState(UNSENT); aborted_ = true; } diff --git a/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequestLifeCycleTest.java b/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequestLifeCycleTest.java index ba9722281b4..3a079c4092e 100644 --- a/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequestLifeCycleTest.java +++ b/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLHttpRequestLifeCycleTest.java @@ -292,9 +292,9 @@ public void prepareTestingServlets() { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_200_true", "load_4_200_false", - "loadend_4_200_false", "send-done"}) + "loadend_4_200_false", "send-done: 4_200"}) public void addEventListener_sync() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.SYNC, Execution.ONLY_SEND), URL_FIRST, servlets_); @@ -305,9 +305,9 @@ public void addEventListener_sync() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_200_true", "load_4_200_false", - "loadend_4_200_false", "send-done"}) + "loadend_4_200_false", "send-done: 4_200"}) public void addEventListener_sync_preflight() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.SYNC, Execution.ONLY_SEND_PREFLIGHT), URL_FIRST, servlets_, servlets_); @@ -318,12 +318,12 @@ public void addEventListener_sync_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void addEventListener_sync_preflight_forbidden() throws Exception { @@ -336,11 +336,11 @@ public void addEventListener_sync_preflight_forbidden() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void addEventListener_sync_without_origin() throws Exception { @@ -353,11 +353,11 @@ public void addEventListener_sync_without_origin() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void addEventListener_sync_preflight_without_origin() throws Exception { @@ -370,10 +370,10 @@ public void addEventListener_sync_preflight_without_origin() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void addEventListener_sync_networkError() throws Exception { try { @@ -394,10 +394,10 @@ public void addEventListener_sync_networkError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void addEventListener_sync_networkError_preflight() throws Exception { try { @@ -418,8 +418,8 @@ public void addEventListener_sync_networkError_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", "readystatechange_4_403_true", - "load_4_403_false", "loadend_4_403_false", "send-done"}) + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_403_true", + "load_4_403_false", "loadend_4_403_false", "send-done: 4_403"}) public void addEventListener_sync_Error403() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.SYNC, Execution.ERROR_403), URL_FIRST, servlets_); @@ -430,8 +430,8 @@ public void addEventListener_sync_Error403() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", "readystatechange_4_403_true", - "load_4_403_false", "loadend_4_403_false", "send-done"}) + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_403_true", + "load_4_403_false", "loadend_4_403_false", "send-done: 4_403"}) public void addEventListener_sync_Error403_preflight() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.SYNC, Execution.ERROR_403_PREFLIGHT), URL_FIRST, servlets_, servlets_); @@ -442,11 +442,11 @@ public void addEventListener_sync_Error403_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void addEventListener_sync_Error403_during_preflight() throws Exception { @@ -459,8 +459,8 @@ public void addEventListener_sync_Error403_during_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", "readystatechange_4_500_true", - "load_4_500_false", "loadend_4_500_false", "send-done"}) + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_500_true", + "load_4_500_false", "loadend_4_500_false", "send-done: 4_500"}) public void addEventListener_sync_Error500() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.SYNC, Execution.ERROR_500), URL_FIRST, servlets_); @@ -471,8 +471,8 @@ public void addEventListener_sync_Error500() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", "readystatechange_4_500_true", - "load_4_500_false", "loadend_4_500_false", "send-done"}) + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_500_true", + "load_4_500_false", "loadend_4_500_false", "send-done: 4_500"}) public void addEventListener_sync_Error500_preflight() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.SYNC, Execution.ERROR_500_PREFLIGHT), URL_FIRST, servlets_, servlets_); @@ -483,11 +483,11 @@ public void addEventListener_sync_Error500_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void addEventListener_sync_Error500_during_preflight() throws Exception { @@ -500,7 +500,7 @@ public void addEventListener_sync_Error500_during_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", "ExceptionThrown"}) + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}) public void addEventListener_sync_timeout() throws Exception { // that's invalid. You cannot set timeout for synced requests. Will throw an // exception only triggers readystatechange @@ -522,12 +522,12 @@ public void addEventListener_sync_timeout() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_2_200_true", "readystatechange_3_200_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_2_200_true", "readystatechange_3_200_true", "progress_3_200_false", "readystatechange_4_200_true", "load_4_200_false", "loadend_4_200_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_200_true", "readystatechange_3_200_true", "progress_3_200_false", "readystatechange_4_200_true", "load_4_200_false", "loadend_4_200_false"}) @@ -541,12 +541,12 @@ public void addEventListener_async() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_2_200_true", "readystatechange_3_200_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_2_200_true", "readystatechange_3_200_true", "progress_3_200_false", "readystatechange_4_200_true", "load_4_200_false", "loadend_4_200_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", "readystatechange_2_200_true", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_200_true", "readystatechange_3_200_true", "progress_3_200_false", "readystatechange_4_200_true", "load_4_200_false", "loadend_4_200_false"}) public void addEventListener_async_preflight() throws Exception { @@ -559,11 +559,11 @@ public void addEventListener_async_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "error_4_0_false", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void addEventListener_async_preflight_forbidden() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.ASYNC, Execution.ONLY_SEND_PREFLIGHT_FORBIDDEN), @@ -575,11 +575,11 @@ public void addEventListener_async_preflight_forbidden() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", - "loadstart_1_0_false", "send-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", + "loadstart_1_0_false", "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", "readystatechange_4_0_true", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void addEventListener_async_without_origin() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.ASYNC, Execution.WITHOUT_ORIGIN), @@ -591,11 +591,11 @@ public void addEventListener_async_without_origin() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", - "loadstart_1_0_false", "send-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", + "loadstart_1_0_false", "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", "readystatechange_4_0_true", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void addEventListener_async_preflight_without_origin() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.ASYNC, Execution.WITHOUT_ORIGIN_PREFLIGHT), @@ -607,12 +607,12 @@ public void addEventListener_async_preflight_without_origin() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "abort_4_0", "loadend_4_0_false", - "abort-done"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "readystatechange_4_0_true", "abort_4_0", - "loadend_4_0_false", "abort-done"}) + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "abort_4_0", "loadend_4_0_false", + "abort-done: 0_0"}, + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "readystatechange_4_0_true", "abort_4_0", + "loadend_4_0_false", "abort-done: 0_0"}) public void addEventListener_async_abortTriggered() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.ASYNC, Execution.SEND_ABORT), URL_FIRST, servlets_); @@ -623,11 +623,11 @@ public void addEventListener_async_abortTriggered() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "error_4_0_false", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", "readystatechange_4_0_true", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void addEventListener_async_networkErrorTriggered() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.ASYNC, Execution.NETWORK_ERROR), URL_FIRST, @@ -639,11 +639,11 @@ public void addEventListener_async_networkErrorTriggered() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "error_4_0_false", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", "readystatechange_4_0_true", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void addEventListener_async_networkErrorTriggered_preflight() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.ASYNC, Execution.NETWORK_ERROR_PREFLIGHT), URL_FIRST, @@ -656,12 +656,12 @@ public void addEventListener_async_networkErrorTriggered_preflight() throws Exce * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_2_500_true", "readystatechange_3_500_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_2_500_true", "readystatechange_3_500_true", "progress_3_500_false", "readystatechange_4_500_true", "load_4_500_false", "loadend_4_500_false"}, - IE = {"readystatechange_1_0_true", "open-done", - "readystatechange_1_0_true", "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", + "readystatechange_1_0_true", "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_500_true", "readystatechange_3_500_true", "progress_3_500_false", "readystatechange_4_500_true", "load_4_500_false", "loadend_4_500_false"}) @@ -676,12 +676,12 @@ public void addEventListener_async_Error500Triggered() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_2_500_true", "readystatechange_3_500_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_2_500_true", "readystatechange_3_500_true", "progress_3_500_false", "readystatechange_4_500_true", "load_4_500_false", "loadend_4_500_false"}, - IE = {"readystatechange_1_0_true", "open-done", - "readystatechange_1_0_true", "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", + "readystatechange_1_0_true", "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_500_true", "readystatechange_3_500_true", "progress_3_500_false", "readystatechange_4_500_true", "load_4_500_false", "loadend_4_500_false"}) @@ -696,11 +696,11 @@ public void addEventListener_async_Error500Triggered_preflight() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", "readystatechange_4_0_true", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void addEventListener_async_Error500Triggered_during_preflight() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.ASYNC, Execution.ERROR_500_DURING_PREFLIGHT), URL_FIRST, @@ -712,11 +712,11 @@ public void addEventListener_async_Error500Triggered_during_preflight() throws E * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "timeout_4_0_false", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "timeout_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", "readystatechange_2_200_true", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_200_true", "readystatechange_4_0_true", "timeout_4_0_false", "loadend_4_0_false"}) public void addEventListener_async_timeout() throws Exception { @@ -730,8 +730,8 @@ public void addEventListener_async_timeout() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", "readystatechange_4_200_true", - "load_4_200_false", "loadend_4_200_false", "send-done"}) + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_200_true", + "load_4_200_false", "loadend_4_200_false", "send-done: 4_200"}) public void onKeyWord_sync() throws Exception { // we can register ourselves for every state here since it's in sync mode and // most of them won't fire anyway. @@ -744,9 +744,9 @@ public void onKeyWord_sync() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_200_true", "load_4_200_false", - "loadend_4_200_false", "send-done"}) + "loadend_4_200_false", "send-done: 4_200"}) public void onKeyWord_sync_preflight() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.SYNC_ON_KEYWORD, Execution.ONLY_SEND_PREFLIGHT), URL_FIRST, servlets_, servlets_); @@ -757,12 +757,12 @@ public void onKeyWord_sync_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void onKeyWord_sync_preflight_forbidden() throws Exception { @@ -775,11 +775,11 @@ public void onKeyWord_sync_preflight_forbidden() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void onKeyWord_sync_without_origin() throws Exception { @@ -792,11 +792,11 @@ public void onKeyWord_sync_without_origin() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void onKeyWord_sync_preflight_without_origin() throws Exception { @@ -809,10 +809,10 @@ public void onKeyWord_sync_preflight_without_origin() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void onKeyWord_sync_networkError() throws Exception { // will throw an exception and user is supposed to handle this. @@ -836,8 +836,8 @@ public void onKeyWord_sync_networkError() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", "readystatechange_4_403_true", - "load_4_403_false", "loadend_4_403_false", "send-done"}) + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_403_true", + "load_4_403_false", "loadend_4_403_false", "send-done: 4_403"}) public void onKeyWord_sync_Error403() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.SYNC_ON_KEYWORD, Execution.ERROR_403), URL_FIRST, servlets_); @@ -848,8 +848,8 @@ public void onKeyWord_sync_Error403() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", "readystatechange_4_403_true", - "load_4_403_false", "loadend_4_403_false", "send-done"}) + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_403_true", + "load_4_403_false", "loadend_4_403_false", "send-done: 4_403"}) public void onKeyWord_sync_Error403_preflight() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.SYNC_ON_KEYWORD, Execution.ERROR_403_PREFLIGHT), URL_FIRST, @@ -861,11 +861,11 @@ public void onKeyWord_sync_Error403_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void onKeyWord_sync_Error403_during_preflight() throws Exception { @@ -879,8 +879,8 @@ public void onKeyWord_sync_Error403_during_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", "readystatechange_4_500_true", - "load_4_500_false", "loadend_4_500_false", "send-done"}) + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_500_true", + "load_4_500_false", "loadend_4_500_false", "send-done: 4_500"}) public void onKeyWord_sync_Error500() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.SYNC_ON_KEYWORD, Execution.ERROR_500), URL_FIRST, servlets_); @@ -891,8 +891,8 @@ public void onKeyWord_sync_Error500() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", "readystatechange_4_500_true", - "load_4_500_false", "loadend_4_500_false", "send-done"}) + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_500_true", + "load_4_500_false", "loadend_4_500_false", "send-done: 4_500"}) public void onKeyWord_sync_Error500_preflight() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.SYNC_ON_KEYWORD, Execution.ERROR_500_PREFLIGHT), URL_FIRST, @@ -904,11 +904,11 @@ public void onKeyWord_sync_Error500_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void onKeyWord_sync_Error500_during_preflight() throws Exception { @@ -922,7 +922,7 @@ public void onKeyWord_sync_Error500_during_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts({"readystatechange_1_0_true", "open-done", "ExceptionThrown"}) + @Alerts({"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}) public void onKeyWord_sync_timeout() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.SYNC_ON_KEYWORD, Execution.TIMEOUT), URL_FIRST, servlets_); @@ -933,12 +933,12 @@ public void onKeyWord_sync_timeout() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_2_200_true", "readystatechange_3_200_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_2_200_true", "readystatechange_3_200_true", "progress_3_200_false", "readystatechange_4_200_true", "load_4_200_false", "loadend_4_200_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_200_true", "readystatechange_3_200_true", "progress_3_200_false", "readystatechange_4_200_true", "load_4_200_false", "loadend_4_200_false"}) @@ -952,12 +952,12 @@ public void onKeyWord_async() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_2_200_true", "readystatechange_3_200_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_2_200_true", "readystatechange_3_200_true", "progress_3_200_false", "readystatechange_4_200_true", "load_4_200_false", "loadend_4_200_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", "readystatechange_2_200_true", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_200_true", "readystatechange_3_200_true", "progress_3_200_false", "readystatechange_4_200_true", "load_4_200_false", "loadend_4_200_false"}) public void onKeyWord_async_preflight() throws Exception { @@ -970,12 +970,12 @@ public void onKeyWord_async_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "abort_4_0", - "loadend_4_0_false", "abort-done"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "readystatechange_4_0_true", "abort_4_0", - "loadend_4_0_false", "abort-done"}) + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "abort_4_0", + "loadend_4_0_false", "abort-done: 0_0"}, + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "readystatechange_4_0_true", "abort_4_0", + "loadend_4_0_false", "abort-done: 0_0"}) public void onKeyWord_async_abortTriggered() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.ASYNC_ON_KEYWORD, Execution.SEND_ABORT), URL_FIRST, servlets_); @@ -986,11 +986,11 @@ public void onKeyWord_async_abortTriggered() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "error_4_0_false", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", "readystatechange_4_0_true", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void onKeyWord_async_networkErrorTriggered() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.ASYNC_ON_KEYWORD, Execution.NETWORK_ERROR), @@ -1004,12 +1004,12 @@ public void onKeyWord_async_networkErrorTriggered() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_2_403_true", "readystatechange_3_403_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_2_403_true", "readystatechange_3_403_true", "progress_3_403_false", "readystatechange_4_403_true", "load_4_403_false", "loadend_4_403_false"}, - IE = {"readystatechange_1_0_true", "open-done", - "readystatechange_1_0_true", "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", + "readystatechange_1_0_true", "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_403_true", "readystatechange_3_403_true", "progress_3_403_false", "readystatechange_4_403_true", "load_4_403_false", "loadend_4_403_false"}) @@ -1024,12 +1024,12 @@ public void onKeyWord_async_Error403Triggered() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_2_403_true", "readystatechange_3_403_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_2_403_true", "readystatechange_3_403_true", "progress_3_403_false", "readystatechange_4_403_true", "load_4_403_false", "loadend_4_403_false"}, - IE = {"readystatechange_1_0_true", "open-done", - "readystatechange_1_0_true", "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", + "readystatechange_1_0_true", "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_403_true", "readystatechange_3_403_true", "progress_3_403_false", "readystatechange_4_403_true", "load_4_403_false", "loadend_4_403_false"}) @@ -1045,11 +1045,11 @@ public void onKeyWord_async_Error403Triggered_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", "readystatechange_4_0_true", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void onKeyWord_async_Error403Triggered_during_preflight() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.ASYNC_ON_KEYWORD, @@ -1063,12 +1063,12 @@ public void onKeyWord_async_Error403Triggered_during_preflight() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_2_500_true", "readystatechange_3_500_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_2_500_true", "readystatechange_3_500_true", "progress_3_500_false", "readystatechange_4_500_true", "load_4_500_false", "loadend_4_500_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_500_true", "readystatechange_3_500_true", "progress_3_500_false", "readystatechange_4_500_true", "load_4_500_false", "loadend_4_500_false"}) @@ -1083,12 +1083,12 @@ public void onKeyWord_async_Error500Triggered() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_2_403_true", "readystatechange_3_403_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_2_403_true", "readystatechange_3_403_true", "progress_3_403_false", "readystatechange_4_403_true", "load_4_403_false", "loadend_4_403_false"}, - IE = {"readystatechange_1_0_true", "open-done", - "readystatechange_1_0_true", "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", + "readystatechange_1_0_true", "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_403_true", "readystatechange_3_403_true", "progress_3_403_false", "readystatechange_4_403_true", "load_4_403_false", "loadend_4_403_false"}) @@ -1103,12 +1103,12 @@ public void addEventListener_async_Error403Triggered() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_2_403_true", "readystatechange_3_403_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_2_403_true", "readystatechange_3_403_true", "progress_3_403_false", "readystatechange_4_403_true", "load_4_403_false", "loadend_4_403_false"}, - IE = {"readystatechange_1_0_true", "open-done", - "readystatechange_1_0_true", "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", + "readystatechange_1_0_true", "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_403_true", "readystatechange_3_403_true", "progress_3_403_false", "readystatechange_4_403_true", "load_4_403_false", "loadend_4_403_false"}) @@ -1123,11 +1123,11 @@ public void addEventListener_async_Error403Triggered_preflight() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", "readystatechange_4_0_true", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void addEventListener_async_Error403Triggered_during_preflight() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.ASYNC, Execution.ERROR_403_DURING_PREFLIGHT), URL_FIRST, @@ -1140,12 +1140,12 @@ public void addEventListener_async_Error403Triggered_during_preflight() throws E * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_2_500_true", "readystatechange_3_500_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_2_500_true", "readystatechange_3_500_true", "progress_3_500_false", "readystatechange_4_500_true", "load_4_500_false", "loadend_4_500_false"}, - IE = {"readystatechange_1_0_true", "open-done", - "readystatechange_1_0_true", "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", + "readystatechange_1_0_true", "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_500_true", "readystatechange_3_500_true", "progress_3_500_false", "readystatechange_4_500_true", "load_4_500_false", "loadend_4_500_false"}) @@ -1161,11 +1161,11 @@ public void onKeyWord_async_Error500Triggered_preflight() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", "readystatechange_4_0_true", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void onKeyWord_async_Error500Triggered_during_preflight() throws Exception { final WebDriver driver = loadPage2(buildHtml(Mode.ASYNC_ON_KEYWORD, @@ -1178,11 +1178,11 @@ public void onKeyWord_async_Error500Triggered_during_preflight() throws Exceptio * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "timeout_4_0_false", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "timeout_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", "readystatechange_2_200_true", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_2_200_true", "readystatechange_4_0_true", "timeout_4_0_false", "loadend_4_0_false"}) public void onKeyWord_async_timeout() throws Exception { @@ -1215,10 +1215,10 @@ public void after() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void addEventListener_sync_NoHttpResponseException() throws Exception { final MockWebConnection mockWebConnection = getMockWebConnection(); @@ -1249,10 +1249,10 @@ public void addEventListener_sync_NoHttpResponseException() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void addEventListener_sync_preflight_NoHttpResponseException() throws Exception { final MockWebConnection mockWebConnection = getMockWebConnection(); @@ -1298,10 +1298,10 @@ public void addEventListener_sync_preflight_NoHttpResponseException() throws Exc * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void addEventListener_sync_preflight_NoHttpResponseException_during_preflight() throws Exception { final MockWebConnection mockWebConnection = getMockWebConnection(); @@ -1340,17 +1340,17 @@ public void addEventListener_sync_preflight_NoHttpResponseException_during_prefl * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "error_4_0_false", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - FF = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "progress_1_0_false", "readystatechange_4_0_true", + FF = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "progress_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - FF78 = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "progress_1_0_false", "readystatechange_4_0_true", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "progress_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void addEventListener_async_NoHttpResponseException() throws Exception { @@ -1382,11 +1382,11 @@ public void addEventListener_async_NoHttpResponseException() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "error_4_0_false", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void addEventListener_async_preflight_NoHttpResponseException() throws Exception { @@ -1433,11 +1433,11 @@ public void addEventListener_async_preflight_NoHttpResponseException() throws Ex * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "error_4_0_false", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void addEventListener_async_preflight_NoHttpResponseException_during_preflight() throws Exception { @@ -1477,10 +1477,10 @@ public void addEventListener_async_preflight_NoHttpResponseException_during_pref * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void onKeyWord_sync_NoHttpResponseException() throws Exception { final MockWebConnection mockWebConnection = getMockWebConnection(); @@ -1511,10 +1511,10 @@ public void onKeyWord_sync_NoHttpResponseException() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void onKeyWord_sync_preflight_NoHttpResponseException() throws Exception { final MockWebConnection mockWebConnection = getMockWebConnection(); @@ -1560,10 +1560,10 @@ public void onKeyWord_sync_preflight_NoHttpResponseException() throws Exception * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "ExceptionThrown"}, - FF = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "ExceptionThrown"}, + FF = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}, - FF78 = {"readystatechange_1_0_true", "open-done", "readystatechange_4_0_true", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false", "ExceptionThrown"}) public void onKeyWord_sync_preflight_NoHttpResponseException_during_preflight() throws Exception { final MockWebConnection mockWebConnection = getMockWebConnection(); @@ -1602,17 +1602,17 @@ public void onKeyWord_sync_preflight_NoHttpResponseException_during_preflight() * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "error_4_0_false", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - FF = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "progress_1_0_false", "readystatechange_4_0_true", + FF = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "progress_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - FF78 = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "progress_1_0_false", "readystatechange_4_0_true", + FF78 = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "progress_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void onKeyWord_async_NoHttpResponseException() throws Exception { @@ -1644,11 +1644,11 @@ public void onKeyWord_async_NoHttpResponseException() throws Exception { * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "error_4_0_false", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void onKeyWord_async_preflight_NoHttpResponseException() throws Exception { @@ -1695,11 +1695,11 @@ public void onKeyWord_async_preflight_NoHttpResponseException() throws Exception * @throws Exception if the test fails */ @Test - @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done", "loadstart_1_0_false", - "send-done", "readystatechange_4_0_true", "error_4_0_false", + @Alerts(DEFAULT = {"readystatechange_1_0_true", "open-done: 1_0", "loadstart_1_0_false", + "send-done: 1_0", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}, - IE = {"readystatechange_1_0_true", "open-done", "readystatechange_1_0_true", - "send-done", "loadstart_1_0_false", + IE = {"readystatechange_1_0_true", "open-done: 1_0", "readystatechange_1_0_true", + "send-done: 1_0", "loadstart_1_0_false", "readystatechange_4_0_true", "error_4_0_false", "loadend_4_0_false"}) public void onKeyWord_async_preflight_NoHttpResponseException_during_preflight() throws Exception { @@ -1804,7 +1804,7 @@ else if (Execution.ONLY_SEND_PREFLIGHT.equals(execution) } htmlBuilder.append(" xhr.open('GET', url, ").append(mode.isAsync()).append(");\n"); - htmlBuilder.append(" logText('open-done');"); + htmlBuilder.append(" logText('open-done: ' + xhr.readyState + '_' + xhr.status);"); htmlBuilder.append(" try {\n"); @@ -1826,10 +1826,10 @@ else if (Execution.ONLY_SEND_PREFLIGHT_FORBIDDEN.equals(execution)) { } htmlBuilder.append(" xhr.send();\n"); - htmlBuilder.append(" logText('send-done');"); + htmlBuilder.append(" logText('send-done: ' + xhr.readyState + '_' + xhr.status);"); if (Execution.SEND_ABORT.equals(execution)) { htmlBuilder.append(" xhr.abort();\n"); - htmlBuilder.append(" logText('abort-done');"); + htmlBuilder.append(" logText('abort-done: ' + xhr.readyState + '_' + xhr.status);"); } htmlBuilder.append(" } catch (e) { logText('ExceptionThrown'); }\n"); htmlBuilder.append(" }\n");