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

Unified Diff: chrome/test/chromedriver/chrome/browser_info_unittest.cc

Issue 2731403008: Add headless chrome as an accepted browser string in chromedriver. (Closed)
Patch Set: Fix tests Created 3 years, 9 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
« no previous file with comments | « chrome/test/chromedriver/chrome/browser_info.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/chrome/browser_info_unittest.cc
diff --git a/chrome/test/chromedriver/chrome/browser_info_unittest.cc b/chrome/test/chromedriver/chrome/browser_info_unittest.cc
index c33f77118c5e5bf67397b769fab5285c7e6d918e..b131d0a852a7dc243b8c767a8a230dbd8df28ee4 100644
--- a/chrome/test/chromedriver/chrome/browser_info_unittest.cc
+++ b/chrome/test/chromedriver/chrome/browser_info_unittest.cc
@@ -103,6 +103,18 @@ TEST(ParseBrowserString, DesktopChrome) {
ASSERT_FALSE(browser_info.is_android);
}
+TEST(ParseBrowserString, HeadlessChrome) {
+ BrowserInfo browser_info;
+ Status status =
+ ParseBrowserString(false, "HeadlessChrome/39.0.2171.59", &browser_info);
+ ASSERT_TRUE(status.IsOk());
+ ASSERT_EQ("headless chrome", browser_info.browser_name);
+ ASSERT_EQ("39.0.2171.59", browser_info.browser_version);
+ ASSERT_EQ(39, browser_info.major_version);
+ ASSERT_EQ(2171, browser_info.build_no);
+ ASSERT_FALSE(browser_info.is_android);
+}
+
TEST(ParseBlinkVersionString, GitHash) {
int rev = -1;
Status status = ParseBlinkVersionString(
« no previous file with comments | « chrome/test/chromedriver/chrome/browser_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698