Chromium Code Reviews| 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 |
| index e3017b2b8f5f2ea4ecfdfd485e1ef3a35a42f26f..d472ac150df0198ded985f495377e1e3a343a819 100644 |
| --- a/third_party/WebKit/LayoutTests/fast/images/script-tests/border.js |
| +++ b/third_party/WebKit/LayoutTests/fast/images/script-tests/border.js |
| @@ -1,6 +1,3 @@ |
| -description( |
| -"This tests the HTMLImageElement border property." |
| -); |
| function imageBorderWidth(borderValue, style) |
| { |
|
Srirama
2016/08/10 14:18:03
nit: move the brace to previous line for consisten
sivag
2016/08/10 14:37:11
Done.
|
| @@ -15,23 +12,25 @@ function imageBorderWidth(borderValue, style) |
| 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"); |
| +test(function() { |
| +assert_equals(imageBorderWidth(), 0); |
| +assert_equals(imageBorderWidth(null), 0); |
| +assert_equals(imageBorderWidth(''), 0); |
| +assert_equals(imageBorderWidth(0), 0); |
| +assert_equals(imageBorderWidth('x'), 0); |
| +assert_equals(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"); |
| +assert_equals(imageBorderWidth(null, 'border-width: 20px'), 20); |
| +assert_equals(imageBorderWidth('', 'border-width: 20px'), 20); |
| +assert_equals(imageBorderWidth('x', 'border-width: 20px'), 20); |
| +assert_equals(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"); |
| +assert_equals(imageBorderWidth(10), 10); |
| +assert_equals(imageBorderWidth(' 10'), 10); |
| +assert_equals(imageBorderWidth('10 '), 10); |
| +assert_equals(imageBorderWidth(' 10 '), 10); |
| +assert_equals(imageBorderWidth('10q'), 10); |
| +assert_equals(imageBorderWidth(' 10q'), 10); |
| +assert_equals(imageBorderWidth('10q '), 10); |
| +assert_equals(imageBorderWidth(' 10q '), 10); |
| +}); |