Disable renderer backgrounding in Chrome Navigation Browser Test
This was timing out with the Mac renderer backgrounding experiment on
since it was taking too long for the backgrounded tab to wake up and
execute the necessary commands.
BUG=460102
Review-Url: https://codereview.chromium.org/2626293002
Cr-Commit-Position: refs/heads/master@{#443438}
diff --git a/chrome/browser/chrome_navigation_browsertest.cc b/chrome/browser/chrome_navigation_browsertest.cc
index c660c2db..3254ffa8 100644
--- a/chrome/browser/chrome_navigation_browsertest.cc
+++ b/chrome/browser/chrome_navigation_browsertest.cc
@@ -17,6 +17,7 @@
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/web_contents_observer.h"
+#include "content/public/common/content_switches.h"
 #include "content/public/common/context_menu_params.h"
 #include "content/public/common/url_constants.h"
 #include "content/public/test/browser_test_utils.h"
@@ -29,6 +30,11 @@
   ~ChromeNavigationBrowserTest() override {}
 
   void SetUpCommandLine(base::CommandLine* command_line) override {
+    // Backgrounded renderer processes run at a lower priority, causing the
+    // tests to take more time to complete. Disable backgrounding so that the
+    // tests don't time out.
+    command_line->AppendSwitch(switches::kDisableRendererBackgrounding);
+
     ASSERT_TRUE(embedded_test_server()->Start());
   }