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

Side by Side Diff: tests/html/event_customevent_test.dart

Issue 231413003: using unittest via package import (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 6 years, 8 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 | « tests/html/element_types_test.dart ('k') | tests/html/event_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library EventCustomEventTest; 5 library EventCustomEventTest;
6 6
7 import '../../pkg/unittest/lib/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 import '../../pkg/unittest/lib/html_config.dart'; 8 import 'package:unittest/html_config.dart';
9 import 'dart:html'; 9 import 'dart:html';
10 import 'dart:js' as js; 10 import 'dart:js' as js;
11 11
12 class DartPayloadData { 12 class DartPayloadData {
13 final dartValue; 13 final dartValue;
14 14
15 DartPayloadData(this.dartValue); 15 DartPayloadData(this.dartValue);
16 } 16 }
17 17
18 main() { 18 main() {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 var event = new CustomEvent('dart_custom_data_event', detail: data); 77 var event = new CustomEvent('dart_custom_data_event', detail: data);
78 78
79 var future = window.on['dart_custom_data_event'].first.then((_) { 79 var future = window.on['dart_custom_data_event'].first.then((_) {
80 expect(event.detail.dartValue, 666); 80 expect(event.detail.dartValue, 666);
81 }); 81 });
82 82
83 document.body.dispatchEvent(event); 83 document.body.dispatchEvent(event);
84 return future; 84 return future;
85 }); 85 });
86 } 86 }
OLDNEW
« no previous file with comments | « tests/html/element_types_test.dart ('k') | tests/html/event_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698