OLD | NEW |
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 Loading... |
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> |
OLD | NEW |