Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / layout / style / test / test_bug405818.html
bloba313242769a5854a195cb54ae7928fc89881b4cc
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=405818
5 -->
6 <head>
7 <title>Test for Bug 405818</title>
8 <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
9 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
11 <link rel="stylesheet" type="text/css" href="data:text/css,#nosuchid{color:green;}">
12 <link rel="stylesheet" type="text/css" href="chrome://global/skin/global.css">
13 <!-- Script to make sure sheets gets a chance to load fully in Gecko 1.8 and earlier -->
14 <script type="text/javascript" src="data:text/javascript,"></script>
15 <link rel="stylesheet" type="text/css" href="data:text/css,#nosuchid{color:green;}">
16 <link rel="stylesheet" type="text/css" href="chrome://global/skin/global.css">
17 </head>
18 <body>
19 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=405818">Mozilla Bug 405818</a>
20 <p id="display"></p>
21 <div id="content" style="display: none">
23 </div>
24 <pre id="test">
25 <script class="testbody" type="text/javascript">
27 /** Test for Bug 405818 **/
28 SimpleTest.waitForExplicitFinish();
30 addLoadEvent(function() {
31 is(document.styleSheets[1].href,
32 "data:text/css,#nosuchid{color:green;}",
33 "Unexpected href for linked sheet before cloning");
34 is(document.styleSheets[3].href,
35 "data:text/css,#nosuchid{color:green;}",
36 "Unexpected href for later linked sheet before cloning");
38 is(document.styleSheets[2].href,
39 "chrome://global/skin/global.css",
40 "Unexpected href for linked chrome sheet before cloning");
41 is(document.styleSheets[4].href,
42 "chrome://global/skin/global.css",
43 "Unexpected href for later linked chrome sheet before cloning");
45 // Force cloning of inners
46 document.styleSheets[1].cssRules[0];
47 (function() {
48 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
49 document.styleSheets[2].cssRules[0];
50 })();
52 is(document.styleSheets[1].href,
53 "data:text/css,#nosuchid{color:green;}",
54 "Unexpected href for linked sheet after cloning");
55 is(document.styleSheets[3].href,
56 "data:text/css,#nosuchid{color:green;}",
57 "Unexpected href for later linked sheet after cloning");
59 is(document.styleSheets[2].href,
60 "chrome://global/skin/global.css",
61 "Unexpected href for linked chrome sheet after cloning");
62 is(document.styleSheets[4].href,
63 "chrome://global/skin/global.css",
64 "Unexpected href for later linked chrome sheet after cloning");
66 SimpleTest.finish();
67 });
68 </script>
69 </pre>
70 </body>
71 </html>