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

Side by Side Diff: LayoutTests/fast/events/constructors/media-query-list-event-constructor.html

Issue 799733002: Use event init dictionaries in core/{css,html} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8
9 description("This tests the constructor for the MediaQueryListEvent DOM class.") ;
10
11 // No initializer passed.
12 shouldBeFalse("new MediaQueryListEvent('eventType').bubbles");
13 shouldBeFalse("new MediaQueryListEvent('eventType').cancelable");
14 shouldBeEmptyString("new MediaQueryListEvent('eventType').media");
15 shouldBeFalse("new MediaQueryListEvent('eventType').matches");
16
17 // Bubbles and cancelable true, media and matches are missing.
18 shouldBeTrue("new MediaQueryListEvent('eventType', { bubbles: true, cancelable: true }).bubbles");
19 shouldBeTrue("new MediaQueryListEvent('eventType', { bubbles: true, cancelable: true }).cancelable");
20 shouldBeEmptyString("new MediaQueryListEvent('eventType').media");
21 shouldBeFalse("new MediaQueryListEvent('eventType').matches");
22
23 // media is passed.
24 shouldBeEqualToString("new MediaQueryListEvent('eventType', { media: 'string' }) .media", "string");
25
26 // matches is passed.
27 shouldBeTrue("new MediaQueryListEvent('eventType', { matches: true }).matches");
28
29 </script>
30 </body>
31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698