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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/webgl/array-set-out-of-bounds.html

Issue 2447493002: Removed some duplicate layout tests under fast/canvas/webgl (Closed)
Patch Set: Created 4 years, 2 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
(Empty)
1 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 <script src="resources/webgl-test.js"></script>
5 </head>
6 <body>
7 <div id="description"></div>
8 <div id="console"></div>
9
10 <script>
11
12 description("Verifies that attempting to set out-of-bounds elements of a WebGLAr ray from a JavaScript array throws an exception");
13
14 debug('Regression test for <a href="https://bugs.webkit.org/show_bug.cgi?id=3335 2">https://bugs.webkit.org/show_bug.cgi?id=33352</a> : <code>Passing array that is too large to set method of WebGLArrays does not throw an exception</code>');
15
16 // Global scope so shouldThrow can see it
17 var webGLArray;
18
19 function negativeTestSet(typeName) {
20 var type = window[typeName];
21 webGLArray = new type([2, 3]);
22 debug('Testing ' + typeName);
23 shouldThrow("webGLArray.set([4, 5], 1)");
24 shouldThrow("webGLArray.set([4, 5, 6])");
25 }
26
27 negativeTestSet("Int8Array");
28 negativeTestSet("Uint8Array");
29 negativeTestSet("Int16Array");
30 negativeTestSet("Uint16Array");
31 negativeTestSet("Int32Array");
32 negativeTestSet("Uint32Array");
33 negativeTestSet("Float32Array");
34
35 </script>
36
37 </body>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698