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

Unified Diff: lib/src/runner/browser/static/host.dart

Issue 2272223003: Stop JSON-encoding cross-frame messages. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 4 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 | « lib/src/runner/browser/post_message_channel.dart ('k') | lib/src/runner/browser/static/host.dart.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/browser/static/host.dart
diff --git a/lib/src/runner/browser/static/host.dart b/lib/src/runner/browser/static/host.dart
index fcb33a0311f4dbd8689da33e4d0dac8bb11d4ee9..10cae7aff8a954923bf5912f1bf3383c899fd5fe 100644
--- a/lib/src/runner/browser/static/host.dart
+++ b/lib/src/runner/browser/static/host.dart
@@ -13,7 +13,6 @@ import 'package:stream_channel/stream_channel.dart';
/// The iframes created for each loaded test suite, indexed by the suite id.
final _iframes = new Map<int, IFrameElement>();
-// TODO(nweiz): test this once we can run browser tests.
/// Code that runs in the browser and loads test suites at the server's behest.
///
/// One instance of this runs for each browser. When the server tells it to load
@@ -164,11 +163,7 @@ StreamChannel _connectToIframe(String url, int id) {
controller.local.stream.listen((message) async {
await readyCompleter.future;
- // JSON-encode the message to work around sdk#25636, which caused the
- // structured clone algorithm to be broken with Window.postMessage in
- // 1.14.{0,1,2}. Once we no longer care about these Dartiums, stop encoding.
- iframe.contentWindow.postMessage(
- JSON.encode(message), window.location.origin);
+ iframe.contentWindow.postMessage(message, window.location.origin);
});
return controller.foreign;
« no previous file with comments | « lib/src/runner/browser/post_message_channel.dart ('k') | lib/src/runner/browser/static/host.dart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698