Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(880)

Side by Side Diff: LayoutTests/fast/regions/region-styling/webkit-region-rule.html

Issue 159933010: Remove everything region-specific from LayoutTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <style>
5 @-webkit-region #region1 {
6 #p1 { background-color: green; }
7 #p2 { background-color: lime; }
8 }
9 @-webkit-region #region2 {
10 p { background-color: blue; }
11 }
12 </style>
13 <script src="../../../resources/js-test.js"></script>
14 </head>
15 <body>
16 <script>
17
18 description("This tests the WebKitCSSRegionRule interface.");
19
20 if (window.WebKitCSSRegionRule)
21 testPassed("WebKitCSSRegionRule exists on Window object");
22 else
23 testFailed("WebKitCSSRegionRule does not exist on Window object");
24
25 if (window.CSSRule.WEBKIT_REGION_RULE)
26 testPassed("WEBKIT_REGION_RULE exists on Window.CSSRule object");
27 else
28 testFailed("WEBKIT_REGION_RULE does not exist on Window.CSSRule object");
29 shouldBe("window.CSSRule.WEBKIT_REGION_RULE", "16");
30
31 var regionRule1 = document.styleSheets.item(0).cssRules.item(0);
32 shouldBe("regionRule1.type", "window.CSSRule.WEBKIT_REGION_RULE");
33 var regionRule1CSSRules = regionRule1.cssRules;
34 shouldBe("regionRule1CSSRules.length", "2");
35 shouldBe("regionRule1CSSRules.item(0).type", "window.CSSRule.STYLE_RULE");
36 shouldBe("regionRule1CSSRules.item(0).cssText", "'#p1 { background-color: green; }'");
37 shouldBe("regionRule1CSSRules.item(1).cssText", "'#p2 { background-color: lime; }'");
38
39 var regionRule2 = document.styleSheets.item(0).cssRules.item(1);
40 shouldBe("regionRule2.type", "window.CSSRule.WEBKIT_REGION_RULE");
41 var regionRule2CSSRules = regionRule2.cssRules;
42 shouldBe("regionRule2CSSRules.length", "1");
43 shouldBe("regionRule2CSSRules.item(0).type", "window.CSSRule.STYLE_RULE");
44 shouldBe("regionRule2CSSRules.item(0).cssText", "'p { background-color: blue; }' ");
45
46 </script>
47 </body>
48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698