Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(30)

Issue 1202043002: Adding tests for the prompt() method on the beforeinstallprompt event (Closed)

Created:
4 years, 10 months ago by dominickn
Modified:
4 years, 10 months ago
CC:
blink-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Adding tests for the prompt() method on the beforeinstallprompt event The prompt() method may only be called a single time following a preventDefault() on the beforeinstallprompt event. Other cases result in the method returning a rejected promise. These tests verify that prompt() correctly allows the event to continue, whilst correctly returning a rejected promise in other circumstances. BUG=490545 R=mlamouri@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197847

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressing reviewer comments and testing prompt() call outside handler #

Total comments: 4

Patch Set 3 : Addressing reviewer comments and adding additional test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -0 lines) Patch
A LayoutTests/app_banner/app-banner-event-prompt.html View 1 2 1 chunk +133 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
dominickn
4 years, 10 months ago (2015-06-23 16:31:27 UTC) #1
mlamouri (slow - plz ping)
https://codereview.chromium.org/1202043002/diff/1/LayoutTests/app_banner/app-banner-event-prompt.html File LayoutTests/app_banner/app-banner-event-prompt.html (right): https://codereview.chromium.org/1202043002/diff/1/LayoutTests/app_banner/app-banner-event-prompt.html#newcode68 LayoutTests/app_banner/app-banner-event-prompt.html:68: assert_equals(result.outcome, test_case.outcome, 'Outcome'); What about: e.userChoice.then(t.step_func(function(result) { assert_equals(...); assert-equals(...); ...
4 years, 10 months ago (2015-06-24 13:56:51 UTC) #2
dominickn
https://codereview.chromium.org/1202043002/diff/1/LayoutTests/app_banner/app-banner-event-prompt.html File LayoutTests/app_banner/app-banner-event-prompt.html (right): https://codereview.chromium.org/1202043002/diff/1/LayoutTests/app_banner/app-banner-event-prompt.html#newcode68 LayoutTests/app_banner/app-banner-event-prompt.html:68: assert_equals(result.outcome, test_case.outcome, 'Outcome'); On 2015/06/24 13:56:51, Mounir Lamouri wrote: ...
4 years, 10 months ago (2015-06-24 23:09:13 UTC) #3
mlamouri (slow - plz ping)
Your tests look good. Thanks! :) lgtm with the changes suggested below. https://codereview.chromium.org/1202043002/diff/20001/LayoutTests/app_banner/app-banner-event-prompt.html File LayoutTests/app_banner/app-banner-event-prompt.html ...
4 years, 10 months ago (2015-06-25 10:17:36 UTC) #4
dominickn
Also added an additional test for rejecting prompt() outside the handler without preventDefault(). Thanks for ...
4 years, 10 months ago (2015-06-25 17:30:21 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1202043002/40001
4 years, 10 months ago (2015-06-25 18:36:15 UTC) #8
commit-bot: I haz the power
4 years, 10 months ago (2015-06-25 19:14:38 UTC) #9
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197847

Powered by Google App Engine
This is Rietveld 408576698