Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(737)

Side by Side Diff: chrome/test/data/extensions/good/Extensions/behllobkkfkfnphdnhnkndlbkcpglgmj/1.0.0.0/toolstrip1.html

Issue 3129003: remove toolstrips (Closed)
Patch Set: merge Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <script>
2 var isToolstrip = 1;
3 // This function is called from the C++ browser test. It does a basic sanity
4 // test that we can call extension APIs.
5 function testTabsAPI() {
6 console.log(chrome.tabs);
7
8 chrome.tabs.getAllInWindow(null, function(tabs) {
9 window.domAutomationController.send(tabs.length == 1);
10 });
11 }
12
13 // This function is called from the C++ browser test. It tests the getLanguage
14 // function to make sure it can be used as an extension API. This will pass if
15 // the browser navigates to a page in French language before this is called.
16 function testTabsLanguageAPI() {
17 chrome.tabs.detectLanguage(null, function(language) {
18 window.domAutomationController.send(language == 'fr');
19 });
20 }
21
22 // This function is called from the C++ browser test. It tests the getToolstrips
23 // function to make sure it can be used as an extension API. This will pass if
24 // getToolstrips returns all toolstrip views.
25 function testgetToolstripsAPI() {
26 var views = chrome.extension.getToolstrips();
27 window.domAutomationController.send(views.length == 2 &&
28 views[0].isToolstrip == 1 &&
29 views[1].isToolstrip == 1);
30 }
31
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.
34 // This will pass if getBackgroundPage returns background page view.
35 function testgetBackgroundPageAPI() {
36 var view = chrome.extension.getBackgroundPage();
37 window.domAutomationController.send(view != null &&
38 view.isBackgroundPage == 1);
39 }
40
41 // This function is called from the C++ browser test. It tests the
42 // getExtensionTabs function to make sure it can be used as an extension API.
43 // This will pass if getExtensionTabs returns tabcontent view.
44 function testgetExtensionTabsAPI() {
45 var views = chrome.extension.getExtensionTabs();
46 // getTabContentses is here for backwards compatibility
47 var views2 = chrome.extension.getTabContentses();
48 window.domAutomationController.send(views.length == 1 &&
49 views[0].isTabContents == 1 &&
50 views2.length == 1 &&
51 views2[0].isTabContents == 1);
52 }
53
54 </script>
55 <select>
56 <option>one</option>
57 <option>two</option>
58 <option>three</option>
59 </select>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698