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

Unified Diff: third_party/WebKit/LayoutTests/fast/images/script-tests/border.js

Issue 2228333003: Use testharness.js in fast/images/ for border/cmyk tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test changed as per the comments. Created 4 years, 4 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/fast/images/script-tests/border.js
diff --git a/third_party/WebKit/LayoutTests/fast/images/script-tests/border.js b/third_party/WebKit/LayoutTests/fast/images/script-tests/border.js
deleted file mode 100644
index e3017b2b8f5f2ea4ecfdfd485e1ef3a35a42f26f..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/images/script-tests/border.js
+++ /dev/null
@@ -1,37 +0,0 @@
-description(
-"This tests the HTMLImageElement border property."
-);
-
-function imageBorderWidth(borderValue, style)
-{
- var image = document.createElement("img");
- if (borderValue !== undefined)
- image.setAttribute("border", borderValue);
- image.setAttribute("style", style);
- image.setAttribute("width", "0");
- document.body.appendChild(image);
- var borderBoxWidth = image.offsetWidth;
- document.body.removeChild(image);
- return borderBoxWidth / 2;
-}
-
-shouldBe("imageBorderWidth()", "0");
-shouldBe("imageBorderWidth(null)", "0");
-shouldBe("imageBorderWidth('')", "0");
-shouldBe("imageBorderWidth(0)", "0");
-shouldBe("imageBorderWidth('x')", "0");
-shouldBe("imageBorderWidth(undefined, 'border-width: 20px')", "0");
-
-shouldBe("imageBorderWidth(null, 'border-width: 20px')", "20");
-shouldBe("imageBorderWidth('', 'border-width: 20px')", "20");
-shouldBe("imageBorderWidth('x', 'border-width: 20px')", "20");
-shouldBe("imageBorderWidth(0, 'border-width: 20px')", "20");
-
-shouldBe("imageBorderWidth(10)", "10");
-shouldBe("imageBorderWidth(' 10')", "10");
-shouldBe("imageBorderWidth('10 ')", "10");
-shouldBe("imageBorderWidth(' 10 ')", "10");
-shouldBe("imageBorderWidth('10q')", "10");
-shouldBe("imageBorderWidth(' 10q')", "10");
-shouldBe("imageBorderWidth('10q ')", "10");
-shouldBe("imageBorderWidth(' 10q ')", "10");

Powered by Google App Engine
This is Rietveld 408576698