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

Unified Diff: tests/dom/dom_isolates_test.dart

Issue 10178014: Copy lib/dom tests that use dart:html to lib/html. (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 | « tests/dom/dom_constructors_test.dart ('k') | tests/dom/domparser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/dom/dom_isolates_test.dart
diff --git a/tests/dom/dom_isolates_test.dart b/tests/dom/dom_isolates_test.dart
deleted file mode 100644
index 1574a1f772d4ae4f4363beec18dbf46759cb0a3a..0000000000000000000000000000000000000000
--- a/tests/dom/dom_isolates_test.dart
+++ /dev/null
@@ -1,60 +0,0 @@
-#library('DOMIsolatesTest');
-#import('../../lib/unittest/unittest.dart');
-#import('../../lib/unittest/html_config.dart');
-#import('dart:html');
-#import('dart:isolate');
-
-isolateMain(port) {
- port.receive((msg, replyTo) {
- if (msg != 'check') {
- replyTo.send('wrong msg: $msg');
- }
- replyTo.send(window.location.toString());
- port.close();
- });
-}
-
-isolateMainTrampoline(port) {
- final childPortFuture = spawnDomIsolate(window, 'isolateMain');
- port.receive((msg, parentPort) {
- childPortFuture.then((childPort) {
- childPort.call(msg).then((response) {
- parentPort.send(response);
- port.close();
- });
- });
- });
-}
-
-main() {
- useHtmlConfiguration();
-
- final iframe = new Element.tag('iframe');
- document.body.nodes.add(iframe);
-
- asyncTest('Simple DOM isolate test', 1, () {
- spawnDomIsolate(iframe.contentWindow, 'isolateMain').then((sendPort) {
- sendPort.call('check').then((msg) {
- Expect.equals('about:blank', msg);
- callbackDone();
- });
- });
- });
-
- asyncTest('Nested DOM isolates test', 1, () {
- spawnDomIsolate(iframe.contentWindow, 'isolateMainTrampoline').then((sendPort) {
- sendPort.call('check').then((msg) {
- Expect.equals('about:blank', msg);
- callbackDone();
- });
- });
- });
-
- test('Null as target window', () {
- expectThrow(() => spawnDomIsolate(null, 'isolateMain'));
- });
-
- test('Not window as target window', () {
- expectThrow(() => spawnDomIsolate(document, 'isolateMain'));
- });
-}
« no previous file with comments | « tests/dom/dom_constructors_test.dart ('k') | tests/dom/domparser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698