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

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

Issue 18400002: Roll back "Use package:stack_trace in unittest." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | « pkg/unittest/lib/html_enhanced_config.dart ('k') | pkg/unittest/lib/src/config.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0928efd80bf3d8695ca62c95919cac4746d807f6..1fcb07c4007fc3bf959289030d52c0c035271a09 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. */
@@ -150,25 +147,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), '*');
@@ -191,7 +180,7 @@ class ParentInteractiveHtmlConfiguration extends HtmlConfiguration {
/** The stack that was posted back from the child, if any. */
- Trace _stack;
+ String _stack;
int _testTime;
/**
@@ -235,13 +224,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'));
« no previous file with comments | « pkg/unittest/lib/html_enhanced_config.dart ('k') | pkg/unittest/lib/src/config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698