Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / test / data / extensions / api_test / tabs / current_window / background.js
blob925c67d358de8c782a29ec59b3580e6d726dfa22
1 // Copyright (c) 2012 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.
5 chrome.test.runTests([
6 function getSelectedPopup() {
7 chrome.windows.create(
8 {type: 'popup', url: 'about:blank', focused: true},
9 chrome.test.callbackPass(function(win) {
10 chrome.tabs.query(
11 {active: true, windowId: chrome.windows.WINDOW_ID_CURRENT},
12 chrome.test.callbackPass(function(tabs) {
13 chrome.test.assertEq(1, tabs.length);
14 chrome.test.assertTrue(tabs[0].windowId == win.id);
15 chrome.test.assertFalse(tabs[0].id == chrome.tabs.TAB_ID_NONE);
16 }));
17 }));
19 ]);