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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/webgl/invalid-UTF-16.html

Issue 1601093008: Remove duplicated WebGL layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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 <script>
8 if (window.initNonKhronosFramework) {
9 window.initNonKhronosFramework(false);
10 }
11 </script>
12 <script>
13 description('This test verifies that the internal conversion from UTF16 to UTF8 is robust to invalid inputs. Any DOM entry point which converts an incoming stri ng to UTF8 could be used for this test.');
14
15 var array = [];
16 array.push(String.fromCharCode(0x48)); // H
17 array.push(String.fromCharCode(0x69)); // i
18 array.push(String.fromCharCode(0xd87e)); // Bogus
19 var string = array.join('');
20
21 // In order to make this test not depend on WebGL, the following were
22 // attempted:
23 // - Send a string to console.log
24 // - Submit a mailto: form containing a text input with the bogus
25 // string
26 // The first code path does not perform a utf8 conversion of the
27 // incoming string unless Console::shouldPrintExceptions() returns
28 // true. The second seems to sanitize the form's input before
29 // converting it to a UTF8 string.
30
31 var gl = create3DContext(null);
32 var program = gl.createProgram();
33 gl.bindAttribLocation(program, 0, string);
34 testPassed("bindAttribLocation with invalid UTF-16 did not crash");
35 </script>
36 </body>
37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698