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

Side by Side Diff: pkg/dev_compiler/test/codegen/lib/html/event_test.dart

Issue 2416853003: Move minitest.dart into the expect package. (Closed)
Patch Set: 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 import 'dart:html'; 5 import 'dart:html';
6 6
7 import 'package:minitest/minitest.dart'; 7 import 'package:expect/minitest.dart';
8 8
9 eventTest(String name, Event eventFn(), void validate(Event), 9 eventTest(String name, Event eventFn(), void validate(Event),
10 [String type = 'foo']) { 10 [String type = 'foo']) {
11 test(name, () { 11 test(name, () {
12 final el = new Element.tag('div'); 12 final el = new Element.tag('div');
13 var fired = false; 13 var fired = false;
14 el.on[type].listen((ev) { 14 el.on[type].listen((ev) {
15 fired = true; 15 fired = true;
16 validate(ev); 16 validate(ev);
17 }); 17 });
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 expect(ev.screen.x, 3); 184 expect(ev.screen.x, 3);
185 expect(ev.screen.y, 4); 185 expect(ev.screen.y, 4);
186 expect(ev.client.x, 5); 186 expect(ev.client.x, 5);
187 expect(ev.client.y, 6); 187 expect(ev.client.y, 6);
188 expect(ev.ctrlKey, isTrue); 188 expect(ev.ctrlKey, isTrue);
189 expect(ev.altKey, isTrue); 189 expect(ev.altKey, isTrue);
190 expect(ev.shiftKey, isTrue); 190 expect(ev.shiftKey, isTrue);
191 expect(ev.metaKey, isTrue); 191 expect(ev.metaKey, isTrue);
192 }, 'mousewheel'); 192 }, 'mousewheel');
193 } 193 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698