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