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

Side by Side Diff: LayoutTests/fast/events/constructors/event-constructors.html

Issue 1154943009: bindings: Remove [EventConstructor] and [InitializedByEventConstructor] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/events/constructors/event-constructors-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 8
9 description("This tests the constructors for all the event DOM classes that have them."); 9 description("This tests the constructors for all the event DOM classes that have them.");
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // Empty initalizer. 44 // Empty initalizer.
45 test("new Event('eventType', { })", false, false); 45 test("new Event('eventType', { })", false, false);
46 46
47 // null initializer. 47 // null initializer.
48 test("new Event('eventType', null)", false, false); 48 test("new Event('eventType', null)", false, false);
49 49
50 // Explicitly undefined initializer. 50 // Explicitly undefined initializer.
51 test("new Event('eventType', undefined)", false, false); 51 test("new Event('eventType', undefined)", false, false);
52 52
53 // A number as the initializer. 53 // A number as the initializer.
54 // FIXME: Should this throw? 54 shouldThrow("new Event('eventType', 0)");
bashi 2015/06/03 03:40:38 Yes. This should throw. Firefox throws exceptions
55 test("new Event('eventType', 0)", false, false);
56 55
57 // The window as the initializer. 56 // The window as the initializer.
58 test("new Event('eventType', window)", false, false); 57 test("new Event('eventType', window)", false, false);
59 58
60 // The window as the initializer, but with bubbles defined to true. 59 // The window as the initializer, but with bubbles defined to true.
61 var bubbles = true; 60 var bubbles = true;
62 test("new Event('eventType', window)", true, false); 61 test("new Event('eventType', window)", true, false);
63 62
64 // One value defined on the prototype chain of a host object. 63 // One value defined on the prototype chain of a host object.
65 Document.prototype.bubbles = true; 64 Document.prototype.bubbles = true;
(...skipping 11 matching lines...) Expand all
77 // One getter returning true. 76 // One getter returning true.
78 test("new Event('eventType', { bubbles: true, get cancelable() { return true; } })", true, true); 77 test("new Event('eventType', { bubbles: true, get cancelable() { return true; } })", true, true);
79 78
80 // One getter returning false. 79 // One getter returning false.
81 test("new Event('eventType', { bubbles: true, get cancelable() { return false; } })", true, false); 80 test("new Event('eventType', { bubbles: true, get cancelable() { return false; } })", true, false);
82 81
83 // One getter throws an exeception. 82 // One getter throws an exeception.
84 shouldThrow("new Event('eventType', { bubbles: true, get cancelable() { throw 'C ustom Error'; } })") 83 shouldThrow("new Event('eventType', { bubbles: true, get cancelable() { throw 'C ustom Error'; } })")
85 </script> 84 </script>
86 </body> 85 </body>
87 </html> 86 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/constructors/event-constructors-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698