Index: third_party/WebKit/LayoutTests/fast/css/containment/contain-parse-and-apply.html |
diff --git a/third_party/WebKit/LayoutTests/fast/css/containment/contain-parse-and-apply.html b/third_party/WebKit/LayoutTests/fast/css/containment/contain-parse-and-apply.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2c4136094d6a05d7f7185826280bef8fb335a9aa |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/css/containment/contain-parse-and-apply.html |
@@ -0,0 +1,36 @@ |
+<!DOCTYPE html> |
+<style> |
+#none { contain: none; } |
+#style { contain: style; } |
+#layout { contain: layout; } |
+#paint { contain: paint; } |
+#strict { contain: strict; } |
alancutter (OOO until 2018)
2015/12/02 02:48:17
There should be tests that use combinations of sty
leviw_travelin_and_unemployed
2015/12/03 00:01:59
Added a bunch of cases below.
|
+</style> |
+<body> |
+<div id="none"><div></div></div> |
+<div id="style"><div></div></div> |
+<div id="layout"><div></div></div> |
+<div id="paint"><div></div></div> |
+<div id="strict"><div></div></div> |
+<script src="../../../resources/js-test.js"></script> |
+<script> |
+function computedContainValue(element) { |
+ return window.getComputedStyle(element).contain; |
+} |
+function getContainValue(query) |
+{ |
+ var element = document.querySelector(query); |
+ return computedContainValue(element); |
+} |
+ |
+shouldBeEqualToString("getContainValue('#none')", "none"); |
+shouldBeEqualToString("getContainValue('#style')", "style"); |
+shouldBeEqualToString("getContainValue('#layout')", "layout"); |
+shouldBeEqualToString("getContainValue('#paint')", "paint"); |
+shouldBeEqualToString("getContainValue('#strict')", "strict"); |
+ |
+var children = document.querySelectorAll("div > div"); |
+for (var i = 0; i < children.length; i++) { |
+ shouldBeEqualToString("computedContainValue(children[i])", "none"); |
+} |
+</script> |