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

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

Issue 7634031: Let pyauto create an attached webdriver instance to manipulate web pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forgot to re-add the previously added files Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 : mock_(mock) { 56 : mock_(mock) {
57 channel_id_ = AutomationProxy::GenerateChannelID(); 57 channel_id_ = AutomationProxy::GenerateChannelID();
58 } 58 }
59 59
60 AutomationProxy* CreateAutomationProxy(int execution_timeout) { 60 AutomationProxy* CreateAutomationProxy(int execution_timeout) {
61 *mock_ = new ExternalTabUITestMockClient(execution_timeout); 61 *mock_ = new ExternalTabUITestMockClient(execution_timeout);
62 (*mock_)->InitializeChannel(channel_id_, false); 62 (*mock_)->InitializeChannel(channel_id_, false);
63 return *mock_; 63 return *mock_;
64 } 64 }
65 65
66 void InitializeConnection(const LaunchState& state, 66 bool InitializeConnection(
67 bool wait_for_initial_loads) { 67 const LaunchState& state,
68 ASSERT_TRUE(LaunchBrowserAndServer(state, wait_for_initial_loads)); 68 bool wait_for_initial_loads) OVERRIDE WARN_UNUSED_RESULT {
69 bool launch_browser_and_server =
70 LaunchBrowserAndServer(state, wait_for_initial_loads);
71 EXPECT_TRUE(launch_browser_and_server);
72 return launch_browser_and_server;
69 } 73 }
70 74
71 void TerminateConnection() { 75 void TerminateConnection() {
72 CloseBrowserAndServer(); 76 CloseBrowserAndServer();
73 } 77 }
74 78
75 std::string PrefixedChannelID() const { 79 std::string PrefixedChannelID() const {
76 return channel_id_; 80 return channel_id_;
77 } 81 }
78 82
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 int diff_pixels_count = 0; 1660 int diff_pixels_count = 0;
1657 for (int x = 0; x < img_size.width(); ++x) { 1661 for (int x = 0; x < img_size.width(); ++x) {
1658 for (int y = 0; y < img_size.height(); ++y) { 1662 for (int y = 0; y < img_size.height(); ++y) {
1659 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) { 1663 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) {
1660 ++diff_pixels_count; 1664 ++diff_pixels_count;
1661 } 1665 }
1662 } 1666 }
1663 } 1667 }
1664 ASSERT_EQ(diff_pixels_count, 0); 1668 ASSERT_EQ(diff_pixels_count, 0);
1665 } 1669 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698