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

Side by Side Diff: chrome/test/data/extensions/api_test/tabs/on_removed/tabs_util.js

Issue 8762014: Move another set 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
OLDNEW
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
1 // Utility functions to help with tabs/windows testing. 5 // Utility functions to help with tabs/windows testing.
2 6
3 // Removes current windows and creates one window with tabs set to 7 // Removes current windows and creates one window with tabs set to
4 // the urls in the array |tabUrls|. At least one url must be specified. 8 // the urls in the array |tabUrls|. At least one url must be specified.
5 // The |callback| should look like function(windowId, tabIds) {...}. 9 // The |callback| should look like function(windowId, tabIds) {...}.
6 function setupWindow(tabUrls, callback) { 10 function setupWindow(tabUrls, callback) {
7 createWindow(tabUrls, {}, function(winId, tabIds) { 11 createWindow(tabUrls, {}, function(winId, tabIds) {
8 // Remove all other windows. 12 // Remove all other windows.
9 var removedCount = 0; 13 var removedCount = 0;
10 chrome.windows.getAll({}, function(windows) { 14 chrome.windows.getAll({}, function(windows) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 65 }
62 if (ready) 66 if (ready)
63 callback(); 67 callback();
64 else 68 else
65 window.setTimeout(waitForTabs, 30); 69 window.setTimeout(waitForTabs, 30);
66 }); 70 });
67 } 71 }
68 waitForTabs(); 72 waitForTabs();
69 } 73 }
70 74
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698