Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=592829
5 -->
6 <head>
7 <title>Test for Bug 592829</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=592829">Mozilla Bug 592829</a>
13 <pre id="test">
14 <script type="application/javascript">
15 /** Test for Bug 592829 **/
17 // NOTE! It's imperative that we don't call .init() here. Otherwise we're not
18 // testing what happens if parsing fails.
19 // If we ever change how DOMParser initilization works, just update this code
20 // to create a DOMParser which is not allowed to parse XUL.
22 var isXUL = true;
23 try {
24 var x =
25 SpecialPowers.Cc
26 .getService(Components.interfaces.nsIDOMParser)
27 .parseFromString('<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"/>', "text/xml");
28 isXUL = x.documentElement.namespaceURI ==
29 "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
30 }
31 catch (ex) {
32 isXUL = false;
33 }
35 is(isXUL, false, "We didn't create XUL and we didn't crash!");
36 </script>
37 </pre>
38 </body>
39 </html>