OLD | NEW |
| 1 <!-- |
| 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this |
| 3 * source code is governed by a BSD-style license that can be found in the |
| 4 * LICENSE file. |
| 5 --> |
1 <script src="tabs_util.js"></script> | 6 <script src="tabs_util.js"></script> |
2 <script src="get_views_common.js"></script> | 7 <script src="get_views_common.js"></script> |
3 | 8 <script src="get_views_window.js"></script> |
4 <script> | |
5 | |
6 chrome.test.runTests([ | |
7 function canGetViewsOfEmptyWindow() { | |
8 testGetNewWindowView({type: "normal"}, []); | |
9 }, | |
10 | |
11 function canGetViewsOfWindowWithUrl() { | |
12 var URLS = ["a.html"]; | |
13 testGetNewWindowView({type: "normal", url: URLS}, URLS); | |
14 }, | |
15 | |
16 function canGetViewsOfWindowWithManyUrls() { | |
17 var URLS = ["a.html", "b.html", "c.html"]; | |
18 testGetNewWindowView({type: "normal", url: URLS}, URLS); | |
19 }, | |
20 | |
21 function canGetViewsOfDetatchedTab() { | |
22 // Start with a window holding two tabs. | |
23 chrome.windows.create({"url": ["a.html", "b.html"]}, function(win) { | |
24 // Detatch the first tab. See that the tab is findable with the new | |
25 // window ID. | |
26 testGetNewWindowView( | |
27 {type: "normal", tabId: win.tabs[0].id}, ["a.html"]); | |
28 }); | |
29 } | |
30 ]); | |
31 </script> | |
OLD | NEW |