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

Side by Side Diff: sky/tests/events/custom-event.sky

Issue 1215063003: Remove Sky tests that we don't intend to port to the new world (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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
OLDNEW
(Empty)
1 <script>
2 import "../resources/third_party/unittest/unittest.dart";
3 import "../resources/unit.dart";
4
5 import "dart:sky";
6
7 class MyEvent extends Event {
8 MyEvent() : super(type: "awesome", bubbles: true);
9
10 bool get isCustom => true;
11 }
12
13 void main() {
14 initUnit();
15
16 test("should be able to dispatch", () {
17 var event = new MyEvent();
18 expect(event.isCustom, isTrue);
19 expect(event.type, equals("awesome"));
20 expect(event.bubbles, isTrue);
21 expect(event.cancelable, isFalse);
22 expect(event.isCustom, isTrue);
23
24 bool gotEvent = false;
25 var element = document.createElement("div");
26 element.addEventListener("awesome", (e) {
27 expect(e, equals(event));
28 expect(event.isCustom, isTrue);
29 gotEvent = true;
30 });
31 element.dispatchEvent(event);
32 expect(gotEvent, isTrue);
33 });
34 }
35 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698