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 d7c9b70e0d6f3e498cd070234f3bf85e69fcf551..e59dbe3cca572f66aea0c11df0f86bc7c6b035a8 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" |
@@ -178,6 +179,10 @@ class InstallableManagerBrowserTest : public InProcessBrowserTest { |
void SetUpOnMainThread() override { |
InProcessBrowserTest::SetUpOnMainThread(); |
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); |
Ilya Sherman
2017/06/22 16:36:22
I'm not 100% sure, but I think this might be runni
benwells
2017/06/23 02:09:26
There is no problem with this, it does affect the
|
} |
// Returns a test server URL to a page controlled by a service worker with |
@@ -204,12 +209,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(); |
@@ -222,6 +221,9 @@ class InstallableManagerBrowserTest : public InProcessBrowserTest { |
} |
InstallabilityCheckStatus GetStatus() { return GetManager()->page_status_; } |
+ |
+ private: |
+ base::test::ScopedFeatureList feature_list_; |
}; |
IN_PROC_BROWSER_TEST_F(InstallableManagerBrowserTest, |