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

Unified Diff: LayoutTests/dart/spawn-uri.html

Issue 1532413002: Added Dartium changes onto 45.0.2454.104 (Closed) Base URL: http://src.chromium.org/blink/branches/chromium/2454
Patch Set: Created 5 years 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 | « LayoutTests/dart/spawn-dom-uri-expected.txt ('k') | LayoutTests/dart/spawn-uri-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/dart/spawn-uri.html
diff --git a/LayoutTests/dart/spawn-uri.html b/LayoutTests/dart/spawn-uri.html
new file mode 100644
index 0000000000000000000000000000000000000000..83b562f176642fde052ab2f9b8470ea7a40ef33c
--- /dev/null
+++ b/LayoutTests/dart/spawn-uri.html
@@ -0,0 +1,49 @@
+<html>
+<body>
+
+<script>
+if (window.testRunner) {
+ window.testRunner.dumpAsText();
+ window.testRunner.waitUntilDone();
+ window.addEventListener('message', function (e) {
+ window.testRunner.notifyDone();
+ });
+}
+</script>
+
+<div id="dart">
+main(msg, replyTo) {
+ print("Hello World");
+ replyTo.send("done");
+}
+</div>
+
+<script type="application/dart">
+import 'dart:html';
+import 'dart:isolate';
+import 'dart:js';
+
+void main() {
+ var code = querySelector('#dart');
+ var dataUri = 'data:application/dart;base64,${window.btoa(code.text)}';
+ // TODO(17738): Expand this test to validate parameters are passed and
+ // the correct future is returned.
+ var port = new ReceivePort();
+ try {
+ var isolate = Isolate.spawnUri(Uri.parse(dataUri), [], port.sendPort);
+ port.listen(_notifyDone);
+ isolate.catchError((x) { print("Isolate error $x"); _notifyDone();});
+ } catch (e) {
+ print("Spawn failed: $e");
+ _notifyDone();
+ }
+ code.remove();
+}
+
+_notifyDone([_]) {
+ window.postMessage('test-done', '*');
+}
+</script>
+
+</body>
+</html>
« no previous file with comments | « LayoutTests/dart/spawn-dom-uri-expected.txt ('k') | LayoutTests/dart/spawn-uri-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698