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

Side by Side Diff: LayoutTests/http/tests/security/cross-origin-createImageBitmap.html

Issue 23548041: Improve createImageBitmap SecurityError exception messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/cross-origin-createImageBitmap-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-pre.js"></script>
5 <script>
6 description("The image bitmap factories should throw exceptions on cross -origin access.");
7
8 window.jsTestIsAsync = true;
9
10 var img = document.createElement('img');
11 document.body.appendChild(img);
12 img.src = 'http://localhost:8080/security/resources/abe.png';
13
14 shouldThrow('createImageBitmap(img, 0, 0, 10, 10)', '"SecurityError: Fai led to execute \'createImageBitmap\' on \'ImageBitmapFactories\': cross-origin a ccess to the source image is denied."');
15
16 var vid = document.createElement('video');
17 vid.src = 'http://localhost:8080/media/resources/load-video.php?name=tes t.ogv&amp;type=video/ogv';
18 vid.addEventListener('playing', function () {
19 shouldThrow('createImageBitmap(vid, 0, 0, 10, 10)', '"SecurityError: Failed to execute \'createImageBitmap\' on \'ImageBitmapFactories\': cross-orig in access to the source video is denied."');
20 finishJSTest();
21 });
22 document.body.appendChild(vid);
23 vid.play();
24 </script>
25 <script src="/js-test-resources/js-test-post.js"></script>
26 </body>
27 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/cross-origin-createImageBitmap-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698