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

Side by Side Diff: LayoutTests/fast/canvas/script-tests/canvas-getContext-invalid.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 unified diff | Download patch
OLDNEW
1 description("Test that invalid canvas getContext() requests return null."); 1 description("Test that invalid canvas getContext() requests return null.");
2 2
3 canvas = document.createElement('canvas'); 3 canvas = document.createElement('canvas');
4 4
5 shouldBe("canvas.getContext('')", "null"); 5 shouldBe("canvas.getContext('')", "null");
6 shouldBe("canvas.getContext('2d#')", "null"); 6 shouldBe("canvas.getContext('2d#')", "null");
7 shouldBe("canvas.getContext('This is clearly not a valid context name.')", "null "); 7 shouldBe("canvas.getContext('This is clearly not a valid context name.')", "null ");
8 shouldBe("canvas.getContext('2d\0')", "null"); 8 shouldBe("canvas.getContext('2d\0')", "null");
9 shouldBe("canvas.getContext('2\uFF44')", "null"); 9 shouldBe("canvas.getContext('2\uFF44')", "null");
10 shouldBe("canvas.getContext('2D')", "null"); 10 shouldBe("canvas.getContext('2D')", "null");
11 shouldThrow("canvas.getContext()");
12 shouldBe("canvas.getContext('null')", "null");
13 shouldBe("canvas.getContext('undefined')", "null");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698