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

Side by Side Diff: chrome/test/chromedriver/window_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) 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/window_commands.h" 5 #include "chrome/test/chromedriver/window_commands.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 Timeout* timeout) { 850 Timeout* timeout) {
851 Status status = session->chrome->ActivateWebView(web_view->GetId()); 851 Status status = session->chrome->ActivateWebView(web_view->GetId());
852 if (status.IsError()) 852 if (status.IsError())
853 return status; 853 return status;
854 854
855 std::string screenshot; 855 std::string screenshot;
856 ChromeDesktopImpl* desktop = NULL; 856 ChromeDesktopImpl* desktop = NULL;
857 status = session->chrome->GetAsDesktop(&desktop); 857 status = session->chrome->GetAsDesktop(&desktop);
858 if (status.IsOk() && !session->force_devtools_screenshot) { 858 if (status.IsOk() && !session->force_devtools_screenshot) {
859 AutomationExtension* extension = NULL; 859 AutomationExtension* extension = NULL;
860 status = desktop->GetAutomationExtension(&extension); 860 status = desktop->GetAutomationExtension(&extension,
861 session->w3c_compliant);
861 if (status.IsError()) 862 if (status.IsError())
862 return status; 863 return status;
863 status = extension->CaptureScreenshot(&screenshot); 864 status = extension->CaptureScreenshot(&screenshot);
864 } else { 865 } else {
865 status = web_view->CaptureScreenshot(&screenshot); 866 status = web_view->CaptureScreenshot(&screenshot);
866 } 867 }
867 if (status.IsError()) { 868 if (status.IsError()) {
868 LOG(WARNING) << "screenshot failed, retrying"; 869 LOG(WARNING) << "screenshot failed, retrying";
869 status = web_view->CaptureScreenshot(&screenshot); 870 status = web_view->CaptureScreenshot(&screenshot);
870 } 871 }
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 return status; 1064 return status;
1064 } 1065 }
1065 1066
1066 Status ExecuteTakeHeapSnapshot(Session* session, 1067 Status ExecuteTakeHeapSnapshot(Session* session,
1067 WebView* web_view, 1068 WebView* web_view,
1068 const base::DictionaryValue& params, 1069 const base::DictionaryValue& params,
1069 std::unique_ptr<base::Value>* value, 1070 std::unique_ptr<base::Value>* value,
1070 Timeout* timeout) { 1071 Timeout* timeout) {
1071 return web_view->TakeHeapSnapshot(value); 1072 return web_view->TakeHeapSnapshot(value);
1072 } 1073 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/test/run_py_tests.py ('k') | chrome/test/data/chromedriver/element_ref.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698