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

Unified Diff: tools/testing/dart/browser_test.dart

Issue 22859009: Changes to how we handle fancy stacks: (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
Index: tools/testing/dart/browser_test.dart
===================================================================
--- tools/testing/dart/browser_test.dart (revision 26407)
+++ tools/testing/dart/browser_test.dart (working copy)
@@ -4,15 +4,28 @@
part of test_suite;
+String _stackMeta(bool fancyStacks, bool filterStacks) {
+ if (fancyStacks) {
+ if (!filterStacks) {
+ return '<meta name="dart.unittest" content="full-stack-traces">\n';
+ }
+ } else {
+ return '<meta name="dart.unittest" content="raw-stack-traces">\n';
+ }
+ return '';
+}
+
String getHtmlContents(String title,
String scriptType,
- Path sourceScript) =>
+ Path sourceScript,
+ bool fancyStacks,
+ bool filterStacks) =>
"""
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title> Test $title </title>
+ ${_stackMeta(fancyStacks, filterStacks)}<title> Test $title </title>
<style>
.unittest-table { font-family:monospace; border:1px; }
.unittest-pass { background: #6b3;}
@@ -36,13 +49,16 @@
</html>
""";
-String getHtmlLayoutContents(String scriptType, Path sourceScript) =>
+String getHtmlLayoutContents(String scriptType,
+ Path sourceScript,
+ bool fancyStacks,
+ bool filterStacks) =>
"""
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
-</head>
+ ${_stackMeta(fancyStacks, filterStacks)}</head>
<body>
<script type="text/javascript">
if (navigator.webkitStartDart) navigator.webkitStartDart();

Powered by Google App Engine
This is Rietveld 408576698