diff options
author | Moonchild <moonchild@palemoon.org> | 2019-12-28 10:14:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-28 10:14:29 +0000 |
commit | 357405f6356e28e5fa94cecc078b65c20433d236 (patch) | |
tree | 9716965ca2d9d03446fc9290d37e5ef42f80558e /testing/web-platform/tests/html/browsers | |
parent | f60bbaf9e49733e61aaec675276fcd898ef6bc73 (diff) | |
parent | 8b88623463bf30ae7e5fcc64ef7d8d5fb62354c9 (diff) | |
download | UXP-357405f6356e28e5fa94cecc078b65c20433d236.tar UXP-357405f6356e28e5fa94cecc078b65c20433d236.tar.gz UXP-357405f6356e28e5fa94cecc078b65c20433d236.tar.lz UXP-357405f6356e28e5fa94cecc078b65c20433d236.tar.xz UXP-357405f6356e28e5fa94cecc078b65c20433d236.zip |
Merge pull request #1335 from MoonchildProductions/document_open
Align document.open() with the overhauled specification
Diffstat (limited to 'testing/web-platform/tests/html/browsers')
4 files changed, 12 insertions, 11 deletions
diff --git a/testing/web-platform/tests/html/browsers/history/the-history-interface/traverse_the_history_write_after_load_1-1.html b/testing/web-platform/tests/html/browsers/history/the-history-interface/traverse_the_history_write_after_load_1-1.html index af0118a01..945c8d81f 100644 --- a/testing/web-platform/tests/html/browsers/history/the-history-interface/traverse_the_history_write_after_load_1-1.html +++ b/testing/web-platform/tests/html/browsers/history/the-history-interface/traverse_the_history_write_after_load_1-1.html @@ -5,11 +5,8 @@ opener.pages.push(2); onload = function() { setTimeout(function() { - document.write("<!doctype html>3<script>opener.pages.push(3); if(!opener.started) {opener.started = true; history.go(-1);} opener.start_test_wait();<\/script>"); + document.write("<!doctype html>3<script>opener.pages.push(3); if(!opener.started) {opener.started = true; history.go(-1);}<\/script>"); document.close(); - if (opener.started) { - opener.start_test_wait(); - } }, 100); } </script> diff --git a/testing/web-platform/tests/html/browsers/history/the-history-interface/traverse_the_history_write_after_load_1.html b/testing/web-platform/tests/html/browsers/history/the-history-interface/traverse_the_history_write_after_load_1.html index c2c31e76f..404d61d0c 100644 --- a/testing/web-platform/tests/html/browsers/history/the-history-interface/traverse_the_history_write_after_load_1.html +++ b/testing/web-platform/tests/html/browsers/history/the-history-interface/traverse_the_history_write_after_load_1.html @@ -11,12 +11,11 @@ function() { check_result = t.step_func( function() { - if (pages.length < 4) { + if (pages.length < 3) { setTimeout(check_result, 500); return } - //The pass condition here is based on the idea that the spec is wrong and browsers are right - assert_array_equals(pages, [2, 3, 2, 3], "Pages opened during history navigation"); + assert_array_equals(pages, [2, 3, 1], "Pages opened during history navigation"); t.done(); } ) diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/reload_document_open_write-1.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/reload_document_open_write-1.html index 1c5a1db8f..e1a2e811c 100644 --- a/testing/web-platform/tests/html/browsers/history/the-location-interface/reload_document_open_write-1.html +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/reload_document_open_write-1.html @@ -3,11 +3,16 @@ <script> function f() { opener.postMessage("original", "*"); + if (opener.data.length >= 2) { + // If we proceed here, then our document.write will be racing with the + // setTimeout in our opener. Just stop. + return; + } setTimeout(function () { document.open(); document.write("<!doctype html>2<script>opener.postMessage('written', '*');<\/script>"); document.close(); - }), 100; + }); } window.onload = f diff --git a/testing/web-platform/tests/html/browsers/history/the-location-interface/reload_document_open_write.html b/testing/web-platform/tests/html/browsers/history/the-location-interface/reload_document_open_write.html index 0fc2a2c3d..905ef8874 100644 --- a/testing/web-platform/tests/html/browsers/history/the-location-interface/reload_document_open_write.html +++ b/testing/web-platform/tests/html/browsers/history/the-location-interface/reload_document_open_write.html @@ -11,11 +11,11 @@ var data = []; window.onmessage = t.step_func(function(e) { data.push(e.data); - if (data.length < 3) { + if (data.length == 2) { win.location.reload(); - } else { + } else if (data.length >= 3) { setTimeout(t.step_func(function() { - assert_array_equals(data, ["original", "written", "written"]); + assert_array_equals(data, ["original", "written", "original"]); t.done(); }), 500); } |