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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked.html

Issue 1573173002: Make WebGL's texImage2D and texSubImage2D handle cross-origin ImageBitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add validateImageBitmap helper function & a layout test 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="/js-test-resources/js-test.js"></script>
5 <script>
6 description("WebGL's texImage2D should throw security error when the ImageBitmap is not origin clean.");
Justin Novosad 2016/01/11 21:08:53 Nit: "throw security error" -> "throw a SecurityEr
xidachen 2016/01/12 02:35:50 Acknowledged.
7
8 window.jsTestIsAsync = true;
9 var gl;
10 var bitmap;
11
12 var image = document.createElement('img');
13 image.src = 'http://localhost:8080/security/resources/abe.png';
14
15 image.addEventListener('load', function() {
16 var canvas = document.createElement("canvas");
17 canvas.width = 10;
18 canvas.height = 10;
19
20 gl = canvas.getContext("webgl");
21 createImageBitmap(image, 0, 0, 10, 10).then(imageBitmap => {
22 bitmap = imageBitmap;
23 shouldThrow("gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGN ED_BYTE, bitmap)");
Justin Novosad 2016/01/11 21:08:53 I think you should make a call to texImage2D that
xidachen 2016/01/12 02:35:50 Acknowledged.
24 finishJSTest();
25 }, () => {
26 testFailed("Unexpected failure");
27 finishJSTest();
28 });
29 });
30 </script>
31 </body>
32 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/webgl-cross-origin-ImageBitmap-blocked-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698