Skip to content

Commit

Permalink
Fix document.write tests to not assume globals exist after document.open
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraham committed Nov 7, 2018
1 parent a5a6825 commit 8dc784c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script>
onload = opener.t.step_func_done(function() {
document.write("<body>Filler Text<div id='log'></div>");
opener.assert_equals(document.body.textContent, "Filler Text");
});
</script>
<body>FAIL
18 changes: 7 additions & 11 deletions html/webappapis/dynamic-markup-insertion/document-write/047.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
<!doctype html>
<title>document.write</title>
<script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var t = async_test();
onload = function() {
t.step(function() {
document.write("<body>Filler Text<div id='log'></div>");
assert_equals(document.body.textContent, "Filler Text");
});
t.done();
};
var win;
var t = async_test(() => {
win = window.open("047-1.html");
});
t.add_cleanup(() => win.close());
</script>
<body>FAIL
<div id="log"></div>
15 changes: 0 additions & 15 deletions html/webappapis/dynamic-markup-insertion/document-write/048.html

This file was deleted.

0 comments on commit 8dc784c

Please sign in to comment.