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

Unified Diff: LayoutTests/app_banner/app-banner-event-prompt.html

Issue 1247283004: Refactor BeforeInstallPromptEvent to use ScriptPromiseProperty (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make prompt() return a new promise each call, and restore async callback registration. Created 5 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/LeakExpectations ('k') | Source/bindings/core/v8/ScriptPromiseProperties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/app_banner/app-banner-event-prompt.html
diff --git a/LayoutTests/app_banner/app-banner-event-prompt.html b/LayoutTests/app_banner/app-banner-event-prompt.html
index b5edae164c381abd3475a70c2f4f61f631bfeee5..f328d6af1343dd8cefe3f6cc938c2cb1eabd973c 100644
--- a/LayoutTests/app_banner/app-banner-event-prompt.html
+++ b/LayoutTests/app_banner/app-banner-event-prompt.html
@@ -92,13 +92,16 @@ function prompt_test(index) {
assert_equals(e.platforms[0], 'foo', 'First platform');
assert_equals(e.platforms[1], 'bar', 'Second platform');
+ if (test_case.cancel) {
+ e.preventDefault();
+ }
+
if (test_case.late) {
return;
}
if (test_case.cancel) {
- // Cancel the event, then call prompt() to restart the display pipeline.
- e.preventDefault();
+ // Call prompt() to restart the pipeline.
verify_prompt_resolve(e, t);
} else {
// A call to prompt() before preventDefault should reject.
@@ -118,7 +121,6 @@ function prompt_test(index) {
// Test that firing prompt() outside of the handler resolves or rejects correctly.
if (test_case.late) {
if (test_case.cancel) {
- event.preventDefault();
verify_prompt_resolve(event, t);
} else {
verify_prompt_reject(event, t);
« no previous file with comments | « LayoutTests/LeakExpectations ('k') | Source/bindings/core/v8/ScriptPromiseProperties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698