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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/css3/flexbox/resources/box-orient-button.js
diff --git a/third_party/WebKit/LayoutTests/css3/flexbox/resources/box-orient-button.js b/third_party/WebKit/LayoutTests/css3/flexbox/resources/box-orient-button.js
index 84f135f196598447aba0f6cae3ed5184c479bb08..1e4a5eb9f54976f9dde9955d10f1ece86a4c0a28 100644
--- a/third_party/WebKit/LayoutTests/css3/flexbox/resources/box-orient-button.js
+++ b/third_party/WebKit/LayoutTests/css3/flexbox/resources/box-orient-button.js
@@ -1,4 +1,3 @@
-description("Check if box-orient is working in <button>. See https://bugs.webkit.org/show_bug.cgi?id=25406");
function setFlexDirection(element, flexDirection) {
element.style.webkitFlexDirection = flexDirection;
@@ -14,12 +13,8 @@ setFlexDirection(gebi("toHorizontal"), "row");
var referenceHorizontalHeight = gebi("reference_horizontal").clientHeight;
var referenceVerticalHeight = gebi("reference_vertical").clientHeight;
-shouldBe("gebi('default').clientHeight", "referenceHorizontalHeight");
-shouldBe("gebi('horizontal').clientHeight", "referenceHorizontalHeight");
-shouldBe("gebi('vertical').clientHeight", "referenceVerticalHeight");
-shouldBe("gebi('toHorizontal').clientHeight", "referenceHorizontalHeight");
-shouldBe("gebi('toVertical').clientHeight", "referenceVerticalHeight");
-
-// If we are in DRT, we don't need meaningless messages.
-if (window.testRunner)
- document.getElementById("main").innerHTML = "";
+test(function() { assert_equals(gebi('default').clientHeight, referenceHorizontalHeight); }, "default height");
+test(function() { assert_equals(gebi('horizontal').clientHeight, referenceHorizontalHeight); }, "horizontal height");
+test(function() { assert_equals(gebi('vertical').clientHeight, referenceVerticalHeight); }, "vertical height");
+test(function() { assert_equals(gebi('toHorizontal').clientHeight, referenceHorizontalHeight); }, "toHorizontal height");
+test(function() { assert_equals(gebi('toVertical').clientHeight, referenceVerticalHeight); }, "toVertical height");

Powered by Google App Engine
This is Rietveld 408576698