Index: chrome/browser/installable/installable_manager_browsertest.cc |
diff --git a/chrome/browser/installable/installable_manager_browsertest.cc b/chrome/browser/installable/installable_manager_browsertest.cc |
index 3ac72f6c785652acbe755729e683f0d6a0c7fa95..2375213657c8ca3e96b2a2f1d6fa243f550d6fa7 100644 |
--- a/chrome/browser/installable/installable_manager_browsertest.cc |
+++ b/chrome/browser/installable/installable_manager_browsertest.cc |
@@ -7,10 +7,11 @@ |
#include "base/command_line.h" |
#include "base/memory/ptr_util.h" |
#include "base/run_loop.h" |
+#include "base/test/scoped_feature_list.h" |
#include "base/threading/thread_task_runner_handle.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/tabs/tab_strip_model.h" |
-#include "chrome/common/chrome_switches.h" |
+#include "chrome/common/chrome_features.h" |
#include "chrome/test/base/in_process_browser_test.h" |
#include "chrome/test/base/ui_test_utils.h" |
#include "content/public/test/browser_test_utils.h" |
@@ -177,6 +178,10 @@ class InstallableManagerBrowserTest : public InProcessBrowserTest { |
public: |
void SetUpOnMainThread() override { |
ASSERT_TRUE(embedded_test_server()->Start()); |
+ |
+ // Make sure app banners are disabled in the browser so they do not |
+ // interfere with the test. |
+ feature_list_.InitAndDisableFeature(features::kAppBanners); |
} |
// Returns a test server URL to a page controlled by a service worker with |
@@ -203,12 +208,6 @@ class InstallableManagerBrowserTest : public InProcessBrowserTest { |
base::Unretained(tester))); |
} |
- void SetUpCommandLine(base::CommandLine* command_line) override { |
- // Make sure app banners are disabled in the browser so they do not |
- // interfere with the test. |
- command_line->AppendSwitch(switches::kDisableAddToShelf); |
- } |
- |
InstallableManager* GetManager() { |
content::WebContents* web_contents = |
browser()->tab_strip_model()->GetActiveWebContents(); |
@@ -221,6 +220,9 @@ class InstallableManagerBrowserTest : public InProcessBrowserTest { |
} |
InstallabilityCheckStatus GetStatus() { return GetManager()->page_status_; } |
+ |
+ private: |
+ base::test::ScopedFeatureList feature_list_; |
}; |
IN_PROC_BROWSER_TEST_F(InstallableManagerBrowserTest, |