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