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

Unified Diff: client/tests/client/dom/EventsTest.dart

Issue 10191033: test renaming overhaul: step 4 client tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/tests/client/dom/DocumentTest.dart ('k') | client/tests/client/dom/ExceptionsTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/client/dom/EventsTest.dart
diff --git a/client/tests/client/dom/EventsTest.dart b/client/tests/client/dom/EventsTest.dart
deleted file mode 100644
index 1b58acfa3552a898b283ec615da4b7c911657f6a..0000000000000000000000000000000000000000
--- a/client/tests/client/dom/EventsTest.dart
+++ /dev/null
@@ -1,61 +0,0 @@
-#library('EventsTest');
-#import('../../../../lib/unittest/unittest.dart');
-#import('../../../../lib/unittest/dom_config.dart');
-#import('dart:dom');
-
-main() {
- useDomConfiguration();
- test('TimeStamp', () {
- Event event = document.createEvent('Event');
-
- int timeStamp = event.timeStamp;
- Expect.isTrue(timeStamp > 0);
- });
- // The next test is not asynchronous because [dispatchEvent] fires the event
- // and event listener synchronously.
- test('EventTarget', () {
- HTMLElement element = window.document.createElement('test');
- element.id = 'eventtarget';
- window.document.body.appendChild(element);
-
- int invocationCounter = 0;
- void handler(Event e) {
- Expect.equals('test', e.type);
- HTMLElement target = e.target;
- Expect.identical(element, target);
- invocationCounter++;
- }
-
- Event event = window.document.createEvent('Event');
- event.initEvent('test', true, false);
-
- invocationCounter = 0;
- element.dispatchEvent(event);
- Expect.equals(0, invocationCounter);
-
- element.addEventListener('test', handler, false);
- invocationCounter = 0;
- element.dispatchEvent(event);
- Expect.equals(1, invocationCounter);
-
- element.removeEventListener('test', handler, false);
- invocationCounter = 0;
- element.dispatchEvent(event);
- Expect.equals(0, invocationCounter);
-
- element.addEventListener('test', handler, false);
- invocationCounter = 0;
- element.dispatchEvent(event);
- Expect.equals(1, invocationCounter);
-
- element.addEventListener('test', handler, false);
- invocationCounter = 0;
- element.dispatchEvent(event);
- Expect.equals(1, invocationCounter);
- });
- test('InitMouseEvent', () {
- HTMLDivElement div = window.document.createElement('div');
- MouseEvent event = window.document.createEvent('MouseEvent');
- event.initMouseEvent('zebra', true, true, window, 0, 1, 2, 3, 4, false, false, false, false, 0, div);
- });
-}
« no previous file with comments | « client/tests/client/dom/DocumentTest.dart ('k') | client/tests/client/dom/ExceptionsTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698