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

Side by Side Diff: third_party/WebKit/LayoutTests/css3/flexbox/resources/box-orient-button.js

Issue 2130543003: Convert some flexbox tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 description("Check if box-orient is working in <button>. See https://bugs. webkit.org/show_bug.cgi?id=25406");
2 1
3 function setFlexDirection(element, flexDirection) { 2 function setFlexDirection(element, flexDirection) {
4 element.style.webkitFlexDirection = flexDirection; 3 element.style.webkitFlexDirection = flexDirection;
5 element.style.flexDirection = flexDirection; 4 element.style.flexDirection = flexDirection;
6 } 5 }
7 6
8 function gebi(id) { 7 function gebi(id) {
9 return document.getElementById(id); 8 return document.getElementById(id);
10 } 9 }
11 10
12 setFlexDirection(gebi("toVertical"), "column"); 11 setFlexDirection(gebi("toVertical"), "column");
13 setFlexDirection(gebi("toHorizontal"), "row"); 12 setFlexDirection(gebi("toHorizontal"), "row");
14 13
15 var referenceHorizontalHeight = gebi("reference_horizontal").clientHeight; 14 var referenceHorizontalHeight = gebi("reference_horizontal").clientHeight;
16 var referenceVerticalHeight = gebi("reference_vertical").clientHeight; 15 var referenceVerticalHeight = gebi("reference_vertical").clientHeight;
17 shouldBe("gebi('default').clientHeight", "referenceHorizontalHeight"); 16 test(function() { assert_equals(gebi('default').clientHeight, referenceHorizonta lHeight); }, "default height");
18 shouldBe("gebi('horizontal').clientHeight", "referenceHorizontalHeight"); 17 test(function() { assert_equals(gebi('horizontal').clientHeight, referenceHorizo ntalHeight); }, "horizontal height");
19 shouldBe("gebi('vertical').clientHeight", "referenceVerticalHeight"); 18 test(function() { assert_equals(gebi('vertical').clientHeight, referenceVertical Height); }, "vertical height");
20 shouldBe("gebi('toHorizontal').clientHeight", "referenceHorizontalHeight"); 19 test(function() { assert_equals(gebi('toHorizontal').clientHeight, referenceHori zontalHeight); }, "toHorizontal height");
21 shouldBe("gebi('toVertical').clientHeight", "referenceVerticalHeight"); 20 test(function() { assert_equals(gebi('toVertical').clientHeight, referenceVertic alHeight); }, "toVertical height");
22
23 // If we are in DRT, we don't need meaningless messages.
24 if (window.testRunner)
25 document.getElementById("main").innerHTML = "";
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698