Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <?xml version="1.0"?>
3 <!-- This Source Code Form is subject to the terms of the Mozilla Public
4 - License, v. 2.0. If a copy of the MPL was not distributed with this
5 - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
7 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
9 <window id="bug586713_window"
10 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
11 width="300"
12 height="300"
13 onload="onLoad();"
14 title="Bug 586713 Test">
16 <menubar id="nativemenubar">
17 <menu id="foo" label="Foo">
18 <menupopup>
19 <menuitem label="FooItem0"/>
20 </menupopup>
21 </menu>
22 </menubar>
24 <script type="application/javascript"><![CDATA[
25 function ok(condition, message) {
26 window.opener.wrappedJSObject.SimpleTest.ok(condition, message);
27 }
29 function onTestsFinished() {
30 window.close();
31 window.opener.wrappedJSObject.SimpleTest.finish();
32 }
34 var fooCallCount = 0;
35 function foo() {
36 fooCallCount++;
37 let instruction = document.createProcessingInstruction("xml-stylesheet", 'href="chrome://foo.css" type="text/css"');
38 document.insertBefore(instruction, document.documentElement);
39 if (fooCallCount == 2) {
40 ok(true, "If we got here we didn't crash, excellent.");
41 onTestsFinished();
42 }
43 }
45 function onLoad() {
46 foo();
47 setTimeout(function() foo(), 0);
48 }
49 ]]></script>
50 </window>