Index: chrome/browser/banners/app_banner_manager_browsertest.cc |
diff --git a/chrome/browser/banners/app_banner_data_fetcher_browsertest.cc b/chrome/browser/banners/app_banner_manager_browsertest.cc |
similarity index 51% |
rename from chrome/browser/banners/app_banner_data_fetcher_browsertest.cc |
rename to chrome/browser/banners/app_banner_manager_browsertest.cc |
index cb57b897a46c9384becc314ffb72ff220e9f28d9..c4a174a8801dc04c8639af6386e00a875bc885be 100644 |
--- a/chrome/browser/banners/app_banner_data_fetcher_browsertest.cc |
+++ b/chrome/browser/banners/app_banner_manager_browsertest.cc |
@@ -1,69 +1,87 @@ |
-// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/browser/banners/app_banner_data_fetcher.h" |
+#include "chrome/browser/banners/app_banner_manager.h" |
#include "base/command_line.h" |
-#include "base/location.h" |
#include "base/run_loop.h" |
#include "base/single_thread_task_runner.h" |
#include "base/task_runner.h" |
#include "base/test/histogram_tester.h" |
#include "base/threading/thread_task_runner_handle.h" |
-#include "chrome/browser/banners/app_banner_data_fetcher_desktop.h" |
+#include "chrome/browser/banners/app_banner_manager.h" |
#include "chrome/browser/banners/app_banner_metrics.h" |
#include "chrome/browser/banners/app_banner_settings_helper.h" |
+#include "chrome/browser/installable/installable_manager.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/tabs/tab_strip_model.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/test/base/in_process_browser_test.h" |
#include "chrome/test/base/ui_test_utils.h" |
#include "content/public/common/content_switches.h" |
-#include "content/public/test/test_navigation_observer.h" |
#include "net/test/embedded_test_server/embedded_test_server.h" |
namespace banners { |
-class TestObserver : public AppBannerDataFetcher::Observer { |
+// All calls to RequestAppBanner should terminate in one of Stop() (not showing |
+// banner) or ShowBanner(). This browser test uses this and overrides those two |
+// methods to capture this information. |
+class AppBannerManagerTest : public AppBannerManager { |
public: |
- TestObserver(AppBannerDataFetcher* fetcher, base::Closure quit_closure) |
- : fetcher_(fetcher), |
- quit_closure_(quit_closure) { |
- fetcher_->AddObserverForTesting(this); |
+ explicit AppBannerManagerTest(content::WebContents* web_contents) |
+ : AppBannerManager(web_contents) {} |
+ ~AppBannerManagerTest() override {} |
+ |
+ bool will_show() { return will_show_.get() && *will_show_; } |
+ |
+ bool is_active() { return AppBannerManager::is_active(); } |
+ |
+ // Set the page transition of each banner request. |
+ void set_page_transition_(ui::PageTransition transition) { |
+ last_transition_type_ = transition; |
} |
- virtual ~TestObserver() { |
- if (fetcher_) |
- fetcher_->RemoveObserverForTesting(this); |
+ using AppBannerManager::RequestAppBanner; |
+ void RequestAppBanner(const GURL& validated_url, |
+ bool is_debug_mode, |
+ base::Closure quit_closure) { |
+ will_show_.reset(nullptr); |
+ quit_closure_ = quit_closure; |
+ AppBannerManager::RequestAppBanner(validated_url, is_debug_mode); |
} |
- void OnDecidedWhetherToShow(AppBannerDataFetcher* fetcher, |
- bool will_show) override { |
- base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, quit_closure_); |
+ protected: |
+ void Stop() override { |
+ AppBannerManager::Stop(); |
ASSERT_FALSE(will_show_.get()); |
- will_show_.reset(new bool(will_show)); |
+ will_show_.reset(new bool(false)); |
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, quit_closure_); |
} |
- void OnFetcherDestroyed(AppBannerDataFetcher* fetcher) override { |
+ void ShowBanner() override { |
+ ASSERT_FALSE(will_show_.get()); |
+ will_show_.reset(new bool(true)); |
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, quit_closure_); |
- fetcher_ = nullptr; |
} |
- bool will_show() { return will_show_.get() && *will_show_; } |
+ void DidStartNavigation(content::NavigationHandle* handle) override { |
+ // Do nothing to ensure we never observe the site engagement service. |
+ } |
+ |
+ void DidFinishLoad(content::RenderFrameHost* render_frame_host, |
+ const GURL& validated_url) override { |
+ // Do nothing else to ensure the banner pipeline doesn't start. |
+ validated_url_ = validated_url; |
+ } |
private: |
- AppBannerDataFetcher* fetcher_; |
base::Closure quit_closure_; |
std::unique_ptr<bool> will_show_; |
}; |
-class AppBannerDataFetcherBrowserTest : public InProcessBrowserTest, |
- public AppBannerDataFetcher::Delegate { |
+class AppBannerManagerBrowserTest : public InProcessBrowserTest { |
public: |
- AppBannerDataFetcherBrowserTest() : weak_factory_(this) { |
- } |
- |
void SetUpOnMainThread() override { |
AppBannerSettingsHelper::SetEngagementWeights(1, 1); |
AppBannerSettingsHelper::SetTotalEngagementToTrigger(2); |
@@ -71,112 +89,91 @@ class AppBannerDataFetcherBrowserTest : public InProcessBrowserTest, |
InProcessBrowserTest::SetUpOnMainThread(); |
} |
- bool HandleNonWebApp(const std::string& platform, |
- const GURL& url, |
- const std::string& id, |
- bool is_debug_mode) override { |
- base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, quit_closure_); |
- non_web_platform_ = platform; |
- return false; |
- } |
- |
void SetUpCommandLine(base::CommandLine* command_line) override { |
- command_line->AppendSwitch( |
- switches::kEnableExperimentalWebPlatformFeatures); |
// Make sure app banners are disabled in the browser, otherwise they will |
// interfere with the test. |
command_line->AppendSwitch(switches::kDisableAddToShelf); |
} |
protected: |
- void RunFetcher(const GURL& url, |
- const std::string& expected_non_web_platform, |
- ui::PageTransition transition, |
- bool expected_to_show) { |
- content::WebContents* web_contents = |
- browser()->tab_strip_model()->GetActiveWebContents(); |
- scoped_refptr<AppBannerDataFetcherDesktop> fetcher( |
- new AppBannerDataFetcherDesktop( |
- web_contents, weak_factory_.GetWeakPtr(), 128, 128, false)); |
- |
+ void RequestAppBanner(AppBannerManagerTest* manager, |
+ const GURL& url, |
+ base::RunLoop& run_loop, |
+ ui::PageTransition transition, |
+ bool expected_to_show) { |
base::HistogramTester histograms; |
- base::RunLoop run_loop; |
- quit_closure_ = run_loop.QuitClosure(); |
- std::unique_ptr<TestObserver> observer( |
- new TestObserver(fetcher.get(), run_loop.QuitClosure())); |
- fetcher->Start(url, transition); |
+ manager->set_page_transition_(transition); |
+ manager->RequestAppBanner(url, false, run_loop.QuitClosure()); |
run_loop.Run(); |
- EXPECT_EQ(expected_non_web_platform, non_web_platform_); |
- EXPECT_EQ(expected_to_show, observer->will_show()); |
- ASSERT_FALSE(fetcher->is_active()); |
+ EXPECT_EQ(expected_to_show, manager->will_show()); |
+ ASSERT_FALSE(manager->is_active()); |
// If showing the banner, ensure that the minutes histogram is recorded. |
histograms.ExpectTotalCount(banners::kMinutesHistogram, |
- (observer->will_show() ? 1 : 0)); |
+ (manager->will_show() ? 1 : 0)); |
} |
- void RunBannerTest(const std::string& manifest_page, |
+ void RunBannerTest(const std::string& url, |
ui::PageTransition transition, |
unsigned int unshown_repetitions, |
bool expectation) { |
- std::string valid_page(manifest_page); |
+ std::string valid_page(url); |
GURL test_url = embedded_test_server()->GetURL(valid_page); |
content::WebContents* web_contents = |
browser()->tab_strip_model()->GetActiveWebContents(); |
+ std::unique_ptr<AppBannerManagerTest> manager( |
+ new AppBannerManagerTest(web_contents)); |
for (unsigned int i = 0; i < unshown_repetitions; ++i) { |
ui_test_utils::NavigateToURL(browser(), test_url); |
- RunFetcher(web_contents->GetURL(), std::string(), transition, false); |
- AppBannerDataFetcher::SetTimeDeltaForTesting(i+1); |
+ base::RunLoop run_loop; |
+ RequestAppBanner(manager.get(), web_contents->GetLastCommittedURL(), |
+ run_loop, transition, false); |
+ AppBannerManager::SetTimeDeltaForTesting(i + 1); |
} |
// On the final loop, check whether the banner triggered or not as expected. |
ui_test_utils::NavigateToURL(browser(), test_url); |
- RunFetcher(web_contents->GetURL(), std::string(), transition, expectation); |
+ base::RunLoop run_loop; |
+ RequestAppBanner(manager.get(), web_contents->GetLastCommittedURL(), |
+ run_loop, transition, expectation); |
} |
- |
- private: |
- std::string non_web_platform_; |
- base::Closure quit_closure_; |
- base::WeakPtrFactory<AppBannerDataFetcherBrowserTest> weak_factory_; |
}; |
- |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
- WebAppBannerCreatedDirect) { |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, WebAppBannerCreatedDirect) { |
RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_TYPED, |
1, true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerCreatedDirectLargerTotal) { |
AppBannerSettingsHelper::SetTotalEngagementToTrigger(4); |
RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_TYPED, |
3, true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerCreatedDirectSmallerTotal) { |
AppBannerSettingsHelper::SetTotalEngagementToTrigger(1); |
RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_TYPED, |
0, true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerCreatedDirectSingle) { |
AppBannerSettingsHelper::SetEngagementWeights(2, 1); |
RunBannerTest("/banners/manifest_test_page.html", |
ui::PAGE_TRANSITION_GENERATED, 0, true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerCreatedDirectMultiple) { |
AppBannerSettingsHelper::SetEngagementWeights(0.5, 1); |
RunBannerTest("/banners/manifest_test_page.html", |
ui::PAGE_TRANSITION_GENERATED, 3, true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerCreatedDirectMultipleLargerTotal) { |
AppBannerSettingsHelper::SetEngagementWeights(0.5, 1); |
AppBannerSettingsHelper::SetTotalEngagementToTrigger(3); |
@@ -184,7 +181,7 @@ IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
ui::PAGE_TRANSITION_GENERATED, 5, true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerCreatedDirectMultipleSmallerTotal) { |
AppBannerSettingsHelper::SetEngagementWeights(0.5, 1); |
AppBannerSettingsHelper::SetTotalEngagementToTrigger(1); |
@@ -192,49 +189,49 @@ IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
ui::PAGE_TRANSITION_GENERATED, 1, true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerCreatedIndirect) { |
- RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, |
- 1, true); |
+ RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, 1, |
+ true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerCreatedIndirectLargerTotal) { |
AppBannerSettingsHelper::SetTotalEngagementToTrigger(5); |
- RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, |
- 4, true); |
+ RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, 4, |
+ true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerCreatedIndirectSmallerTotal) { |
AppBannerSettingsHelper::SetTotalEngagementToTrigger(1); |
- RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, |
- 0, true); |
+ RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, 0, |
+ true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerCreatedIndirectSingle) { |
AppBannerSettingsHelper::SetEngagementWeights(1, 3); |
RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_RELOAD, |
0, true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerCreatedIndirectMultiple) { |
AppBannerSettingsHelper::SetEngagementWeights(1, 0.5); |
- RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, |
- 3, true); |
+ RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, 3, |
+ true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerCreatedIndirectMultipleLargerTotal) { |
AppBannerSettingsHelper::SetEngagementWeights(1, 0.5); |
AppBannerSettingsHelper::SetTotalEngagementToTrigger(4); |
- RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, |
- 7, true); |
+ RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, 7, |
+ true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerCreatedVarious) { |
AppBannerSettingsHelper::SetEngagementWeights(0.5, 0.25); |
@@ -243,105 +240,112 @@ IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
content::WebContents* web_contents = |
browser()->tab_strip_model()->GetActiveWebContents(); |
+ std::unique_ptr<AppBannerManagerTest> manager( |
+ new AppBannerManagerTest(web_contents)); |
+ |
// Add a direct nav on day 1. |
- ui_test_utils::NavigateToURL(browser(), test_url); |
- RunFetcher(web_contents->GetURL(), std::string(), ui::PAGE_TRANSITION_TYPED, |
- false); |
+ { |
+ base::RunLoop run_loop; |
+ ui_test_utils::NavigateToURL(browser(), test_url); |
+ RequestAppBanner(manager.get(), web_contents->GetLastCommittedURL(), |
+ run_loop, ui::PAGE_TRANSITION_TYPED, false); |
+ } |
// Add an indirect nav on day 1 which is ignored. |
- ui_test_utils::NavigateToURL(browser(), test_url); |
- RunFetcher(web_contents->GetURL(), std::string(), ui::PAGE_TRANSITION_LINK, |
- false); |
- AppBannerDataFetcher::SetTimeDeltaForTesting(1); |
+ { |
+ base::RunLoop run_loop; |
+ ui_test_utils::NavigateToURL(browser(), test_url); |
+ RequestAppBanner(manager.get(), web_contents->GetLastCommittedURL(), |
+ run_loop, ui::PAGE_TRANSITION_LINK, false); |
+ AppBannerManager::SetTimeDeltaForTesting(1); |
+ } |
// Add an indirect nav on day 2. |
- ui_test_utils::NavigateToURL(browser(), test_url); |
- RunFetcher(web_contents->GetURL(), std::string(), |
- ui::PAGE_TRANSITION_MANUAL_SUBFRAME, false); |
+ { |
+ base::RunLoop run_loop; |
+ ui_test_utils::NavigateToURL(browser(), test_url); |
+ RequestAppBanner(manager.get(), web_contents->GetLastCommittedURL(), |
+ run_loop, ui::PAGE_TRANSITION_MANUAL_SUBFRAME, false); |
+ } |
// Add a direct nav on day 2 which overrides. |
- ui_test_utils::NavigateToURL(browser(), test_url); |
- RunFetcher(web_contents->GetURL(), std::string(), |
- ui::PAGE_TRANSITION_GENERATED, false); |
- AppBannerDataFetcher::SetTimeDeltaForTesting(2); |
+ { |
+ base::RunLoop run_loop; |
+ ui_test_utils::NavigateToURL(browser(), test_url); |
+ RequestAppBanner(manager.get(), web_contents->GetLastCommittedURL(), |
+ run_loop, ui::PAGE_TRANSITION_GENERATED, false); |
+ AppBannerManager::SetTimeDeltaForTesting(2); |
+ } |
// Add a direct nav on day 3. |
- ui_test_utils::NavigateToURL(browser(), test_url); |
- RunFetcher(web_contents->GetURL(), std::string(), |
- ui::PAGE_TRANSITION_GENERATED, false); |
- AppBannerDataFetcher::SetTimeDeltaForTesting(3); |
+ { |
+ base::RunLoop run_loop; |
+ ui_test_utils::NavigateToURL(browser(), test_url); |
+ RequestAppBanner(manager.get(), web_contents->GetLastCommittedURL(), |
+ run_loop, ui::PAGE_TRANSITION_GENERATED, false); |
+ AppBannerManager::SetTimeDeltaForTesting(3); |
+ } |
// Add an indirect nav on day 4. |
- ui_test_utils::NavigateToURL(browser(), test_url); |
- RunFetcher(web_contents->GetURL(), std::string(), |
- ui::PAGE_TRANSITION_FORM_SUBMIT, false); |
- |
+ { |
+ base::RunLoop run_loop; |
+ ui_test_utils::NavigateToURL(browser(), test_url); |
+ RequestAppBanner(manager.get(), web_contents->GetLastCommittedURL(), |
+ run_loop, ui::PAGE_TRANSITION_FORM_SUBMIT, false); |
+ } |
// Add a direct nav on day 4 which should trigger the banner. |
- ui_test_utils::NavigateToURL(browser(), test_url); |
- RunFetcher(web_contents->GetURL(), std::string(), |
- ui::PAGE_TRANSITION_TYPED, true); |
+ { |
+ base::RunLoop run_loop; |
+ ui_test_utils::NavigateToURL(browser(), test_url); |
+ RequestAppBanner(manager.get(), web_contents->GetLastCommittedURL(), |
+ run_loop, ui::PAGE_TRANSITION_TYPED, true); |
+ } |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerNoTypeInManifest) { |
RunBannerTest("/banners/manifest_no_type_test_page.html", |
ui::PAGE_TRANSITION_TYPED, 1, true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
WebAppBannerNoTypeInManifestCapsExtension) { |
RunBannerTest("/banners/manifest_no_type_caps_test_page.html", |
ui::PAGE_TRANSITION_TYPED, 1, true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, PlayAppManifest) { |
- std::string valid_page("/banners/play_app_test_page.html"); |
- GURL test_url = embedded_test_server()->GetURL(valid_page); |
- content::WebContents* web_contents = |
- browser()->tab_strip_model()->GetActiveWebContents(); |
- |
- // Native banners do not require the SW, so we can just load the URL. |
- ui_test_utils::NavigateToURL(browser(), test_url); |
- std::string play_platform("play"); |
- RunFetcher(web_contents->GetURL(), play_platform, ui::PAGE_TRANSITION_TYPED, |
- false); |
- |
- // The logic to get the details for a play app banner are only on android |
- // builds, so this test does not check that the banner is shown. |
-} |
- |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, NoManifest) { |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, NoManifest) { |
RunBannerTest("/banners/no_manifest_test_page.html", |
ui::PAGE_TRANSITION_TYPED, 1, false); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, MissingManifest) { |
- RunBannerTest("/banners/manifest_bad_link.html", |
- ui::PAGE_TRANSITION_TYPED, 1, false); |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, MissingManifest) { |
+ RunBannerTest("/banners/manifest_bad_link.html", ui::PAGE_TRANSITION_TYPED, 1, |
+ false); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, CancelBannerDirect) { |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, CancelBannerDirect) { |
RunBannerTest("/banners/cancel_test_page.html", ui::PAGE_TRANSITION_TYPED, 1, |
false); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, CancelBannerIndirect) { |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, CancelBannerIndirect) { |
AppBannerSettingsHelper::SetEngagementWeights(1, 0.5); |
RunBannerTest("/banners/cancel_test_page.html", ui::PAGE_TRANSITION_TYPED, 3, |
false); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, PromptBanner) { |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, PromptBanner) { |
RunBannerTest("/banners/prompt_test_page.html", ui::PAGE_TRANSITION_TYPED, 1, |
true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, PromptBannerInHandler) { |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, PromptBannerInHandler) { |
RunBannerTest("/banners/prompt_in_handler_test_page.html", |
ui::PAGE_TRANSITION_TYPED, 1, true); |
} |
-IN_PROC_BROWSER_TEST_F(AppBannerDataFetcherBrowserTest, WebAppBannerInIFrame) { |
+IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, WebAppBannerInIFrame) { |
RunBannerTest("/banners/iframe_test_page.html", ui::PAGE_TRANSITION_TYPED, 1, |
false); |
} |