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

Side by Side Diff: chrome/test/chromedriver/chrome/chrome_desktop_impl.cc

Issue 2125123002: [chromedriver] Add page loading strategy to capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed unittests, renamed py tests Created 4 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
« no previous file with comments | « chrome/test/chromedriver/chrome/chrome.h ('k') | chrome/test/chromedriver/chrome/chrome_impl.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chromedriver/chrome/chrome_desktop_impl.h" 5 #include "chrome/test/chromedriver/chrome/chrome_desktop_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 if (type == WebViewInfo::Type::kApp || 140 if (type == WebViewInfo::Type::kApp ||
141 type == WebViewInfo::Type::kBackgroundPage) { 141 type == WebViewInfo::Type::kBackgroundPage) {
142 // Apps and extensions don't work on Android, so it doesn't make sense to 142 // Apps and extensions don't work on Android, so it doesn't make sense to
143 // provide override device metrics in mobile emulation mode, and can also 143 // provide override device metrics in mobile emulation mode, and can also
144 // potentially crash the renderer, for more details see: 144 // potentially crash the renderer, for more details see:
145 // https://code.google.com/p/chromedriver/issues/detail?id=1205 145 // https://code.google.com/p/chromedriver/issues/detail?id=1205
146 device_metrics = nullptr; 146 device_metrics = nullptr;
147 } 147 }
148 std::unique_ptr<WebView> web_view_tmp( 148 std::unique_ptr<WebView> web_view_tmp(
149 new WebViewImpl(id, devtools_http_client_->browser_info(), 149 new WebViewImpl(id, devtools_http_client_->browser_info(),
150 devtools_http_client_->CreateClient(id), device_metrics)); 150 devtools_http_client_->CreateClient(id), device_metrics,
151 page_load_strategy()));
151 Status status = web_view_tmp->ConnectIfNecessary(); 152 Status status = web_view_tmp->ConnectIfNecessary();
152 if (status.IsError()) 153 if (status.IsError())
153 return status; 154 return status;
154 155
155 status = web_view_tmp->WaitForPendingNavigations( 156 status = web_view_tmp->WaitForPendingNavigations(
156 std::string(), timeout, false); 157 std::string(), timeout, false);
157 if (status.IsOk()) 158 if (status.IsOk())
158 *web_view = std::move(web_view_tmp); 159 *web_view = std::move(web_view_tmp);
159 return status; 160 return status;
160 } 161 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 215 }
215 216
216 int ChromeDesktopImpl::GetNetworkConnection() const { 217 int ChromeDesktopImpl::GetNetworkConnection() const {
217 return network_connection_; 218 return network_connection_;
218 } 219 }
219 220
220 void ChromeDesktopImpl::SetNetworkConnection( 221 void ChromeDesktopImpl::SetNetworkConnection(
221 int network_connection) { 222 int network_connection) {
222 network_connection_ = network_connection; 223 network_connection_ = network_connection;
223 } 224 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome/chrome.h ('k') | chrome/test/chromedriver/chrome/chrome_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698