- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / tabs / current_window / background.js
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.
4
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       }));
16     }));
17   }
18 ]);