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

Unified Diff: pkg/unittest/lib/src/simple_configuration.dart

Issue 23011047: Migrate stack filtering change to new configfuration class. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « pkg/unittest/lib/src/config.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/src/simple_configuration.dart
===================================================================
--- pkg/unittest/lib/src/simple_configuration.dart (revision 26564)
+++ pkg/unittest/lib/src/simple_configuration.dart (working copy)
@@ -50,7 +50,7 @@
// If stopTestOnExpectFailure is false, we need to capture failures, which
// we do with this List.
- final _testLogBuffer = <Pair<String, Trace>>[];
+ final _testLogBuffer = <Pair<String, StackTrace>>[];
/**
* The constructor sets up a failure handler for [expect] that redirects
@@ -61,6 +61,10 @@
}
void onInit() {
+ // For Dart internal tests, we don't want stack frame filtering.
+ // We turn it off here in the default config, but by default turn
+ // it back on in the vm and html configs.
+ filterStacks = false;
_receivePort = new ReceivePort();
_postMessage('unittest-suite-wait-for-done');
}
@@ -135,8 +139,9 @@
try {
throw '';
} catch (_, stack) {
- _testLogBuffer.add(
- new Pair<String, Trace>(reason, new Trace.from(stack)));
+ var trace = _getTrace(stack);
+ if (trace == null) trace = stack;
+ _testLogBuffer.add(new Pair<String, StackTrace>(reason, trace));
}
}
}
« no previous file with comments | « pkg/unittest/lib/src/config.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698