OLD | NEW |
1 <script> | 1 <!-- |
2 // All of the calls to chrome.* functions should succeed, since this extension | 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this |
3 // has requested all required permissions. | 3 * source code is governed by a BSD-style license that can be found in the |
4 | 4 * LICENSE file. |
5 var pass = chrome.test.callbackPass; | 5 --> |
6 | 6 <script src="background.js"></script> |
7 chrome.test.runTests([ | |
8 function experimental() { | |
9 // Test that use of an experimental API works. | |
10 // If/when chrome.experimental.processes is moved out of | |
11 // experimental, this test needs to be updated. | |
12 chrome.tabs.getSelected(null, function(tab) { | |
13 try { | |
14 chrome.experimental.processes.getProcessIdForTab( | |
15 tab.id, pass(function(pid) {})); | |
16 } catch (e) { | |
17 chrome.test.fail(); | |
18 } | |
19 }); | |
20 }, | |
21 | |
22 function history() { | |
23 try { | |
24 var query = { 'text': '', 'maxResults': 1 }; | |
25 chrome.history.search(query, pass(function(results) {})); | |
26 } catch (e) { | |
27 chrome.test.fail(); | |
28 } | |
29 }, | |
30 | |
31 function bookmarks() { | |
32 try { | |
33 chrome.bookmarks.get("1", pass(function(results) {})); | |
34 } catch (e) { | |
35 chrome.test.fail(); | |
36 } | |
37 }, | |
38 | |
39 function tabs() { | |
40 try { | |
41 chrome.tabs.getSelected(null, pass(function(results) {})); | |
42 } catch (e) { | |
43 chrome.test.fail(); | |
44 } | |
45 } | |
46 ]); | |
47 </script> | |
OLD | NEW |