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

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

Issue 2295443003: [chromedriver] Added option to make element references W3C compliant. (Closed)
Patch Set: fix errors introduced during previous rebase Created 4 years 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 if (!session->detach) { 244 if (!session->detach) {
245 Status quit_status = session->chrome->Quit(); 245 Status quit_status = session->chrome->Quit();
246 if (quit_status.IsError()) 246 if (quit_status.IsError())
247 message += ", but failed to kill browser:" + quit_status.message(); 247 message += ", but failed to kill browser:" + quit_status.message();
248 } 248 }
249 status = Status(kUnknownError, message, status); 249 status = Status(kUnknownError, message, status);
250 } else if (status.code() == kDisconnected) { 250 } else if (status.code() == kDisconnected) {
251 // Some commands, like clicking a button or link which closes the 251 // Some commands, like clicking a button or link which closes the
252 // window, may result in a kDisconnected error code. 252 // window, may result in a kDisconnected error code.
253 std::list<std::string> web_view_ids; 253 std::list<std::string> web_view_ids;
254 Status status_tmp = session->chrome->GetWebViewIds(&web_view_ids); 254 Status status_tmp = session->chrome->GetWebViewIds(
255 &web_view_ids, session->w3c_compliant);
255 if (status_tmp.IsError() && status_tmp.code() != kChromeNotReachable) { 256 if (status_tmp.IsError() && status_tmp.code() != kChromeNotReachable) {
256 status.AddDetails( 257 status.AddDetails(
257 "failed to check if window was closed: " + status_tmp.message()); 258 "failed to check if window was closed: " + status_tmp.message());
258 } else if (!base::ContainsValue(web_view_ids, session->window)) { 259 } else if (!base::ContainsValue(web_view_ids, session->window)) {
259 status = Status(kOk); 260 status = Status(kOk);
260 } 261 }
261 } 262 }
262 if (status.IsError()) { 263 if (status.IsError()) {
263 const BrowserInfo* browser_info = session->chrome->GetBrowserInfo(); 264 const BrowserInfo* browser_info = session->chrome->GetBrowserInfo();
264 status.AddDetails("Session info: " + browser_info->browser_name + "=" + 265 status.AddDetails("Session info: " + browser_info->browser_name + "=" +
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 } 325 }
325 } 326 }
326 327
327 namespace internal { 328 namespace internal {
328 329
329 void CreateSessionOnSessionThreadForTesting(const std::string& id) { 330 void CreateSessionOnSessionThreadForTesting(const std::string& id) {
330 SetThreadLocalSession(base::MakeUnique<Session>(id)); 331 SetThreadLocalSession(base::MakeUnique<Session>(id));
331 } 332 }
332 333
333 } // namespace internal 334 } // 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