| OLD | NEW |
| 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 "chrome/browser/banners/app_banner_manager.h" | 5 #include "chrome/browser/banners/app_banner_manager.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/task_runner.h" | 10 #include "base/task_runner.h" |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 0, SHOWING_WEB_APP_BANNER, true); | 249 0, SHOWING_WEB_APP_BANNER, true); |
| 250 } | 250 } |
| 251 | 251 |
| 252 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, | 252 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
| 253 WebAppBannerCreatedIndirectMultiple) { | 253 WebAppBannerCreatedIndirectMultiple) { |
| 254 AppBannerSettingsHelper::SetEngagementWeights(1, 0.5); | 254 AppBannerSettingsHelper::SetEngagementWeights(1, 0.5); |
| 255 RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, 3, | 255 RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, 3, |
| 256 SHOWING_WEB_APP_BANNER, true); | 256 SHOWING_WEB_APP_BANNER, true); |
| 257 } | 257 } |
| 258 | 258 |
| 259 // Disabled. See http://crbug.com/660798 |
| 260 #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) |
| 261 #define MAYBE_WebAppBannerCreatedIndirectMultipleLargerTotal \ |
| 262 DISABLED_WebAppBannerCreatedIndirectMultipleLargerTotal |
| 263 #else |
| 264 #define MAYBE_WebAppBannerCreatedIndirectMultipleLargerTotal \ |
| 265 WebAppBannerCreatedIndirectMultipleLargerTotal |
| 266 #endif |
| 259 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, | 267 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
| 260 WebAppBannerCreatedIndirectMultipleLargerTotal) { | 268 MAYBE_WebAppBannerCreatedIndirectMultipleLargerTotal) { |
| 261 AppBannerSettingsHelper::SetEngagementWeights(1, 0.5); | 269 AppBannerSettingsHelper::SetEngagementWeights(1, 0.5); |
| 262 AppBannerSettingsHelper::SetTotalEngagementToTrigger(4); | 270 AppBannerSettingsHelper::SetTotalEngagementToTrigger(4); |
| 263 RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, 7, | 271 RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, 7, |
| 264 SHOWING_WEB_APP_BANNER, true); | 272 SHOWING_WEB_APP_BANNER, true); |
| 265 } | 273 } |
| 266 | 274 |
| 267 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, | 275 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, |
| 268 WebAppBannerCreatedVarious) { | 276 WebAppBannerCreatedVarious) { |
| 269 AppBannerSettingsHelper::SetEngagementWeights(0.5, 0.25); | 277 AppBannerSettingsHelper::SetEngagementWeights(0.5, 0.25); |
| 270 | 278 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 RunBannerTest("/banners/prompt_in_handler_test_page.html", | 403 RunBannerTest("/banners/prompt_in_handler_test_page.html", |
| 396 ui::PAGE_TRANSITION_TYPED, 1, SHOWING_WEB_APP_BANNER, true); | 404 ui::PAGE_TRANSITION_TYPED, 1, SHOWING_WEB_APP_BANNER, true); |
| 397 } | 405 } |
| 398 | 406 |
| 399 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, WebAppBannerInIFrame) { | 407 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, WebAppBannerInIFrame) { |
| 400 RunBannerTest("/banners/iframe_test_page.html", ui::PAGE_TRANSITION_TYPED, 0, | 408 RunBannerTest("/banners/iframe_test_page.html", ui::PAGE_TRANSITION_TYPED, 0, |
| 401 NO_MANIFEST, false); | 409 NO_MANIFEST, false); |
| 402 } | 410 } |
| 403 | 411 |
| 404 } // namespace banners | 412 } // namespace banners |
| OLD | NEW |