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

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

Issue 1530002: Move history API out of experimental. Allow extensions to override history page. (Closed)
Patch Set: Rebase for commit. Created 10 years, 8 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 <script> 1 <script>
2 // All of these tests should pass, since this extension has requested all of the 2 // All of the calls to chrome.* functions should succeed, since this extension
3 // 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() {
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.getProcessForTab(
15 tab.id, pass(function(process) {}));
16 } catch (e) {
17 chrome.test.fail();
18 }
19 });
20 },
21
8 function history() { 22 function history() {
9 try { 23 try {
10 var query = { 'text': '', 'maxResults': 1 }; 24 var query = { 'text': '', 'maxResults': 1 };
11 chrome.experimental.history.search(query, pass(function(results) {})); 25 chrome.history.search(query, pass(function(results) {}));
12 } catch (e) { 26 } catch (e) {
13 chrome.test.fail(); 27 chrome.test.fail();
14 } 28 }
15 }, 29 },
16 30
17 function bookmarks() { 31 function bookmarks() {
18 try { 32 try {
19 chrome.bookmarks.get("1", pass(function(results) {})); 33 chrome.bookmarks.get("1", pass(function(results) {}));
20 } catch (e) { 34 } catch (e) {
21 chrome.test.fail(); 35 chrome.test.fail();
22 } 36 }
23 }, 37 },
24 38
25 function tabs() { 39 function tabs() {
26 try { 40 try {
27 chrome.tabs.getSelected(null, pass(function(results) {})); 41 chrome.tabs.getSelected(null, pass(function(results) {}));
28 } catch (e) { 42 } catch (e) {
29 chrome.test.fail(); 43 chrome.test.fail();
30 } 44 }
31 } 45 }
32 ]); 46 ]);
33 </script> 47 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698