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.
5 var pass = chrome.test.callbackPass;
12 var chromeWindow = null;
14 function checkDimensions(currentWindow) {
15 chrome.test.assertEq(previousTop, currentWindow.top);
16 chrome.test.assertEq(left, currentWindow.left);
17 chrome.test.assertEq(width, currentWindow.width);
18 chrome.test.assertEq(height, currentWindow.height);
21 function setFocus(tab) {
22 previousTop = chromeWindow.top;
23 left = chromeWindow.left;
24 width = chromeWindow.width;
25 height = chromeWindow.height;
27 chrome.windows.update(
28 chromeWindow.id, { 'focused': true },
33 chrome.test.runTests([
34 function setFocusWithNoResize() {
35 chrome.windows.getCurrent(
36 pass(function(currentWindow) {
37 chromeWindow = currentWindow;
39 { 'windowId': currentWindow.id, 'url': 'blank.html' },