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 b962e1e41b5c2b6eaee093c8d43ee5b469cf56b1..9d43d0988a36c07efc9fc8bac385485334f29568 100644 |
--- a/pkg/unittest/lib/interactive_html_config.dart |
+++ b/pkg/unittest/lib/interactive_html_config.dart |
@@ -20,9 +20,6 @@ library unittest_interactive_html_config; |
import 'dart:html'; |
import 'dart:async'; |
import 'dart:math'; |
- |
-import 'package:stack_trace/stack_trace.dart'; |
- |
import 'unittest.dart'; |
/** The messages exchanged between parent and child. */ |
@@ -155,25 +152,17 @@ class ChildInteractiveHtmlConfiguration extends HtmlConfiguration { |
} |
/** |
- * Get the elapsed time for the test, and post the test result back to the |
- * parent window. If the test failed due to an exception the stack is posted |
- * back too (before the test result). |
+ * Get the elapsed time for the test, anbd post the test result |
+ * back to the parent window. If the test failed due to an exception |
+ * the stack is posted back too (before the test result). |
*/ |
void onTestResult(TestCase testCase) { |
super.onTestResult(testCase); |
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) { |
- return <String>{ |
- "uri": frame.uri.toString(), |
- "line": frame.line, |
- "column": frame.column, |
- "member": frame.member |
- }; |
- }).toList()); |
_parentWindow.postMessage( |
- _Message.text(_Message.STACK, elapsed, message), '*'); |
+ _Message.text(_Message.STACK, elapsed, testCase.stackTrace), '*'); |
} |
_parentWindow.postMessage( |
_Message.text(testCase.result, elapsed, testCase.message), '*'); |
@@ -196,7 +185,7 @@ class ParentInteractiveHtmlConfiguration extends HtmlConfiguration { |
/** The stack that was posted back from the child, if any. */ |
- Trace _stack; |
+ String _stack; |
int _testTime; |
/** |
@@ -244,13 +233,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) { |
- return new Frame( |
- Uri.parse(frame['uri']), |
- frame['line'], |
- frame['column'], |
- frame['member']); |
- })); |
+ _stack = msg.body; |
} else { |
_testTime = msg.elapsed; |
logMessage(_Message.text(_Message.LOG, _testTime, 'Complete')); |