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

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

Issue 3597016: Expands the chrome.experimental.processes extension API.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
1 <script> 1 <script>
2 // All of the calls to chrome.* functions should succeed, since this extension 2 // All of the calls to chrome.* functions should succeed, since this extension
3 // has requested all required permissions. 3 // has requested all required permissions.
4 4
5 var pass = chrome.test.callbackPass; 5 var pass = chrome.test.callbackPass;
6 6
7 chrome.test.runTests([ 7 chrome.test.runTests([
8 function experimental() { 8 function experimental() {
9 // Test that use of an experimental API works. 9 // Test that use of an experimental API works.
10 // If/when chrome.experimental.processes is moved out of 10 // If/when chrome.experimental.processes is moved out of
11 // experimental, this test needs to be updated. 11 // experimental, this test needs to be updated.
12 chrome.tabs.getSelected(null, function(tab) { 12 chrome.tabs.getSelected(null, function(tab) {
13 try { 13 try {
14 chrome.experimental.processes.getProcessForTab( 14 chrome.experimental.processes.getProcessIdForTab(
15 tab.id, pass(function(process) {})); 15 tab.id, pass(function(pid) {}));
16 } catch (e) { 16 } catch (e) {
17 chrome.test.fail(); 17 chrome.test.fail();
18 } 18 }
19 }); 19 });
20 }, 20 },
21 21
22 function history() { 22 function history() {
23 try { 23 try {
24 var query = { 'text': '', 'maxResults': 1 }; 24 var query = { 'text': '', 'maxResults': 1 };
25 chrome.history.search(query, pass(function(results) {})); 25 chrome.history.search(query, pass(function(results) {}));
(...skipping 12 matching lines...) Expand all
38 38
39 function tabs() { 39 function tabs() {
40 try { 40 try {
41 chrome.tabs.getSelected(null, pass(function(results) {})); 41 chrome.tabs.getSelected(null, pass(function(results) {}));
42 } catch (e) { 42 } catch (e) {
43 chrome.test.fail(); 43 chrome.test.fail();
44 } 44 }
45 } 45 }
46 ]); 46 ]);
47 </script> 47 </script>
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/samples.json ('k') | chrome/test/data/extensions/api_test/processes/a.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698