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

Side by Side Diff: pkg/unittest/lib/html_config.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/unittest/lib/src/config.dart » ('j') | pkg/unittest/lib/src/config.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * A simple unit test library for running tests in a browser. 6 * A simple unit test library for running tests in a browser.
7 */ 7 */
8 library unittest_html_config; 8 library unittest_html_config;
9 9
10 import 'dart:async'; 10 import 'dart:async';
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 } 126 }
127 127
128 void processMessage(e) { 128 void processMessage(e) {
129 if ('unittest-suite-external-error' == e.data) { 129 if ('unittest-suite-external-error' == e.data) {
130 handleExternalError('<unknown>', '(external error detected)'); 130 handleExternalError('<unknown>', '(external error detected)');
131 } 131 }
132 } 132 }
133 133
134 void onInit() { 134 void onInit() {
135 var meta = query('meta[name="dart.unittest"]');
136 formatStacks = meta == null ? true :
137 !meta.content.contains('raw-stack-traces');
135 _installHandlers(); 138 _installHandlers();
136 window.postMessage('unittest-suite-wait-for-done', '*'); 139 window.postMessage('unittest-suite-wait-for-done', '*');
137 } 140 }
138 141
139 void onStart() { 142 void onStart() {
140 // If the URL has a #testFilter=testName then filter tests to that. 143 // If the URL has a #testFilter=testName then filter tests to that.
141 // This is used to make it easy to run a single test- but is only intended 144 // This is used to make it easy to run a single test- but is only intended
142 // for interactive debugging scenarios. 145 // for interactive debugging scenarios.
143 var hash = window.location.hash; 146 var hash = window.location.hash;
144 if (hash != null && hash.length > 1) { 147 if (hash != null && hash.length > 1) {
(...skipping 19 matching lines...) Expand all
164 window.postMessage('unittest-suite-done', '*'); 167 window.postMessage('unittest-suite-done', '*');
165 } 168 }
166 } 169 }
167 170
168 void useHtmlConfiguration([bool isLayoutTest = false]) { 171 void useHtmlConfiguration([bool isLayoutTest = false]) {
169 unittestConfiguration = isLayoutTest ? _singletonLayout : _singletonNotLayout; 172 unittestConfiguration = isLayoutTest ? _singletonLayout : _singletonNotLayout;
170 } 173 }
171 174
172 final _singletonLayout = new HtmlConfiguration(true); 175 final _singletonLayout = new HtmlConfiguration(true);
173 final _singletonNotLayout = new HtmlConfiguration(false); 176 final _singletonNotLayout = new HtmlConfiguration(false);
OLDNEW
« no previous file with comments | « no previous file | pkg/unittest/lib/src/config.dart » ('j') | pkg/unittest/lib/src/config.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698