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

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

Issue 22584002: Move processes API to dev channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased again Created 7 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 // All of the calls to chrome.* functions should succeed, since this extension 5 // All of the calls to chrome.* functions should succeed, since this extension
6 // has requested all required permissions. 6 // has requested all required permissions.
7 7
8 var pass = chrome.test.callbackPass; 8 var pass = chrome.test.callbackPass;
9 9
10 chrome.test.runTests([ 10 chrome.test.runTests([
11 function experimental() { 11 function experimental() {
12 // Test that use of an experimental API works. 12 // Test that use of an experimental API works.
13 // If/when chrome.experimental.processes is moved out of 13 // If/when chrome.experimental.accessibility is moved out of
14 // experimental, this test needs to be updated. 14 // experimental, this test needs to be updated.
15 chrome.tabs.getSelected(null, function(tab) { 15 chrome.tabs.getSelected(null, function(tab) {
16 try { 16 try {
17 chrome.experimental.processes.getProcessIdForTab( 17 chrome.experimental.accessibility.getAlertsForTab(
18 tab.id, pass(function(pid) {})); 18 tab.id, pass(function(alerts) {}));
19 } catch (e) { 19 } catch (e) {
20 chrome.test.fail(); 20 chrome.test.fail();
21 } 21 }
22 }); 22 });
23 }, 23 },
24 24
25 function history() { 25 function history() {
26 try { 26 try {
27 var query = { 'text': '', 'maxResults': 1 }; 27 var query = { 'text': '', 'maxResults': 1 };
28 chrome.history.search(query, pass(function(results) {})); 28 chrome.history.search(query, pass(function(results) {}));
(...skipping 11 matching lines...) Expand all
40 }, 40 },
41 41
42 function tabs() { 42 function tabs() {
43 try { 43 try {
44 chrome.tabs.getSelected(null, pass(function(results) {})); 44 chrome.tabs.getSelected(null, pass(function(results) {}));
45 } catch (e) { 45 } catch (e) {
46 chrome.test.fail(); 46 chrome.test.fail();
47 } 47 }
48 } 48 }
49 ]); 49 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698