| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var assertEq = chrome.test.assertEq; | 5 var assertEq = chrome.test.assertEq; |
| 6 var assertFalse = chrome.test.assertFalse; | 6 var assertFalse = chrome.test.assertFalse; |
| 7 var assertTrue = chrome.test.assertTrue; | 7 var assertTrue = chrome.test.assertTrue; |
| 8 var callbackFail = chrome.test.callbackFail; | 8 var callbackFail = chrome.test.callbackFail; |
| 9 var callbackPass = chrome.test.callbackPass; | 9 var callbackPass = chrome.test.callbackPass; |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 assertTrue(canXhr(tab.url)); | 49 assertTrue(canXhr(tab.url)); |
| 50 | 50 |
| 51 chrome.automation.getTree(callbackPass(function(rootNode) { | 51 chrome.automation.getTree(callbackPass(function(rootNode) { |
| 52 assertFalse(rootNode == undefined); | 52 assertFalse(rootNode == undefined); |
| 53 assertEq(RoleType.rootWebArea, rootNode.role); | 53 assertEq(RoleType.rootWebArea, rootNode.role); |
| 54 })); | 54 })); |
| 55 }); | 55 }); |
| 56 | 56 |
| 57 chrome.webNavigation.onCompleted.addListener(function(details) { | 57 chrome.webNavigation.onCompleted.addListener(function(details) { |
| 58 chrome.tabs.executeScript({ code: 'true' }, callbackFail( | 58 chrome.tabs.executeScript({ code: 'true' }, callbackFail( |
| 59 'Cannot access contents of url "' + details.url + | 59 'Cannot access contents of the page. ' + |
| 60 '". Extension manifest must request permission to access this host.')); | 60 'Extension manifest must request permission to access the ' + |
| 61 'respective host.')); |
| 61 | 62 |
| 62 chrome.automation.getTree(callbackFail( | 63 chrome.automation.getTree(callbackFail( |
| 63 'Cannot request automation tree on url "' + details.url + | 64 'Cannot request automation tree on url "' + details.url + |
| 64 '". Extension manifest must request permission to access this host.')); | 65 '". Extension manifest must request permission to access this host.')); |
| 65 | 66 |
| 66 assertFalse(canXhr(details.url)); | 67 assertFalse(canXhr(details.url)); |
| 67 }); | 68 }); |
| OLD | NEW |