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

Side by Side Diff: chrome/browser/banners/app_banner_manager_browsertest.cc

Issue 2952163002: Remove InProcessBrowserTest::SetUpOnMainThread() calls. (Closed)
Patch Set: lint 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 DISALLOW_COPY_AND_ASSIGN(AppBannerManagerTest); 107 DISALLOW_COPY_AND_ASSIGN(AppBannerManagerTest);
108 }; 108 };
109 109
110 class AppBannerManagerBrowserTest : public InProcessBrowserTest { 110 class AppBannerManagerBrowserTest : public InProcessBrowserTest {
111 public: 111 public:
112 void SetUpOnMainThread() override { 112 void SetUpOnMainThread() override {
113 AppBannerSettingsHelper::SetTotalEngagementToTrigger(10); 113 AppBannerSettingsHelper::SetTotalEngagementToTrigger(10);
114 SiteEngagementScore::SetParamValuesForTesting(); 114 SiteEngagementScore::SetParamValuesForTesting();
115 ASSERT_TRUE(embedded_test_server()->Start()); 115 ASSERT_TRUE(embedded_test_server()->Start());
116 InProcessBrowserTest::SetUpOnMainThread();
117 } 116 }
118 117
119 void SetUpCommandLine(base::CommandLine* command_line) override { 118 void SetUpCommandLine(base::CommandLine* command_line) override {
120 // Make sure app banners are disabled in the browser, otherwise they will 119 // Make sure app banners are disabled in the browser, otherwise they will
121 // interfere with the test. 120 // interfere with the test.
122 command_line->AppendSwitch(switches::kDisableAddToShelf); 121 command_line->AppendSwitch(switches::kDisableAddToShelf);
123 } 122 }
124 123
125 protected: 124 protected:
126 // Returns a test server URL to page |page_url| with |manifest_url| injected 125 // Returns a test server URL to page |page_url| with |manifest_url| injected
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 EXPECT_FALSE(manager->will_show()); 523 EXPECT_FALSE(manager->will_show());
525 EXPECT_FALSE(manager->is_active()); 524 EXPECT_FALSE(manager->is_active());
526 EXPECT_FALSE(manager->need_to_log_status()); 525 EXPECT_FALSE(manager->need_to_log_status());
527 526
528 histograms.ExpectTotalCount(banners::kMinutesHistogram, 0); 527 histograms.ExpectTotalCount(banners::kMinutesHistogram, 0);
529 histograms.ExpectUniqueSample(banners::kInstallableStatusCodeHistogram, 528 histograms.ExpectUniqueSample(banners::kInstallableStatusCodeHistogram,
530 INSUFFICIENT_ENGAGEMENT, 1); 529 INSUFFICIENT_ENGAGEMENT, 1);
531 } 530 }
532 531
533 } // namespace banners 532 } // namespace banners
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698