Index: chrome/test/chromedriver/chrome_launcher.cc |
diff --git a/chrome/test/chromedriver/chrome_launcher.cc b/chrome/test/chromedriver/chrome_launcher.cc |
index 567637e8b6466ca68c2d386376f7008012edd8ed..1592c2913c813c10936865934ba31f80edf66884 100644 |
--- a/chrome/test/chromedriver/chrome_launcher.cc |
+++ b/chrome/test/chromedriver/chrome_launcher.cc |
@@ -775,24 +775,25 @@ Status ProcessExtensions(const std::vector<std::string>& extensions, |
Status status = UnpackAutomationExtension(temp_dir, &automation_extension); |
if (status.IsError()) |
return status; |
-#if defined(OS_WIN) || defined(OS_MACOSX) |
- // On Chrome for Windows and Mac, a "Disable developer mode extensions" |
- // dialog appears for the automation extension. Suppress this by loading |
- // it as a component extension. |
- UpdateExtensionSwitch(switches, "load-component-extension", |
- automation_extension.value()); |
-#else |
if (switches->HasSwitch("disable-extensions")) { |
- // For Chrome 56 and earlier: |
- UpdateExtensionSwitch(switches, "load-component-extension", |
- automation_extension.value()); |
- // For Chrome 57 and later: |
UpdateExtensionSwitch(switches, "disable-extensions-except", |
automation_extension.value()); |
+ // TODO(samuong): Stop using --load-component-extension when ChromeDriver |
+ // stops supporting Chrome 56. For backwards compatibility, Chrome 57 and |
+ // 58 interprets --load-component-extension as --load-extension. |
+ UpdateExtensionSwitch(switches, "load-component-extension", |
+ automation_extension.value()); |
} else { |
+#if defined(OS_WIN) || defined(OS_MACOSX) |
+ // On Chrome 56 for Windows and Mac, a "Disable developer |
+ // mode extensions" dialog appears for the automation extension. Suppress |
+ // this by loading it as a component extension. |
+ UpdateExtensionSwitch(switches, "load-component-extension", |
+ automation_extension.value()); |
+#else |
extension_paths.push_back(automation_extension.value()); |
- } |
#endif |
+ } |
} |
if (extension_paths.size()) { |