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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10689149: Fix the pyauto test that I broke in r145946. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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 | « no previous file | chrome/test/functional/bookmarks.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 AutomationJSONReply(this, reply_message).SendError( 1213 AutomationJSONReply(this, reply_message).SendError(
1214 StringPrintf("Invalid profile path: %s", path.c_str())); 1214 StringPrintf("Invalid profile path: %s", path.c_str()));
1215 return; 1215 return;
1216 } 1216 }
1217 int num_loads; 1217 int num_loads;
1218 if (!args->GetInteger("num_loads", &num_loads)) { 1218 if (!args->GetInteger("num_loads", &num_loads)) {
1219 AutomationJSONReply(this, reply_message).SendError( 1219 AutomationJSONReply(this, reply_message).SendError(
1220 "Invalid or missing arg: 'num_loads'"); 1220 "Invalid or missing arg: 'num_loads'");
1221 return; 1221 return;
1222 } 1222 }
1223 new BrowserOpenedWithExistingProfileNotificationObserver( 1223 new BrowserOpenedWithExistingProfileNotificationObserver(
1224 this, reply_message, num_loads); 1224 this, reply_message, num_loads);
1225 ProfileManager::FindOrCreateNewWindowForProfile( 1225 ProfileManager::FindOrCreateNewWindowForProfile(
1226 profile, 1226 profile,
1227 chrome::startup::IS_NOT_PROCESS_STARTUP, 1227 chrome::startup::IS_NOT_PROCESS_STARTUP,
1228 chrome::startup::IS_NOT_FIRST_RUN, 1228 chrome::startup::IS_NOT_FIRST_RUN,
1229 0); 1229 0);
1230 } 1230 }
1231 1231
1232 void TestingAutomationProvider::GetWindowForBrowser(int browser_handle, 1232 void TestingAutomationProvider::GetWindowForBrowser(int browser_handle,
1233 bool* success, 1233 bool* success,
1234 int* handle) { 1234 int* handle) {
1235 *success = false; 1235 *success = false;
1236 *handle = 0; 1236 *handle = 0;
1237 1237
1238 if (browser_tracker_->ContainsHandle(browser_handle)) { 1238 if (browser_tracker_->ContainsHandle(browser_handle)) {
1239 Browser* browser = browser_tracker_->GetResource(browser_handle); 1239 Browser* browser = browser_tracker_->GetResource(browser_handle);
(...skipping 5510 matching lines...) Expand 10 before | Expand all | Expand 10 after
6750 void TestingAutomationProvider::OnRemoveProvider() { 6750 void TestingAutomationProvider::OnRemoveProvider() {
6751 if (g_browser_process) 6751 if (g_browser_process)
6752 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6752 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6753 } 6753 }
6754 6754
6755 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, 6755 void TestingAutomationProvider::EnsureTabSelected(Browser* browser,
6756 WebContents* tab) { 6756 WebContents* tab) {
6757 if (chrome::GetActiveWebContents(browser) != tab) 6757 if (chrome::GetActiveWebContents(browser) != tab)
6758 chrome::ActivateTabAt(browser, chrome::GetIndexOfTab(browser, tab), true); 6758 chrome::ActivateTabAt(browser, chrome::GetIndexOfTab(browser, tab), true);
6759 } 6759 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/functional/bookmarks.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698