Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3153)

Unified Diff: chrome/browser/installable/installable_manager_browsertest.cc

Issue 2944283002: Replace --add-to-shelf flag with kAppBanners feature. (Closed)
Patch Set: Rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | chrome/common/chrome_features.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | chrome/common/chrome_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698