autologin: add option to suppress startup window.

When we log into a Chromebook it automatically starts a Chrome window
with the Google doodle. This doodle often has customized content
interfering with testing. Add option to suppress opening this window.

BUG=b:138835190
TEST=Ran locally '/usr/local/autotest/bin/autologin.py -w'

Change-Id: I9d958573e351766684b805dbf47b856c61434cce
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/1725261
Tested-by: Ilja H. Friedel <ihf@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org>
Auto-Submit: Ilja H. Friedel <ihf@chromium.org>
(cherry picked from commit 3f525c4c637a477787acb6ab4b105a92bfd2f5aa)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/1736766
Tested-by: Kazuhiro Inaba <kinaba@chromium.org>
diff --git a/client/bin/autologin.py b/client/bin/autologin.py
index 66e9b4f..e5b5191 100755
--- a/client/bin/autologin.py
+++ b/client/bin/autologin.py
@@ -33,6 +33,8 @@
                         help='Enable default applications.')
     parser.add_argument('-p', '--password',
                         help='Log in with provided password.')
+    parser.add_argument('-w', '--no-startup-window', action='store_true',
+                        help='Prevent startup window from opening (no doodle).')
     args = parser.parse_args(args)
 
     if args.password:
@@ -40,8 +42,13 @@
     elif args.username:
         password = getpass.getpass()
 
+    browser_args = []
+    if args.no_startup_window:
+        browser_args.append('--no-startup-window')
+
     # Avoid calling close() on the Chrome object; this keeps the session active.
     chrome.Chrome(
+        extra_browser_args=browser_args,
         arc_mode=('enabled' if args.arc else None),
         username=args.username,
         password=(password if args.username else None),