Chromium Code Reviews| Index: chrome/browser/banners/app_banner_manager_browsertest.cc |
| diff --git a/chrome/browser/banners/app_banner_manager_browsertest.cc b/chrome/browser/banners/app_banner_manager_browsertest.cc |
| index 7fbb4d03d03d90b23f96ca1262c0e3eb444ee96d..e4d88f43b7ea3cc0b71bfb499b93f6ed35db629b 100644 |
| --- a/chrome/browser/banners/app_banner_manager_browsertest.cc |
| +++ b/chrome/browser/banners/app_banner_manager_browsertest.cc |
| @@ -54,9 +54,7 @@ class AppBannerManagerTest : public AppBannerManager { |
| void clear_will_show() { will_show_.reset(); } |
| - bool is_active_or_pending() { |
| - return AppBannerManager::is_active_or_pending(); |
| - } |
| + bool is_inactive() { return AppBannerManager::is_inactive(); } |
| bool is_complete() { return AppBannerManager::is_complete(); } |
| @@ -182,7 +180,7 @@ class AppBannerManagerBrowserTest : public InProcessBrowserTest { |
| ui_test_utils::NavigateToURL(browser, test_url); |
| EXPECT_FALSE(manager->will_show()); |
| - EXPECT_FALSE(manager->is_active_or_pending()); |
| + EXPECT_TRUE(manager->is_inactive()); |
| histograms.ExpectTotalCount(banners::kMinutesHistogram, 0); |
| histograms.ExpectTotalCount(banners::kInstallableStatusCodeHistogram, |
| @@ -203,7 +201,10 @@ class AppBannerManagerBrowserTest : public InProcessBrowserTest { |
| run_loop.Run(); |
| EXPECT_EQ(expected_to_show, manager->will_show()); |
| - EXPECT_FALSE(manager->is_active_or_pending()); |
| + |
| + // Generally the manager will be in the complete state, however some test |
| + // cases navigate the page, causing the state to go back to INACTIVE. |
| + EXPECT_TRUE(manager->is_complete() || manager->is_inactive()); |
| // Check the tab title; this allows the test page to send data back out to |
| // be inspected by the test case. |
| @@ -482,7 +483,6 @@ IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
| } |
| EXPECT_TRUE(manager->will_show()); |
| - EXPECT_FALSE(manager->is_active_or_pending()); |
|
benwells
2017/06/27 22:55:58
not necessary as is_complete is checked two lines
|
| EXPECT_FALSE(manager->need_to_log_status()); |
| EXPECT_TRUE(manager->is_complete()); |
| @@ -526,7 +526,7 @@ IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, CheckOnLoadThenNavigate) { |
| } |
| EXPECT_FALSE(manager->will_show()); |
| - EXPECT_FALSE(manager->is_active_or_pending()); |
| + EXPECT_TRUE(manager->is_inactive()); |
| EXPECT_FALSE(manager->need_to_log_status()); |
| histograms.ExpectTotalCount(banners::kMinutesHistogram, 0); |