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

Side by Side Diff: pkg/unittest/lib/html_layout_config.dart

Issue 11369210: Make RegExp constructor non-const. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up status files. Created 8 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 configuration for running layoutr tests with testrunner. 6 * A configuration for running layoutr tests with testrunner.
7 * This configuration is similar to the interactive_html_config 7 * This configuration is similar to the interactive_html_config
8 * as it runs each test in its own IFrame. However, where the former 8 * as it runs each test in its own IFrame. However, where the former
9 * recreated the IFrame for each test, here the IFrames are preserved. 9 * recreated the IFrame for each test, here the IFrames are preserved.
10 * Furthermore we post a message on completion. 10 * Furthermore we post a message on completion.
(...skipping 22 matching lines...) Expand all
33 33
34 static String text(String messageType, 34 static String text(String messageType,
35 [int elapsed = 0, String body = '']) => 35 [int elapsed = 0, String body = '']) =>
36 '$messageType $elapsed $body'; 36 '$messageType $elapsed $body';
37 37
38 _Message(this.messageType, [this.elapsed = 0, this.body = '']); 38 _Message(this.messageType, [this.elapsed = 0, this.body = '']);
39 39
40 _Message.fromString(String msg) { 40 _Message.fromString(String msg) {
41 // The format of a message is '<type> <elapsedTime> <body>'. 41 // The format of a message is '<type> <elapsedTime> <body>'.
42 // If we don't get a type we default to a 'log' type. 42 // If we don't get a type we default to a 'log' type.
43 var messageParser = const RegExp('\([a-z]*\) \([0-9]*\) \(.*\)'); 43 var messageParser = new RegExp('\([a-z]*\) \([0-9]*\) \(.*\)');
44 Match match = messageParser.firstMatch(msg); 44 Match match = messageParser.firstMatch(msg);
45 if (match == null) { 45 if (match == null) {
46 messageType = 'log'; 46 messageType = 'log';
47 elapsed = 0; 47 elapsed = 0;
48 body = msg; 48 body = msg;
49 } else { 49 } else {
50 messageType = match.group(1); 50 messageType = match.group(1);
51 elapsed = int.parse(match.group(2)); 51 elapsed = int.parse(match.group(2));
52 body = match.group(3); 52 body = match.group(3);
53 } 53 }
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 */ 301 */
302 void useHtmlLayoutConfiguration() { 302 void useHtmlLayoutConfiguration() {
303 if (window.location.search == '') { // This is the parent. 303 if (window.location.search == '') { // This is the parent.
304 _prepareDom(); 304 _prepareDom();
305 configure(new ParentHtmlConfiguration()); 305 configure(new ParentHtmlConfiguration());
306 } else { 306 } else {
307 configure(new ChildHtmlConfiguration()); 307 configure(new ChildHtmlConfiguration());
308 } 308 }
309 } 309 }
310 310
OLDNEW
« no previous file with comments | « pkg/intl/lib/src/date_format_helpers.dart ('k') | pkg/unittest/lib/interactive_html_config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698