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 <?xml version="1.0"?>
2 <?xml-stylesheet type="text/css" href="chrome://global/skin"?>
3 <?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
4 <!--
5 https://bugzilla.mozilla.org/show_bug.cgi?id=780199
6 -->
7 <window title="Mozilla Bug 780199"
8 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
9 onload="test()">
10 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
12 <!-- test results are displayed in the html:body -->
13 <body xmlns="http://www.w3.org/1999/xhtml">
14 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=780199"
15 target="_blank">Mozilla Bug 780199</a>
16 </body>
18 <!-- test code goes here -->
19 <script type="application/javascript">
20 <![CDATA[
22 /** Test for Bug 780199 **/
24 SimpleTest.waitForExplicitFinish();
26 var b;
28 function callback(r) {
29 is(r[0].type, "attributes");
30 is(r[0].oldValue, b.getAttribute("src"));
31 setTimeout(continueTest, 500);
32 }
34 function continueTest() {
35 // Check that a new page wasn't loaded.
36 is(b.contentDocument.documentElement.textContent, "testvalue");
37 SimpleTest.finish();
38 }
40 function test() {
41 b = document.getElementById("b");
42 var m = new MutationObserver(callback);
43 m.observe(b, { attributes: true, attributeOldValue: true });
44 b.contentDocument.documentElement.textContent = "testvalue";
45 b.setAttribute("src", b.getAttribute("src"));
46 }
48 ]]>
49 </script>
50 <browser id="b" src="data:text/plain,initial"/>
51 </window>