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 var normalWindow, normalTab; |
| 6 |
| 7 var pass = chrome.test.callbackPass; |
| 8 var assertEq = chrome.test.assertEq; |
| 9 var assertTrue = chrome.test.assertTrue; |
| 10 |
| 11 chrome.test.runTests([ |
| 12 function getAllWindows() { |
| 13 // The test harness should have set us up with 2 windows: 1 incognito |
| 14 // and 1 regular. We should only see the regular one. |
| 15 chrome.windows.getAll({populate: true}, pass(function(windows) { |
| 16 assertEq(1, windows.length); |
| 17 normalWindow = windows[0]; |
| 18 assertTrue(!normalWindow.incognito); |
| 19 })); |
| 20 }, |
| 21 |
| 22 function tabEvents() { |
| 23 chrome.test.listenOnce(chrome.tabs.onCreated, function(tab) { |
| 24 assertTrue(!tab.incognito); |
| 25 }); |
| 26 |
| 27 chrome.test.createIncognitoTab("about:blank"); |
| 28 chrome.tabs.create({url: "about:blank"}, pass()); |
| 29 }, |
| 30 ]); |
OLD | NEW |