| OLD | NEW |
| 1 <script> | 1 <script> |
| 2 var isToolstrip = 1; | 2 var isToolstrip = 1; |
| 3 // This function is called from the C++ browser test. It does a basic sanity | 3 // This function is called from the C++ browser test. It does a basic sanity |
| 4 // test that we can call extension APIs. | 4 // test that we can call extension APIs. |
| 5 function testTabsAPI() { | 5 function testTabsAPI() { |
| 6 console.log(chrome.tabs); | 6 console.log(chrome.tabs); |
| 7 | 7 |
| 8 chrome.tabs.getAllInWindow(null, function(tabs) { | 8 chrome.tabs.getAllInWindow(null, function(tabs) { |
| 9 window.domAutomationController.send(tabs.length == 1); | 9 window.domAutomationController.send(tabs.length == 1); |
| 10 }); | 10 }); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // This function is called from the C++ browser test. It tests the | 32 // This function is called from the C++ browser test. It tests the |
| 33 // getBackgroundPage function to make sure it can be used as an extension API. | 33 // getBackgroundPage function to make sure it can be used as an extension API. |
| 34 // This will pass if getBackgroundPage returns background page view. | 34 // This will pass if getBackgroundPage returns background page view. |
| 35 function testgetBackgroundPageAPI() { | 35 function testgetBackgroundPageAPI() { |
| 36 var view = chrome.extension.getBackgroundPage(); | 36 var view = chrome.extension.getBackgroundPage(); |
| 37 window.domAutomationController.send(view != null && | 37 window.domAutomationController.send(view != null && |
| 38 view.isBackgroundPage == 1); | 38 view.isBackgroundPage == 1); |
| 39 } | 39 } |
| 40 | 40 |
| 41 // This function is called from the C++ browser test. It tests the | 41 // This function is called from the C++ browser test. It tests the |
| 42 // getTabContentses function to make sure it can be used as an extension API. | 42 // getExtensionTabs function to make sure it can be used as an extension API. |
| 43 // This will pass if getTabContentses returns tabcontent view. | 43 // This will pass if getExtensionTabs returns tabcontent view. |
| 44 function testgetTabContentsesAPI() { | 44 function testgetExtensionTabsAPI() { |
| 45 var views = chrome.extension.getTabContentses(); | 45 var views = chrome.extension.getExtensionTabs(); |
| 46 // getTabContentses is here for backwards compatibility |
| 47 var views2 = chrome.extension.getTabContentses(); |
| 46 window.domAutomationController.send(views.length == 1 && | 48 window.domAutomationController.send(views.length == 1 && |
| 47 views[0].isTabContents == 1); | 49 views[0].isTabContents == 1 && |
| 50 views2.length == 1 && |
| 51 views2[0].isTabContents == 1); |
| 48 } | 52 } |
| 49 | 53 |
| 50 </script> | 54 </script> |
| 51 <select> | 55 <select> |
| 52 <option>one</option> | 56 <option>one</option> |
| 53 <option>two</option> | 57 <option>two</option> |
| 54 <option>three</option> | 58 <option>three</option> |
| 55 </select> | 59 </select> |
| OLD | NEW |