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

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

Issue 1137803003: Workaround Dartium limitation in event_test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | no next file » | 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) 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 library EventTest; 5 library EventTest;
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 import 'package:unittest/html_config.dart'; 8 import 'package:unittest/html_config.dart';
9 import 'dart:html'; 9 import 'dart:html';
10 10
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // expect(ev.elapsedTime, 0.5); 172 // expect(ev.elapsedTime, 0.5);
173 // }); 173 // });
174 174
175 eventTest('UIEvent', () => new UIEvent('foo', view: window, detail: 12), 175 eventTest('UIEvent', () => new UIEvent('foo', view: window, detail: 12),
176 (ev) { 176 (ev) {
177 expect(window, ev.view); 177 expect(window, ev.view);
178 expect(12, ev.detail); 178 expect(12, ev.detail);
179 }); 179 });
180 180
181 eventTest('WheelEvent', 181 eventTest('WheelEvent',
182 () => new WheelEvent("mousewheel", view: window, deltaX: 1, deltaY: 0, 182 // TODO(alanknight): Can't pass window on Dartium. Add view: window
183 // once going through JS.
184 () => new WheelEvent("mousewheel", deltaX: 1, deltaY: 0,
183 detail: 4, screenX: 3, screenY: 4, clientX: 5, clientY: 6, 185 detail: 4, screenX: 3, screenY: 4, clientX: 5, clientY: 6,
184 ctrlKey: true, altKey: true, shiftKey: true, metaKey: true), 186 ctrlKey: true, altKey: true, shiftKey: true, metaKey: true),
185 (ev) { 187 (ev) {
186 expect(ev.deltaX, 1); 188 expect(ev.deltaX, 1);
187 expect(ev.deltaY, 0); 189 expect(ev.deltaY, 0);
188 expect(ev.screen.x, 3); 190 expect(ev.screen.x, 3);
189 expect(ev.screen.y, 4); 191 expect(ev.screen.y, 4);
190 expect(ev.client.x, 5); 192 expect(ev.client.x, 5);
191 expect(ev.client.y, 6); 193 expect(ev.client.y, 6);
192 expect(ev.ctrlKey, isTrue); 194 expect(ev.ctrlKey, isTrue);
193 expect(ev.altKey, isTrue); 195 expect(ev.altKey, isTrue);
194 expect(ev.shiftKey, isTrue); 196 expect(ev.shiftKey, isTrue);
195 expect(ev.metaKey, isTrue); 197 expect(ev.metaKey, isTrue);
196 }, 'mousewheel'); 198 }, 'mousewheel');
197 } 199 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698