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