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

Unified Diff: LayoutTests/fast/regions/cssom/webkit-named-flow-get-content.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/cssom/webkit-named-flow-get-content.html
diff --git a/LayoutTests/fast/regions/cssom/webkit-named-flow-get-content.html b/LayoutTests/fast/regions/cssom/webkit-named-flow-get-content.html
deleted file mode 100644
index 8533305af42f79b41ee9bf7ca8ccdddfa663c792..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/regions/cssom/webkit-named-flow-get-content.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <script src="../../../resources/js-test.js"></script>
- <script src="../resources/helper.js"></script>
- <style>
- #region { -webkit-flow-from: flow; width: 250px; height: 150px; }
- </style>
- </head>
- <body>
- <!--
- 1. The content nodes collection for a named flow 'flow' contains only those elements that have
- the style property -webkit-flow-into set to 'flow'.
- 2. If an element has an ancestor with -webkit-flow-into = 'flow' but does not have its '-webkit-flow-into'
- set to 'flow' will not be listed among the content nodes for named flow 'flow'.
- 3. Elements with '-webkit-flow-into' set to 'flow' and 'display:none' should be listed among the content nodes
- for named flow object 'flow'.
- 4. The collection of nodes is returned in document order.
- -->
- <script>
- if (window.testRunner)
- window.testRunner.dumpAsText();
- description("Test for 90163: [CSSRegions]Rename NamedFlow::contentNodes to NamedFlow::getContent()");
-
- // Add an element that would be collected by the named flow but do not add it to the DOM, the contentNodes should be empty.
- var article = document.createElement("div");
- article.id = "article";
- article.style.webkitFlowInto = "flow";
-
- shouldBeNull('getFlowByName("flow")');
-
- // Append the above element to the DOM. It will be collected by the flow, therefore the contentNodes should have 1 element.
- document.body.appendChild(article);
- var namedFlowContent3 = getFlowByName("flow").getContent();
- shouldEvaluateTo("namedFlowContent3.length", 1);
- shouldBeEqualToString("namedFlowContent3.item(0).id", "article");
-
- // Append a child element to the article above but do not set its style to flow into 'flow'.
- // The contentNodes should still have 1 element.
- var pNode = document.createElement("p");
- pNode.id = "p1";
- document.getElementById("article").appendChild(pNode);
- var namedFlowContent4 = getFlowByName("flow").getContent();
- shouldEvaluateTo("namedFlowContent4.length", 1);
- shouldBeEqualToString("namedFlowContent4.item(0).id", "article");
-
- // Add another element directly to the flow and set its 'display' property to 'none', it should be part of the flow.
- var article2 = document.createElement("div");
- article2.id = "article2";
- article2.style.webkitFlowInto = "flow";
- article2.style.display = "none";
- document.body.insertBefore(article2, article);
-
- var namedFlowContent5 = getFlowByName("flow").getContent();
- shouldEvaluateTo("namedFlowContent5.length", 2);
- shouldBeEqualToString("namedFlowContent5.item(0).id", "article2");
- shouldBeEqualToString("namedFlowContent5.item(1).id", "article");
-
- // Adding a region element to flow content into should not influence the content nodes collection.
- var regionNode = document.createElement("div");
- regionNode.id = "region";
- document.body.appendChild(regionNode);
- var namedFlowContent6 = getFlowByName("flow").getContent();
- shouldEvaluateTo("namedFlowContent6.length", 2);
-
- // Change display:none for the 'article2' element, the list of contentNodes should stay the same
- document.getElementById("article2").style.display = "block";
- var namedFlowContent7 = getFlowByName("flow").getContent();
- shouldEvaluateTo("namedFlowContent7.length", 2);
-
- // Add a p and a span under p. Make the span directly collected by the flow. The contentNodes collection should have 3 elements.
- pNode = document.createElement("p");
- pNode.id = "p2";
- var spanNode = document.createElement("span");
- spanNode.id = "span1";
- spanNode.style.webkitFlowInto = "flow";
- pNode.appendChild(spanNode);
- document.getElementById("article2").appendChild(pNode);
-
- var namedFlowContent8 = getFlowByName("flow").getContent();
- shouldEvaluateTo("namedFlowContent8.length", 3);
-
- // Change display of article node to none, the collection should still have 3 elements.
- document.getElementById("article").style.display = "none";
- var namedFlowContent9 = getFlowByName("flow").getContent();
- shouldEvaluateTo("namedFlowContent9.length", 3);
- shouldBeEqualToString("namedFlowContent9.item(0).id", "article2");
- shouldBeEqualToString("namedFlowContent9.item(1).id", "span1");
- shouldBeEqualToString("namedFlowContent9.item(2).id", "article");
-
- // Take 'article' node from last position and insert it before 'article2'
- article = document.getElementById("article");
- document.body.insertBefore(document.body.removeChild(article), article2);
- var namedFlowContent10 = getFlowByName("flow").getContent();
- shouldEvaluateTo("namedFlowContent10.length", 3);
- shouldBeEqualToString("namedFlowContent10.item(0).id", "article");
-
- // Clone 'article2' including its children.
- var article2Clone = document.getElementById("article2").cloneNode(true);
- document.body.appendChild(article2Clone);
- var namedFlowContent11 = getFlowByName("flow").getContent();
- shouldEvaluateTo("namedFlowContent11.length", 5);
- // Remove article2 nodes from document, they should be removed from flow.
- document.body.removeChild(article2);
- document.body.removeChild(article2Clone);
- var namedFlowContent12 = getFlowByName("flow").getContent();
- shouldEvaluateTo("namedFlowContent12.length", 1);
- shouldBeEqualToString("namedFlowContent12.item(0).id", "article");
-
- // Move the content node 'article' from named flow 'flow' to named flow 'flow2'
- document.getElementById("article").style.webkitFlowInto = "flow2";
- var flow2 = getFlowByName("flow2");
- var namedFlowContent11 = getFlowByName("flow").getContent();
- var namedFlowContent12 = getFlowByName("flow2").getContent();
- shouldEvaluateTo("namedFlowContent11.length", "0");
- shouldEvaluateTo("namedFlowContent12.length", "1");
- shouldBeEqualToString("namedFlowContent12.item(0).id", "article");
-
- // Remove the content node from dom, content nodes for both 'flow' and 'flow2' should be empty
- document.body.removeChild(document.getElementById("article"));
- shouldBeNull('getFlowByName("flow2")');
-
- var namedFlowContent13 = getFlowByName("flow").getContent();
- shouldEvaluateTo("namedFlowContent13.length", "0");
-
- var namedFlowContent14 = flow2.getContent();
- shouldEvaluateTo("namedFlowContent14.length", "0");
- document.body.appendChild(article);
- var namedFlowContent15 = flow2.getContent();
- shouldEvaluateTo("namedFlowContent15.length", "1");
-
- document.getElementById("region").style.visibility = "hidden";
- </script>
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698