1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 https://bugzilla.mozilla.org/show_bug.cgi?id=332848
6 <title>Test for Bug
332848</title>
7 <script type=
"text/javascript" src=
"/MochiKit/packed.js"></script>
8 <script type=
"text/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=332848">Mozilla Bug
332848</a>
14 <div id=
"content" style=
"display: none">
18 <script class=
"testbody" type=
"text/javascript">
21 /** Test for Bug
332848 **/
23 // parseChecker will become true if we keep parsing after calling close().
24 var parseChecker = false;
29 is(
0,
1,
"document.open succeeded");
31 is (e.code, DOMException.NOT_SUPPORTED_ERR,
32 "Wrong exception from document.open");
36 document.write(
"aaa");
37 is(
0,
1,
"document.write succeeded");
39 is (e.code, DOMException.NOT_SUPPORTED_ERR,
40 "Wrong exception from document.write");
45 is(
0,
1,
"document.close succeeded");
47 is (e.code, DOMException.NOT_SUPPORTED_ERR,
48 "Wrong exception from document.close");
53 is(parseChecker, true,
"Parsing stopped");
58 window.onload = loadTest;
60 SimpleTest.waitForExplicitFinish();