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

Side by Side Diff: chrome/test/data/extensions/api_test/active_tab/background.js

Issue 10815028: Make ActiveTabPermissionManager also grant the tabs permission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var theOnlyTestDone = null;
6
7 function inject(callback) {
8 chrome.tabs.executeScript({ code: "true" }, callback);
9 }
10
11 chrome.browserAction.onClicked.addListener(function() {
12 inject(function() {
13 chrome.test.assertNoLastError();
14 chrome.test.notifyPass();
15 });
16 });
17
18 chrome.webNavigation.onCompleted.addListener(function(details) {
19 inject(function() {
20 chrome.test.assertLastError("Access to extension API denied.");
21 if (details.url.indexOf("final_page") >= 0)
22 theOnlyTestDone();
23 else
24 chrome.test.notifyPass();
25 });
26 });
27
28 chrome.test.runTests([
29 function theOnlyTest() {
30 // This will keep the test alive until the final callback is run.
31 theOnlyTestDone = chrome.test.callbackAdded();
32 }
33 ]);
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/apitest.js ('k') | chrome/test/data/extensions/api_test/active_tab/final_page.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698