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

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

Issue 10703040: Revert 144610 (speculative; possibly caused http://crbug.com/135059) (Closed) Base URL: svn://svn.chromium.org/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/common/automation_messages_internal.h ('k') | chrome/test/functional/test_pyauto.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/test/automation/browser_proxy.h" 5 #include "chrome/test/automation/browser_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 return result; 421 return result;
422 } 422 }
423 423
424 bool BrowserProxy::SendJSONRequest(const std::string& request, 424 bool BrowserProxy::SendJSONRequest(const std::string& request,
425 int timeout_ms, 425 int timeout_ms,
426 std::string* response) { 426 std::string* response) {
427 if (!is_valid()) 427 if (!is_valid())
428 return false; 428 return false;
429 429
430 bool result = false; 430 bool result = false;
431 if (!sender_->Send( 431 if (!sender_->Send(new AutomationMsg_SendJSONRequest(handle_,
432 new AutomationMsg_SendJSONRequestWithBrowserHandle(handle_, 432 request,
433 request, 433 response,
434 response, 434 &result),
435 &result), 435 timeout_ms))
436 timeout_ms))
437 return false; 436 return false;
438 return result; 437 return result;
439 } 438 }
440 439
441 bool BrowserProxy::GetInitialLoadTimes(int timeout_ms, 440 bool BrowserProxy::GetInitialLoadTimes(int timeout_ms,
442 float* min_start_time, 441 float* min_start_time,
443 float* max_stop_time, 442 float* max_stop_time,
444 std::vector<float>* stop_times) { 443 std::vector<float>* stop_times) {
445 std::string json_response; 444 std::string json_response;
446 const char* kJSONCommand = "{\"command\": \"GetInitialLoadTimes\"}"; 445 const char* kJSONCommand = "{\"command\": \"GetInitialLoadTimes\"}";
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 if (i == 0) 489 if (i == 0)
491 *min_start_time = start_ms; 490 *min_start_time = start_ms;
492 491
493 *min_start_time = std::min(start_ms, *min_start_time); 492 *min_start_time = std::min(start_ms, *min_start_time);
494 *max_stop_time = std::max(stop_ms, *max_stop_time); 493 *max_stop_time = std::max(stop_ms, *max_stop_time);
495 stop_times->push_back(stop_ms); 494 stop_times->push_back(stop_ms);
496 } 495 }
497 std::sort(stop_times->begin(), stop_times->end()); 496 std::sort(stop_times->begin(), stop_times->end());
498 return true; 497 return true;
499 } 498 }
OLDNEW
« no previous file with comments | « chrome/common/automation_messages_internal.h ('k') | chrome/test/functional/test_pyauto.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698