Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: chrome/test/data/extensions/api_test/window_update/sizing/test.js

Issue 8775046: Convert another batch of extension tests to manifest_version 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/extensions/api_test/window_update/sizing/test.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 pass = chrome.test.callbackPass;
6
7 var finalTop = 400;
8 var finalLeft = 10;
9 var finalWidth = 476
10 var finalHeight = 301;
11
12 var chromeWindow = null;
13
14 function checkTop(currentWindow) {
15 chrome.test.assertEq(finalTop, currentWindow.top);
16 }
17
18 function checkHeightAndContinue(currentWindow) {
19 chrome.test.assertEq(finalHeight, currentWindow.height);
20 chrome.windows.update(
21 currentWindow.id, { 'top': finalTop },
22 pass(checkTop)
23 );
24 }
25
26 function checkWidthAndContinue(currentWindow) {
27 chrome.test.assertEq(finalWidth, currentWindow.width);
28 chrome.windows.update(
29 currentWindow.id, { 'height': finalHeight },
30 pass(checkHeightAndContinue)
31 );
32 }
33
34 function checkLeftAndContinue(currentWindow) {
35 chrome.test.assertEq(finalLeft, currentWindow.left);
36 chrome.windows.update(
37 currentWindow.id, { 'width': finalWidth },
38 pass(checkWidthAndContinue)
39 );
40 }
41
42 function updateLeftAndContinue(tab) {
43 chrome.windows.update(
44 chromeWindow.id, { 'left': finalLeft},
45 pass(checkLeftAndContinue)
46 );
47 }
48
49 chrome.test.runTests([
50 function setResizeWindow() {
51 chrome.windows.getCurrent(
52 pass(function(currentWindow) {
53 chromeWindow = currentWindow;
54 chrome.tabs.create(
55 { 'windowId': currentWindow.id, 'url': 'blank.html' },
56 pass(updateLeftAndContinue)
57 );
58 }));
59 },
60 ]);
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/window_update/sizing/test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698