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

Unified Diff: chrome/test/data/extensions/api_test/clipboard/extension/test.js

Issue 495213002: Add tests to make sure copy/paste in an about:blank iframe in a hosted app works. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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: chrome/test/data/extensions/api_test/clipboard/extension/test.js
diff --git a/chrome/test/data/extensions/api_test/clipboard/extension/test.js b/chrome/test/data/extensions/api_test/clipboard/extension/test.js
index 8432db7e2ab10bcc7c07459a16fd54de9b085463..4206d24e5b79453cdcbee5bb898e4845eb747340 100644
--- a/chrome/test/data/extensions/api_test/clipboard/extension/test.js
+++ b/chrome/test/data/extensions/api_test/clipboard/extension/test.js
@@ -17,6 +17,22 @@ chrome.test.runTests([
chrome.test.succeed();
else
chrome.test.fail('execCommand("paste") failed');
+ },
+ function copyInIframe() {
+ var ifr = document.createElement('iframe');
+ document.body.appendChild(ifr);
+ if (ifr.contentDocument.execCommand('copy'))
+ chrome.test.succeed();
+ else
+ chrome.test.fail('execCommand("copy") failed in iframe');
+ },
+ function pasteInIframe() {
+ var ifr = document.createElement('iframe');
+ document.body.appendChild(ifr);
+ if (ifr.contentDocument.execCommand('paste'))
+ chrome.test.succeed();
+ else
+ chrome.test.fail('execCommand("paste") failed in iframe');
not at google - send to devlin 2014/08/21 20:28:11 Another line-saver: I don't know why we don't do:
Marijn Kruisselbrink 2014/08/21 20:50:20 You'd still need chrome.test.succeed() or fail() t
}
]);

Powered by Google App Engine
This is Rietveld 408576698