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

Unified Diff: LayoutTests/fast/regions/region-styling/parsing-region-style-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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/regions/region-styling/parsing-region-style-rule.html
diff --git a/LayoutTests/fast/regions/region-styling/parsing-region-style-rule.html b/LayoutTests/fast/regions/region-styling/parsing-region-style-rule.html
deleted file mode 100644
index af3da309a2189d1f9823cb6ea27bc6d3eff59cab..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/regions/region-styling/parsing-region-style-rule.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!doctype html>
-<html>
- <!--
- Tests parsing of region styling @-webkit-region rule.
- On success, you should see a PASS message.
- -->
- <head>
- <style>
- #article { -webkit-flow: "main-thread"; }
- .region { content: -webkit-from-flow("main-thread"); }
-
- /* Style the content flowing into the first region */
- @-webkit-region #region1 { div { margin-top: 10px; } }
-
- /* Style the content flowing into the second region */
- @-webkit-region #region2 { div { margin-left: 5px; } }
-
- /* Mix region styling rules declarations with other rules */
- #region1 { width: 200px; height: 50px; }
- #region2 { width: 200px; height: 50px; }
-
- /* Again style the content flowing into the first region */
- @-webkit-region #region1 { p { color: red; } }
-
- /* Incorrect region styling rule should be ignored as long as
- braces are paired properly*/
- @-webkit-region #region1 { color: red; }
-
- /* Style both regions at the same time */
- @-webkit-region #region1, #region2 { p > p { color: green; } }
- </style>
- </head>
- <body>
- <div id="console"></div>
- <script>
- if (window.testRunner)
- testRunner.dumpAsText();
-
- function logConsole(msg)
- {
- var textNode = document.createTextNode(msg);
- document.getElementById("console").appendChild(textNode);
- }
-
- var expectedRegionStyleRulesText =
- [
- "@-webkit-region #region1 { div { margin-top: 10px; } }",
- "@-webkit-region #region2 { div { margin-left: 5px; } }",
- "@-webkit-region #region1 { p { color: red; } }",
- "@-webkit-region #region1, #region2 { p > p { color: green; } }"
- ];
-
- var actualRegionStyleRulesText = new Array();
- var cssRules = document.styleSheets[0].cssRules;
- for (var idx = 0; idx < cssRules.length; idx++) {
- var cssRule = cssRules.item(idx);
- if (cssRule.type == CSSRule.WEBKIT_REGION_RULE)
- actualRegionStyleRulesText.push(cssRule.cssText);
- }
-
- var pass = true;
- if (expectedRegionStyleRulesText.length != actualRegionStyleRulesText.length) {
- logConsole("FAIL: expected " + expectedRegionStyleRulesText.length + " region style rules, actual: " + actualRegionStyleRulesText.length);
- pass = false;
- }
- else {
- for (var idx = 0; idx < actualRegionStyleRulesText.length; idx++) {
- if (expectedRegionStyleRulesText[idx].replace(/\s/g, "") != actualRegionStyleRulesText[idx].replace(/\s/g, "")) {
- logConsole("FAIL: expected " + expectedRegionStyleRulesText[idx] + "found " + actualRegionStyleRulesText[idx]);
- pass = false;
- }
- }
- }
-
- if (pass)
- logConsole("PASS");
- </script>
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698