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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/offscreen-canvas-read-blocked-by-setting.html

Issue 2171563002: Add WorkerSettings to expose certain flag values in WorkerGlobalScope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Worker test Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/offscreen-canvas-worker-read-blocked-by-setting.html » ('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 <title>Block reading offscreen canvas via StrictCanvasTainting setting</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script>
6 if (window.testRunner)
7 testRunner.overridePreference("WebKitDisableReadingFromCanvas", true);
8
9 var image = new Image();
10 var offCanvas = new OffscreenCanvas(100, 100);
11 var context = offCanvas.getContext('2d');
12
13 test(function () {
14 assert_throws(
15 "SecurityError",
16 function() {
17 var imageData = context.getImageData(0, 0, 100, 100);
Justin Novosad 2016/07/21 17:27:38 should also test toDataURL and toBlob
xlai (Olivia) 2016/07/21 17:56:49 But toDataURL and toBlob have not been implemented
18 assert_unreached('getImageData should throw');
19 });
20 }, 'getImageData');
21
22 test(function () {
23 assert_throws(
24 "SecurityError",
25 function() {
26 context.drawImage(image, 0, 0, 100, 100);
27 var imageData = context.getImageData(0, 0, 100, 100);
28 assert_unreached('getImageData should throw');
29 });
30 }, 'getImageData');
31
32 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/offscreen-canvas-worker-read-blocked-by-setting.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698