|
1 <?xml version="1.0"?> |
|
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
|
3 <?xml-stylesheet href="data:text/css, |
|
4 |
|
5 %23box { |
|
6 background: blue; |
|
7 } |
|
8 |
|
9 %23box:-moz-window-inactive { |
|
10 background: cyan; |
|
11 } |
|
12 |
|
13 " type="text/css"?> |
|
14 |
|
15 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
|
16 |
|
17 <box id="box" height="100"/> |
|
18 |
|
19 <script type="application/javascript"><![CDATA[ |
|
20 |
|
21 var ok = window.opener.wrappedJSObject.ok; |
|
22 var complete = window.opener.wrappedJSObject.complete; |
|
23 var openerDoc = window.opener.wrappedJSObject.document; |
|
24 var SimpleTest = window.opener.wrappedJSObject.SimpleTest; |
|
25 |
|
26 SimpleTest.waitForFocus(function () { |
|
27 ok(getComputedStyle(document.getElementById("box"), "").backgroundColor, "rgb(0, 0, 255)"); |
|
28 ok(getComputedStyle(openerDoc.getElementById("box"), "").backgroundColor, "rgb(0, 255, 255)"); |
|
29 window.opener.focus(); |
|
30 ok(getComputedStyle(document.getElementById("box"), "").backgroundColor, "rgb(0, 255, 255)"); |
|
31 ok(getComputedStyle(openerDoc.getElementById("box"), "").backgroundColor, "rgb(0, 0, 255)"); |
|
32 complete(); |
|
33 }, window); |
|
34 |
|
35 ]]></script> |
|
36 |
|
37 </window> |