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

Side by Side Diff: tests/html/dromaeo_smoke_test.dart

Issue 12086028: Fix up dromaeo after lib v2 merge and add Dromaeo smoketest to prevent future (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
OLDNEW
(Empty)
1 library dromaeo;
2 import '../../pkg/unittest/lib/unittest.dart';
3 import '../../pkg/unittest/lib/html_config.dart';
4 import '../../samples/third_party/dromaeo/Dromaeo.dart' as originalTest;
5 import 'dart:html';
6 import 'dart:async';
7
8 /** A variant of the Dromaeo test shoehorned into a unit test. */
9 void main() {
10 var combo = '?dartANDhtmlANDnothing';
11 if (!window.location.search.toString().contains(combo)) {
12 if (window.location.href.toString().indexOf("?") == -1) {
13 window.location.href = '${window.location.href}${combo}';
14 } else {
15 window.location.href = '${window.location.href.toString().substring(0,
16 window.location.href.toString().indexOf("?"))}${combo}';
17 }
18 }
19
20 useHtmlConfiguration();
21
22 var scriptSrc = new ScriptElement();
23 scriptSrc.src = 'http://dart.googlecode.com/svn/branches/bleeding_edge/dart/'
24 'client/dart.js';
vsm 2013/01/30 22:35:51 This file is going to be removed. You can use the
Emily Fortuna 2013/01/31 00:44:58 Done.
25 document.head.children.add(scriptSrc);
26 document.body.innerHtml = '''${document.body.innerHtml}
27 <div id="main">
28 <h1 id="overview" class="test"><span>Performance Tests</span>
29 <input type="button" id="pause" class="pause" value="Loading..."/>
30 <div class="bar">
31 <div id="timebar" style="width:25%;">
32 <span class="left">Est.&nbsp;Time:&nbsp;<strong id="left">0:00</strong>
33 </span>
34 </div>
35 </div>
36 <ul id="tests">
37 <li><a href="?dom">Smoke Tests</a></li>
38 </ul>
39 </div>''';
40
41 bool isDone = false;
42 originalTest.main();
43
44 test('dromaeo runs', () {
45 new Timer.repeating(500, expectAsyncUntil1((timer) {
46 if (document.query('.alldone') != null) {
47 timer.cancel();
48 isDone = true;
49 expect(true, true);
vsm 2013/01/30 22:35:51 Why? :-)
Emily Fortuna 2013/01/31 00:44:58 Removed!
50 }
51 }, () => isDone));
52 });
53 }
OLDNEW
« tests/html/dromaeo_noop/dromaeo_smoke.dart.js ('K') | « tests/html/dromaeo_smoke-html.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698