| OLD | NEW |
| 1 <script> | 1 <script> |
| 2 // This function is called from the C++ browser test. It does a basic sanity | 2 // This function is called from the C++ browser test. It does a basic sanity |
| 3 // test that we can call extension APIs. | 3 // test that we can call extension APIs. |
| 4 function testTabsAPI() { | 4 function testTabsAPI() { |
| 5 console.log(chrome.tabs); | 5 console.log(chrome.tabs); |
| 6 | 6 |
| 7 chrome.tabs.getAllInWindow(null, function(tabs) { | 7 chrome.tabs.getAllInWindow(null, function(tabs) { |
| 8 window.domAutomationController.send(tabs.length == 1); | 8 window.domAutomationController.send(tabs.length == 1); |
| 9 }); | 9 }); |
| 10 } | 10 } |
| 11 |
| 12 // This function is called from the C++ browser test. It tests the getLanguage |
| 13 // function to make sure it can be used as an extension API. This will pass if |
| 14 // the browser navigates to a page in French language before this is called. |
| 15 function testTabsLanguageAPI() { |
| 16 chrome.tabs.getLanguage(null, function(language) { |
| 17 window.domAutomationController.send(language == 'FRENCH'); |
| 18 }); |
| 19 } |
| 20 |
| 11 </script> | 21 </script> |
| 12 <select> | 22 <select> |
| 13 <option>one</option> | 23 <option>one</option> |
| 14 <option>two</option> | 24 <option>two</option> |
| 15 <option>three</option> | 25 <option>three</option> |
| 16 </select> | 26 </select> |
| OLD | NEW |