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

Side by Side Diff: chrome/test/automation/automation_proxy.cc

Issue 10704129: Remove browser::FindTabbedBrowser call in ui test code. (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 | « chrome/test/automation/automation_proxy.h ('k') | chrome/test/perf/mach_ports_test.cc » ('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/test/automation/automation_proxy.h" 5 #include "chrome/test/automation/automation_proxy.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 324
325 scoped_refptr<BrowserProxy> AutomationProxy::GetBrowserWindow( 325 scoped_refptr<BrowserProxy> AutomationProxy::GetBrowserWindow(
326 int window_index) { 326 int window_index) {
327 int handle = 0; 327 int handle = 0;
328 if (!Send(new AutomationMsg_BrowserWindow(window_index, &handle))) 328 if (!Send(new AutomationMsg_BrowserWindow(window_index, &handle)))
329 return NULL; 329 return NULL;
330 330
331 return ProxyObjectFromHandle<BrowserProxy>(handle); 331 return ProxyObjectFromHandle<BrowserProxy>(handle);
332 } 332 }
333 333
334 scoped_refptr<BrowserProxy> AutomationProxy::FindTabbedBrowserWindow() {
335 int handle = 0;
336 if (!Send(new AutomationMsg_FindTabbedBrowserWindow(&handle)))
337 return NULL;
338
339 return ProxyObjectFromHandle<BrowserProxy>(handle);
340 }
341
342 IPC::SyncChannel* AutomationProxy::channel() { 334 IPC::SyncChannel* AutomationProxy::channel() {
343 return channel_.get(); 335 return channel_.get();
344 } 336 }
345 337
346 bool AutomationProxy::Send(IPC::Message* message) { 338 bool AutomationProxy::Send(IPC::Message* message) {
347 return Send(message, 339 return Send(message,
348 static_cast<int>(action_timeout_.InMilliseconds())); 340 static_cast<int>(action_timeout_.InMilliseconds()));
349 } 341 }
350 342
351 bool AutomationProxy::Send(IPC::Message* message, int timeout_ms) { 343 bool AutomationProxy::Send(IPC::Message* message, int timeout_ms) {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 } 472 }
481 473
482 bool AutomationProxy::SendJSONRequest(const std::string& request, 474 bool AutomationProxy::SendJSONRequest(const std::string& request,
483 int timeout_ms, 475 int timeout_ms,
484 std::string* response) { 476 std::string* response) {
485 bool result = false; 477 bool result = false;
486 if (!SendAutomationJSONRequest(this, request, timeout_ms, response, &result)) 478 if (!SendAutomationJSONRequest(this, request, timeout_ms, response, &result))
487 return false; 479 return false;
488 return result; 480 return result;
489 } 481 }
OLDNEW
« no previous file with comments | « chrome/test/automation/automation_proxy.h ('k') | chrome/test/perf/mach_ports_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698