Bug 1874684 - Part 37: Fix unified compilation. r=allstarschh
[gecko.git] / layout / style / test / test_shared_sheet_caching.html
blobe59c0c139ee18d1e824c0c2e9a4c8f478e520077
1 <!doctype html>
2 <meta charset="utf-8">
3 <script src="/tests/SimpleTest/SimpleTest.js"></script>
4 <script>
5 function childWindowLoaded(childWin) {
6 is(
7 childWin.getComputedStyle(childWin.document.documentElement).backgroundColor,
8 "rgb(0, 255, 0)",
9 "Sheet should apply",
11 is(
12 SpecialPowers.getDOMWindowUtils(childWin).parsedStyleSheets,
14 `Shouldn't need to parse the stylesheet ${childWin.parent == window ? "frame" : "top"}`
16 if (childWin.top == childWin) {
17 SimpleTest.finish();
20 </script>
21 <link rel="stylesheet" href="file_shared_sheet_caching.css">
22 <iframe src="file_shared_sheet_caching.html"></iframe>
23 <a rel="opener" href="file_shared_sheet_caching.html" target="_blank">Navigation</a>
24 <script>
25 SimpleTest.waitForExplicitFinish();
26 onload = function() {
27 info("Sheets parsed: " + SpecialPowers.DOMWindowUtils.parsedStyleSheets);
28 is(
29 getComputedStyle(document.documentElement).backgroundColor,
30 "rgb(0, 255, 0)",
31 "Sheet should apply",
33 document.querySelector("a").click();
35 </script>