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

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

Issue 2230053002: [chromedriver] Added option to make element references W3C compliant. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed presubmit errors. 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
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/chromedriver/commands.h" 5 #include "chrome/test/chromedriver/commands.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 if (!session->detach) { 246 if (!session->detach) {
247 Status quit_status = session->chrome->Quit(); 247 Status quit_status = session->chrome->Quit();
248 if (quit_status.IsError()) 248 if (quit_status.IsError())
249 message += ", but failed to kill browser:" + quit_status.message(); 249 message += ", but failed to kill browser:" + quit_status.message();
250 } 250 }
251 status = Status(kUnknownError, message, status); 251 status = Status(kUnknownError, message, status);
252 } else if (status.code() == kDisconnected) { 252 } else if (status.code() == kDisconnected) {
253 // Some commands, like clicking a button or link which closes the 253 // Some commands, like clicking a button or link which closes the
254 // window, may result in a kDisconnected error code. 254 // window, may result in a kDisconnected error code.
255 std::list<std::string> web_view_ids; 255 std::list<std::string> web_view_ids;
256 Status status_tmp = session->chrome->GetWebViewIds(&web_view_ids); 256 Status status_tmp = session->chrome->GetWebViewIds(
257 &web_view_ids, session->w3c_compliant);
257 if (status_tmp.IsError() && status_tmp.code() != kChromeNotReachable) { 258 if (status_tmp.IsError() && status_tmp.code() != kChromeNotReachable) {
258 status.AddDetails( 259 status.AddDetails(
259 "failed to check if window was closed: " + status_tmp.message()); 260 "failed to check if window was closed: " + status_tmp.message());
260 } else if (!base::ContainsValue(web_view_ids, session->window)) { 261 } else if (!base::ContainsValue(web_view_ids, session->window)) {
261 status = Status(kOk); 262 status = Status(kOk);
262 } 263 }
263 } 264 }
264 if (status.IsError()) { 265 if (status.IsError()) {
265 const BrowserInfo* browser_info = session->chrome->GetBrowserInfo(); 266 const BrowserInfo* browser_info = session->chrome->GetBrowserInfo();
266 status.AddDetails("Session info: " + browser_info->browser_name + "=" + 267 status.AddDetails("Session info: " + browser_info->browser_name + "=" +
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 } 327 }
327 } 328 }
328 329
329 namespace internal { 330 namespace internal {
330 331
331 void CreateSessionOnSessionThreadForTesting(const std::string& id) { 332 void CreateSessionOnSessionThreadForTesting(const std::string& id) {
332 SetThreadLocalSession(base::WrapUnique(new Session(id))); 333 SetThreadLocalSession(base::WrapUnique(new Session(id)));
333 } 334 }
334 335
335 } // namespace internal 336 } // namespace internal
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/client/chromedriver.py ('k') | chrome/test/chromedriver/element_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698