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

Side by Side Diff: LayoutTests/fast/css-grid-layout/resources/display-grid-set-get.js

Issue 264373005: New test cases for the display-grid-set-get.html test. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « LayoutTests/fast/css-grid-layout/display-grid-set-get-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 description('Test that setting and getting display: grid and inline-grid works a s expected'); 1 description('Test that setting and getting display: grid and inline-grid works a s expected');
2 2
3 debug("Test getting |display| set through CSS"); 3 debug("Test getting |display| set through CSS");
4 var gridElement = document.getElementById("gridElement"); 4 var gridElement = document.getElementById("gridElement");
5 var inlineGridElement = document.getElementById("inlineGridElement"); 5 var inlineGridElement = document.getElementById("inlineGridElement");
6 shouldBe("getComputedStyle(gridElement, '').getPropertyValue('display')", "'grid '"); 6 shouldBe("getComputedStyle(gridElement, '').getPropertyValue('display')", "'grid '");
7 shouldBe("getComputedStyle(inlineGridElement, '').getPropertyValue('display')", "'inline-grid'"); 7 shouldBe("getComputedStyle(inlineGridElement, '').getPropertyValue('display')", "'inline-grid'");
8 shouldBe("getComputedStyle(inlineFloatGridElement, '').getPropertyValue('display ')", "'grid'");
9 shouldBe("getComputedStyle(inlineAbsoluteGridElement, '').getPropertyValue('disp lay')", "'grid'");
8 10
9 debug(""); 11 debug("");
10 debug("Test getting and setting display through JS"); 12 debug("Test getting and setting display through JS");
11 var element = document.createElement("div"); 13 var element = document.createElement("div");
12 document.body.appendChild(element); 14 document.body.appendChild(element);
13 shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'block'") ; 15 shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'block'") ;
14 element.style.display = "grid"; 16 element.style.display = "grid";
15 shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'grid'"); 17 shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'grid'");
16 18
17 element = document.createElement("div"); 19 element = document.createElement("div");
18 document.body.appendChild(element); 20 document.body.appendChild(element);
19 shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'block'") ; 21 shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'block'") ;
20 element.style.display = "inline-grid"; 22 element.style.display = "inline-grid";
21 shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'inline-g rid'"); 23 shouldBe("getComputedStyle(element, '').getPropertyValue('display')", "'inline-g rid'");
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-grid-layout/display-grid-set-get-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698