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

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

Issue 2500123002: Re-enable AppBannerManagerBrowserTests. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 ui::PAGE_TRANSITION_GENERATED, 0, SHOWING_WEB_APP_BANNER, true); 199 ui::PAGE_TRANSITION_GENERATED, 0, SHOWING_WEB_APP_BANNER, true);
200 } 200 }
201 201
202 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, 202 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest,
203 WebAppBannerCreatedDirectMultiple) { 203 WebAppBannerCreatedDirectMultiple) {
204 AppBannerSettingsHelper::SetEngagementWeights(0.5, 1); 204 AppBannerSettingsHelper::SetEngagementWeights(0.5, 1);
205 RunBannerTest("/banners/manifest_test_page.html", 205 RunBannerTest("/banners/manifest_test_page.html",
206 ui::PAGE_TRANSITION_GENERATED, 3, SHOWING_WEB_APP_BANNER, true); 206 ui::PAGE_TRANSITION_GENERATED, 3, SHOWING_WEB_APP_BANNER, true);
207 } 207 }
208 208
209 // Disabled due to flakiness: crbug.com/661511.
210 #if defined(OS_LINUX) || defined(OS_WIN)
211 #define MAYBE_WebAppBannerCreatedDirectMultipleLargerTotal \
212 DISABLED_WebAppBannerCreatedDirectMultipleLargerTotal
213 #else
214 #define MAYBE_WebAppBannerCreatedDirectMultipleLargerTotal \
215 WebAppBannerCreatedDirectMultipleLargerTotal
216 #endif
217 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, 209 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest,
218 MAYBE_WebAppBannerCreatedDirectMultipleLargerTotal) { 210 WebAppBannerCreatedDirectMultipleLargerTotal) {
219 AppBannerSettingsHelper::SetEngagementWeights(0.5, 1); 211 AppBannerSettingsHelper::SetEngagementWeights(0.5, 1);
220 AppBannerSettingsHelper::SetTotalEngagementToTrigger(3); 212 AppBannerSettingsHelper::SetTotalEngagementToTrigger(3);
221 RunBannerTest("/banners/manifest_test_page.html", 213 RunBannerTest("/banners/manifest_test_page.html",
222 ui::PAGE_TRANSITION_GENERATED, 5, SHOWING_WEB_APP_BANNER, true); 214 ui::PAGE_TRANSITION_GENERATED, 5, SHOWING_WEB_APP_BANNER, true);
223 } 215 }
224 216
225 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, 217 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest,
226 WebAppBannerCreatedDirectMultipleSmallerTotal) { 218 WebAppBannerCreatedDirectMultipleSmallerTotal) {
227 AppBannerSettingsHelper::SetEngagementWeights(0.5, 1); 219 AppBannerSettingsHelper::SetEngagementWeights(0.5, 1);
228 AppBannerSettingsHelper::SetTotalEngagementToTrigger(1); 220 AppBannerSettingsHelper::SetTotalEngagementToTrigger(1);
(...skipping 29 matching lines...) Expand all
258 0, SHOWING_WEB_APP_BANNER, true); 250 0, SHOWING_WEB_APP_BANNER, true);
259 } 251 }
260 252
261 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, 253 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest,
262 WebAppBannerCreatedIndirectMultiple) { 254 WebAppBannerCreatedIndirectMultiple) {
263 AppBannerSettingsHelper::SetEngagementWeights(1, 0.5); 255 AppBannerSettingsHelper::SetEngagementWeights(1, 0.5);
264 RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, 3, 256 RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, 3,
265 SHOWING_WEB_APP_BANNER, true); 257 SHOWING_WEB_APP_BANNER, true);
266 } 258 }
267 259
268 // Disabled. See http://crbug.com/660798
269 #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
270 #define MAYBE_WebAppBannerCreatedIndirectMultipleLargerTotal \
271 DISABLED_WebAppBannerCreatedIndirectMultipleLargerTotal
272 #else
273 #define MAYBE_WebAppBannerCreatedIndirectMultipleLargerTotal \
274 WebAppBannerCreatedIndirectMultipleLargerTotal
275 #endif
276 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, 260 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest,
277 MAYBE_WebAppBannerCreatedIndirectMultipleLargerTotal) { 261 WebAppBannerCreatedIndirectMultipleLargerTotal) {
278 AppBannerSettingsHelper::SetEngagementWeights(1, 0.5); 262 AppBannerSettingsHelper::SetEngagementWeights(1, 0.5);
279 AppBannerSettingsHelper::SetTotalEngagementToTrigger(4); 263 AppBannerSettingsHelper::SetTotalEngagementToTrigger(4);
280 RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, 7, 264 RunBannerTest("/banners/manifest_test_page.html", ui::PAGE_TRANSITION_LINK, 7,
281 SHOWING_WEB_APP_BANNER, true); 265 SHOWING_WEB_APP_BANNER, true);
282 } 266 }
283 267
284 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, 268 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest,
285 WebAppBannerCreatedVarious) { 269 WebAppBannerCreatedVarious) {
286 AppBannerSettingsHelper::SetEngagementWeights(0.5, 0.25); 270 AppBannerSettingsHelper::SetEngagementWeights(0.5, 0.25);
287 271
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 RunBannerTest("/banners/prompt_in_handler_test_page.html", 396 RunBannerTest("/banners/prompt_in_handler_test_page.html",
413 ui::PAGE_TRANSITION_TYPED, 1, SHOWING_WEB_APP_BANNER, true); 397 ui::PAGE_TRANSITION_TYPED, 1, SHOWING_WEB_APP_BANNER, true);
414 } 398 }
415 399
416 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, WebAppBannerInIFrame) { 400 IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest, WebAppBannerInIFrame) {
417 RunBannerTest("/banners/iframe_test_page.html", ui::PAGE_TRANSITION_TYPED, 0, 401 RunBannerTest("/banners/iframe_test_page.html", ui::PAGE_TRANSITION_TYPED, 0,
418 NO_MANIFEST, false); 402 NO_MANIFEST, false);
419 } 403 }
420 404
421 } // namespace banners 405 } // namespace banners
OLDNEW
« no previous file with comments | « no previous file | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698