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

Unified Diff: LayoutTests/http/tests/security/canvas-read-blocked-by-setting.html

Issue 1257253004: [HTMLCanvasElement.toBlob] Default callback version without scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes based on second code reviews 2 Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/security/canvas-read-blocked-by-setting.html
diff --git a/LayoutTests/http/tests/security/canvas-read-blocked-by-setting.html b/LayoutTests/http/tests/security/canvas-read-blocked-by-setting.html
index 592f408fbfd93589b94f9a63bad0e23d89b5b799..81ca5710cc2ed9418be61b1fa533181cf13ba595 100644
--- a/LayoutTests/http/tests/security/canvas-read-blocked-by-setting.html
+++ b/LayoutTests/http/tests/security/canvas-read-blocked-by-setting.html
@@ -49,4 +49,14 @@ test(function () {
assert_unreached('toDataURL should throw');
});
}, 'toDataURL');
+
+test(function () {
xlai (Olivia) 2015/08/21 18:40:06 security error test for toBlob function added; thi
+ assert_throws(
+ "SecurityError",
+ function() {
+ context.drawImage(image, 0, 0, 100, 100);
+ canvas.toBlob(function(blob){});
+ assert_unreached('toBlob should throw');
+ });
+}, 'toBlob');
</script>

Powered by Google App Engine
This is Rietveld 408576698