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

Side by Side 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, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function() { 5 (function() {
6 6
7 var getIframe = function() { return document.querySelector('iframe'); };
8
7 window.tests = { 9 window.tests = {
8 canReadClipboard: function() { 10 canReadClipboard: function() {
9 domAutomationController.send(document.execCommand('paste')); 11 domAutomationController.send(document.execCommand('paste'));
10 }, 12 },
11 13
12 canWriteClipboard: function() { 14 canWriteClipboard: function() {
13 domAutomationController.send(document.execCommand('copy')); 15 domAutomationController.send(document.execCommand('copy'));
14 }, 16 },
17
18 canReadClipboardInAboutBlankFrame: function() {
19 domAutomationController.send(
20 getIframe().contentDocument.execCommand('paste'));
21 },
22
23 canWriteClipboardInAboutBlankFrame: function() {
24 domAutomationController.send(
25 getIframe().contentDocument.execCommand('copy'));
26 },
15 }; 27 };
16 28
17 }()); 29 }());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698