content/base/test/test_bug604592.html

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:7c84847f7169
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=604592
5 -->
6 <head>
7 <title>Test for Bug 604592</title>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=604592">Mozilla Bug 604592</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
15
16 </div>
17 <pre id="test">
18 <script type="application/javascript">
19 /** Test for Bug 604592 **/
20 function testInStrictMode() {
21 "use strict";
22 try {
23 document.body.prefix = "foo";
24 ok(false, "Should not have reached this point");
25 } catch (e) {
26 ok(e instanceof TypeError, "Expected a TypeError");
27 }
28 }
29
30 testInStrictMode();
31 document.body.prefix = "foo";
32 ok(document.body.prefix === null,
33 "Expected strictly equal to null, got " + document.body.prefix);
34 </script>
35 </pre>
36 </body>
37 </html>

mercurial