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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/containment/contain-parse-and-apply.html

Issue 1485973005: Add CSS support for Containment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test Created 5 years 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 <style>
3 #none { contain: none; }
4 #style { contain: style; }
5 #layout { contain: layout; }
6 #paint { contain: paint; }
7 #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.
8 </style>
9 <body>
10 <div id="none"><div></div></div>
11 <div id="style"><div></div></div>
12 <div id="layout"><div></div></div>
13 <div id="paint"><div></div></div>
14 <div id="strict"><div></div></div>
15 <script src="../../../resources/js-test.js"></script>
16 <script>
17 function computedContainValue(element) {
18 return window.getComputedStyle(element).contain;
19 }
20 function getContainValue(query)
21 {
22 var element = document.querySelector(query);
23 return computedContainValue(element);
24 }
25
26 shouldBeEqualToString("getContainValue('#none')", "none");
27 shouldBeEqualToString("getContainValue('#style')", "style");
28 shouldBeEqualToString("getContainValue('#layout')", "layout");
29 shouldBeEqualToString("getContainValue('#paint')", "paint");
30 shouldBeEqualToString("getContainValue('#strict')", "strict");
31
32 var children = document.querySelectorAll("div > div");
33 for (var i = 0; i < children.length; i++) {
34 shouldBeEqualToString("computedContainValue(children[i])", "none");
35 }
36 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698