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

Unified Diff: third_party/WebKit/Source/core/frame/Navigator.cpp

Issue 2886943007: Introduce NavigatorWebDriver interface
Patch Set: wip: need more tests Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/Navigator.cpp
diff --git a/third_party/WebKit/Source/core/frame/Navigator.cpp b/third_party/WebKit/Source/core/frame/Navigator.cpp
index 27ce6317f03466cf931450e820af2f6a60466e1b..5a49f43db1ba85293a4e97feae031d81b4c3ac2d 100644
--- a/third_party/WebKit/Source/core/frame/Navigator.cpp
+++ b/third_party/WebKit/Source/core/frame/Navigator.cpp
@@ -73,6 +73,17 @@ bool Navigator::cookieEnabled() const {
return CookiesEnabled(GetFrame()->GetDocument());
}
+bool Navigator::webdriver() const {
+ if (!GetFrame())
+ return false;
+
+ Settings* settings = GetFrame()->GetSettings();
+ if (!settings)
+ return false;
+
+ return settings->GetAutomationControlled() || settings->GetHeadless();
+}
+
Vector<String> Navigator::languages() {
Vector<String> languages;
« no previous file with comments | « third_party/WebKit/Source/core/frame/Navigator.h ('k') | third_party/WebKit/Source/core/frame/Navigator.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698