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

Side by Side Diff: third_party/WebKit/LayoutTests/dialog/dialog-close-event-async.html

Issue 2355743005: Queue a close event for dialog.close (Closed)
Patch Set: Queue a close event for dialog.close Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-close-event.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <title>dialog element: close()</title>
5 <link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org">
6 <link rel=help href="https://html.spec.whatwg.org/multipage/#the-dialog-element" >
7 <script src="../resources/testharness.js"></script>
8 <script src="../resources/testharnessreport.js"></script>
9 </head>
10 <body>
11 <dialog id="d1" open>
12 <p>foobar</p>
13 <button>OK</button>
14 </dialog>
15 <script>
16 var d1 = document.getElementById('d1'),
17 t = async_test("close() fires a close event"),
18 was_queued = false;
19
20 d1.onclose = t.step_func_done(function(e) {
21 assert_true(was_queued, "close event should be queued");
22 assert_true(e.isTrusted, "close event is trusted");
23 assert_false(e.bubbles, "close event doesn't bubble");
24 assert_false(e.cancelable, "close event is not cancelable");
25 });
26
27 t.step(function() {
28 d1.close();
29 was_queued = true;
30 })
31 </script>
32 </body>
33 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/dialog-close-event.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698