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

Unified Diff: LayoutTests/fast/js/script-tests/custom-constructors.js

Issue 839733003: Image() constructor's arguments should not have default values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « LayoutTests/fast/js/custom-constructors-expected.txt ('k') | Source/core/html/HTMLImageElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/js/script-tests/custom-constructors.js
diff --git a/LayoutTests/fast/js/script-tests/custom-constructors.js b/LayoutTests/fast/js/script-tests/custom-constructors.js
index fce2ff87e2408f8dc5416a339be0a174dd9e80e1..ce5c42ff70c93a7c68d567489c2971fe9b97c470 100644
--- a/LayoutTests/fast/js/script-tests/custom-constructors.js
+++ b/LayoutTests/fast/js/script-tests/custom-constructors.js
@@ -8,11 +8,20 @@ shouldBeEqualToString("new Image().tagName", "IMG");
shouldBe("new Image().height", "0");
shouldBe("new Image().width", "0");
+shouldBe("new Image(0).width", "0");
+shouldBe("new Image(0, 0).height", "0");
shouldBe("new Image(100).width", "100");
shouldBe("new Image(100, 200).height", "200");
shouldBe("new Image(-100).width", "-100");
shouldBe("new Image(-100, -200).height", "-200");
+shouldBe("new Image().hasAttribute('height')", "false");
+shouldBe("new Image().hasAttribute('width')", "false");
+shouldBe("new Image(0).hasAttribute('height')", "false");
+shouldBe("new Image(0).hasAttribute('width')", "true");
+shouldBe("new Image(0, 0).hasAttribute('height')", "true");
+shouldBe("new Image(0, 0).hasAttribute('width')", "true");
+
shouldBeEqualToString("new Image().outerHTML","<img>");
// FIXME: shouldBeEqualToString strips quotes from the string.
shouldBeEqualToString("new Image(100, 100).outerHTML.replace(/\"/g, \"'\")", "<img width='100' height='100'>");
« no previous file with comments | « LayoutTests/fast/js/custom-constructors-expected.txt ('k') | Source/core/html/HTMLImageElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698