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

Unified Diff: chrome/test/data/extensions/api_test/tabs/capture_visible_tab/test_nofile.js

Issue 140433003: tab capture: Change the permissions for tabs.captureVisibleTab(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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/tabs/capture_visible_tab/test_nofile.js
diff --git a/chrome/test/data/extensions/api_test/tabs/capture_visible_tab/test_nofile.js b/chrome/test/data/extensions/api_test/tabs/capture_visible_tab/test_nofile.js
deleted file mode 100644
index 56ccc5030269551524a41e6ead585aa9def22481..0000000000000000000000000000000000000000
--- a/chrome/test/data/extensions/api_test/tabs/capture_visible_tab/test_nofile.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// API test for chrome.tabs.captureVisibleTab(), capturing JPEG images.
-// browser_tests.exe --gtest_filter=ExtensionApiTest.CaptureVisibleNoFile
-
-var pass = chrome.test.callbackPass;
-var fail = chrome.test.callbackFail;
-var assertEq = chrome.test.assertEq;
-var assertTrue = chrome.test.assertTrue;
-var assertFalse = chrome.test.assertFalse;
-
-var kWindowRect = {
- 'width': 400,
- 'height': 400
-};
-
-var fail_url = "file:///nosuch.html";
-
-chrome.test.runTests([
- // Check that test infrastructure launched us without permissions.
- function checkAllowedNoAccess() {
- chrome.extension.isAllowedFileSchemeAccess(pass(function(hasAccess) {
- assertFalse(hasAccess);
- }));
- },
-
- // Check for no permssions error.
- function captureVisibleNoFile() {
- createWindow([fail_url], kWindowRect, pass(function(winId, tabIds) {
- waitForAllTabs(pass(function() {
- chrome.tabs.getSelected(winId, pass(function(tab) {
- assertEq('complete', tab.status);
- chrome.tabs.captureVisibleTab(winId, fail(
- 'Cannot access contents of url "' + fail_url +
- '". Extension manifest must request permission ' +
- 'to access this host.'));
- }));
- }));
- }));
- }
-
-]);
« no previous file with comments | « chrome/test/data/extensions/api_test/tabs/capture_visible_tab/test_nofile.html ('k') | extensions/common/manifest_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698