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

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..5b238ef7f7fb62ec28bdd600d8c6b4845ff1b6ba 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,12 @@ function createHTMLTableRowElement()
return row;
}
+function createCanvasElement()
+{
+ var canvas = document.createElement("canvas");
philipj_slow 2015/07/22 09:19:15 Just return document.createElement("canvas")
shiva.jm 2015/07/22 09:31:41 Done.
+ return canvas;
+}
+
// CharacterData
shouldBe("nonNumericPolicy('document.createTextNode(\"a\").substringData(x, 0)')", "'any type allowed'");
@@ -255,6 +261,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