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

Unified Diff: LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js

Issue 1249913003: The contextId argument for HTMLCanvasElement getContext() api should not be optional (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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: LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js
diff --git a/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js b/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js
index 5eb07bdf4325fb22ffcb8deaf9b32396ced360dc..3d125ade216823ae6125efdc6a024eec63c61523 100644
--- a/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js
+++ b/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js
@@ -172,6 +172,11 @@ function createHTMLTableRowElement()
return row;
}
+function createCanvasElement()
+{
+ return document.createElement("canvas");
+}
+
// CharacterData
shouldBe("nonNumericPolicy('document.createTextNode(\"a\").substringData(x, 0)')", "'any type allowed'");
@@ -255,6 +260,10 @@ shouldBe("nonNumericPolicy('createHTMLTableSectionElement().deleteRow(x)')", "'a
shouldBe("nonNumericPolicy('document.createElement(\"textarea\").setSelectionRange(x, 0)')", "'any type allowed'");
shouldBe("nonNumericPolicy('document.createElement(\"textarea\").setSelectionRange(0, x)')", "'any type allowed'");
+// HTMLCanvasElement
+
+shouldBe("nonNumericPolicy('createCanvasElement().getContext(x)')", "'any type allowed (but not omitted)'");
+
// KeyboardEvent
shouldBe("nonNumericPolicy('document.createEvent(\"KeyboardEvent\").initKeyboardEvent(\"a\", false, false, null, \"b\", x, false, false, false, false, false)')", "'any type allowed'");
« no previous file with comments | « LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt ('k') | Source/core/html/HTMLCanvasElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698