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

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

Issue 2319223002: [chromedriver] Set page load strategy via constructor rather than a setter. (Closed)
Patch Set: Created 4 years, 3 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_launcher.cc ('k') | no next file » | 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/session_commands.h" 5 #include "chrome/test/chromedriver/session_commands.h"
6 6
7 #include <list> 7 #include <list>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 bound_params.socket_factory, 199 bound_params.socket_factory,
200 bound_params.device_manager, 200 bound_params.device_manager,
201 bound_params.port_server, 201 bound_params.port_server,
202 bound_params.port_manager, 202 bound_params.port_manager,
203 capabilities, 203 capabilities,
204 &devtools_event_listeners, 204 &devtools_event_listeners,
205 &session->chrome); 205 &session->chrome);
206 if (status.IsError()) 206 if (status.IsError())
207 return status; 207 return status;
208 208
209 session->chrome->set_page_load_strategy(capabilities.page_load_strategy);
210
211 status = session->chrome->GetWebViewIdForFirstTab(&session->window); 209 status = session->chrome->GetWebViewIdForFirstTab(&session->window);
212 if (status.IsError()) 210 if (status.IsError())
213 return status; 211 return status;
214 212
215 session->detach = capabilities.detach; 213 session->detach = capabilities.detach;
216 session->force_devtools_screenshot = capabilities.force_devtools_screenshot; 214 session->force_devtools_screenshot = capabilities.force_devtools_screenshot;
217 session->capabilities = CreateCapabilities(session->chrome.get()); 215 session->capabilities = CreateCapabilities(session->chrome.get());
218 value->reset(session->capabilities->DeepCopy()); 216 value->reset(session->capabilities->DeepCopy());
219 return CheckSessionCreated(session); 217 return CheckSessionCreated(session);
220 } 218 }
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 std::unique_ptr<base::Value>* value) { 866 std::unique_ptr<base::Value>* value) {
869 WebView* web_view = nullptr; 867 WebView* web_view = nullptr;
870 Status status = session->GetTargetWindow(&web_view); 868 Status status = session->GetTargetWindow(&web_view);
871 if (status.IsError()) 869 if (status.IsError())
872 return status; 870 return status;
873 status = web_view->DeleteScreenOrientation(); 871 status = web_view->DeleteScreenOrientation();
874 if (status.IsError()) 872 if (status.IsError())
875 return status; 873 return status;
876 return Status(kOk); 874 return Status(kOk);
877 } 875 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome_launcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698