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

Unified Diff: chrome/test/data/extensions/content_capabilities/capability_tests.js

Issue 2028833002: [Extensions] Expand capabilities to about:blank iframes within a page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 7 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: chrome/test/data/extensions/content_capabilities/capability_tests.js
diff --git a/chrome/test/data/extensions/content_capabilities/capability_tests.js b/chrome/test/data/extensions/content_capabilities/capability_tests.js
index 65eb20ee903e25099702773f6130e4c65e330717..970a06cef6e69e418f3d1234fb30fa57ca7978a6 100644
--- a/chrome/test/data/extensions/content_capabilities/capability_tests.js
+++ b/chrome/test/data/extensions/content_capabilities/capability_tests.js
@@ -4,6 +4,8 @@
(function() {
+var getIframe = function() { return document.querySelector('iframe'); };
+
window.tests = {
canReadClipboard: function() {
domAutomationController.send(document.execCommand('paste'));
@@ -12,6 +14,16 @@ window.tests = {
canWriteClipboard: function() {
domAutomationController.send(document.execCommand('copy'));
},
+
+ canReadClipboardInAboutBlankFrame: function() {
+ domAutomationController.send(
+ getIframe().contentDocument.execCommand('paste'));
+ },
+
+ canWriteClipboardInAboutBlankFrame: function() {
+ domAutomationController.send(
+ getIframe().contentDocument.execCommand('copy'));
+ },
};
}());

Powered by Google App Engine
This is Rietveld 408576698