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

Unified Diff: pkg/unittest/lib/interactive_html_config.dart

Issue 23596007: Remove usage of dart:json. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 7 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
Index: pkg/unittest/lib/interactive_html_config.dart
diff --git a/pkg/unittest/lib/interactive_html_config.dart b/pkg/unittest/lib/interactive_html_config.dart
index 27791ee213df859fa345a521b67eaf9467ae8d0a..16a69a0916acd3934bd5551219caf2d63f2c2878 100644
--- a/pkg/unittest/lib/interactive_html_config.dart
+++ b/pkg/unittest/lib/interactive_html_config.dart
@@ -19,7 +19,7 @@ library unittest_interactive_html_config;
import 'dart:html';
import 'dart:async';
-import 'dart:json' as json;
+import 'dart:convert';
import 'package:stack_trace/stack_trace.dart';
@@ -164,7 +164,7 @@ class ChildInteractiveHtmlConfiguration extends HtmlConfiguration {
DateTime end = new DateTime.now();
int elapsed = end.difference(_testStarts[testCase.id]).inMilliseconds;
if (testCase.stackTrace != null) {
- var message = json.stringify(testCase.stackTrace.frames.map((frame) {
+ var message = JSON.encode(testCase.stackTrace.frames.map((frame) {
return <String, dynamic>{
"uri": frame.uri.toString(),
"line": frame.line,
@@ -244,7 +244,7 @@ class ParentInteractiveHtmlConfiguration extends HtmlConfiguration {
if (msg.messageType == _Message.LOG) {
logMessage(e.data);
} else if (msg.messageType == _Message.STACK) {
- _stack = new Trace(json.parse(msg.body).map((frame) {
+ _stack = new Trace(JSON.decode(msg.body).map((frame) {
return new Frame(
Uri.parse(frame['uri']),
frame['line'],

Powered by Google App Engine
This is Rietveld 408576698