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

Side by Side Diff: tests/benchmark_smoke/benchmark_smoke_test.dart

Issue 12258018: Fix benchmark smoke test as well with change. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « tests/benchmark_smoke/benchmark_lib.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 library benchmarksmoketest; 5 library benchmarksmoketest;
6 6
7 // Tests that benchmark classes used in perf testing are not broken. 7 // Tests that benchmark classes used in perf testing are not broken.
8 import 'benchmark_lib.dart'; 8 import 'benchmark_lib.dart';
9 import 'dart:async';
9 import 'dart:html'; 10 import 'dart:html';
10 import '../../pkg/unittest/lib/unittest.dart'; 11 import '../../pkg/unittest/lib/unittest.dart';
11 import '../../pkg/unittest/lib/html_config.dart'; 12 import '../../pkg/unittest/lib/html_config.dart';
12 13
13 void main() { 14 void main() {
14 useHtmlConfiguration(); 15 useHtmlConfiguration();
15 16
16 test('performanceTesting', () { 17 test('performanceTesting', () {
17 window.setTimeout(BENCHMARK_SUITE.runBenchmarks, 0); 18 Timer.run(BENCHMARK_SUITE.runBenchmarks);
18 window.setTimeout(expectAsync0(testForCompletion), 0); 19 Timer.run(expectAsync0(testForCompletion));
19 }); 20 });
20 } 21 }
21 22
22 testForCompletion() { 23 testForCompletion() {
23 Element element = document.query('#testResultScore'); 24 Element element = document.query('#testResultScore');
24 RegExp re = new RegExp('Score: [0-9]+'); 25 RegExp re = new RegExp('Score: [0-9]+');
25 print(element.text); 26 print(element.text);
26 Expect.isTrue(re.hasMatch(element.text)); 27 Expect.isTrue(re.hasMatch(element.text));
27 } 28 }
OLDNEW
« no previous file with comments | « tests/benchmark_smoke/benchmark_lib.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698