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

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

Issue 1827003004: [Chromedriver] Chromedriver should handle unexpected alert automatically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: New modifications Created 4 years, 1 month 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/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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 caps->SetBoolean("mobileEmulationEnabled", 120 caps->SetBoolean("mobileEmulationEnabled",
121 chrome->IsMobileEmulationEnabled()); 121 chrome->IsMobileEmulationEnabled());
122 caps->SetBoolean("applicationCacheEnabled", false); 122 caps->SetBoolean("applicationCacheEnabled", false);
123 caps->SetBoolean("browserConnectionEnabled", false); 123 caps->SetBoolean("browserConnectionEnabled", false);
124 caps->SetBoolean("cssSelectorsEnabled", true); 124 caps->SetBoolean("cssSelectorsEnabled", true);
125 caps->SetBoolean("webStorageEnabled", true); 125 caps->SetBoolean("webStorageEnabled", true);
126 caps->SetBoolean("rotatable", false); 126 caps->SetBoolean("rotatable", false);
127 caps->SetBoolean("acceptSslCerts", true); 127 caps->SetBoolean("acceptSslCerts", true);
128 caps->SetBoolean("nativeEvents", true); 128 caps->SetBoolean("nativeEvents", true);
129 caps->SetBoolean("hasTouchScreen", chrome->HasTouchScreen()); 129 caps->SetBoolean("hasTouchScreen", chrome->HasTouchScreen());
130 caps->SetString("unexpectedAlertBehaviour",
131 chrome->UnexpectedAlertBehaviour());
130 132
131 ChromeDesktopImpl* desktop = NULL; 133 ChromeDesktopImpl* desktop = NULL;
132 Status status = chrome->GetAsDesktop(&desktop); 134 Status status = chrome->GetAsDesktop(&desktop);
133 if (status.IsOk()) { 135 if (status.IsOk()) {
134 caps->SetString("chrome.userDataDir", 136 caps->SetString("chrome.userDataDir",
135 desktop->command().GetSwitchValueNative("user-data-dir")); 137 desktop->command().GetSwitchValueNative("user-data-dir"));
136 caps->SetBoolean("networkConnectionEnabled", 138 caps->SetBoolean("networkConnectionEnabled",
137 desktop->IsNetworkConnectionEnabled()); 139 desktop->IsNetworkConnectionEnabled());
138 } 140 }
139 141
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 std::unique_ptr<base::Value>* value) { 876 std::unique_ptr<base::Value>* value) {
875 WebView* web_view = nullptr; 877 WebView* web_view = nullptr;
876 Status status = session->GetTargetWindow(&web_view); 878 Status status = session->GetTargetWindow(&web_view);
877 if (status.IsError()) 879 if (status.IsError())
878 return status; 880 return status;
879 status = web_view->DeleteScreenOrientation(); 881 status = web_view->DeleteScreenOrientation();
880 if (status.IsError()) 882 if (status.IsError())
881 return status; 883 return status;
882 return Status(kOk); 884 return Status(kOk);
883 } 885 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698