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