OLD | NEW |
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('swarm_tests'); | 5 #library('swarm_tests'); |
6 | 6 |
7 #import('dart:html'); | 7 #import('dart:html'); |
8 #import('../../../../swarm/swarmlib.dart'); | 8 #import('../../../../swarm/swarmlib.dart'); |
9 #import('../../../../ui_lib/base/base.dart'); | 9 #import('../../../../ui_lib/base/base.dart'); |
10 #import('../../../../ui_lib/view/view.dart'); | 10 #import('../../../../ui_lib/view/view.dart'); |
11 #import('../../../../ui_lib/util/utilslib.dart'); | 11 #import('../../../../ui_lib/util/utilslib.dart'); |
12 #import('../../../../../lib/unittest/unittest_html.dart'); | 12 #import('../../../../../lib/unittest/unittest.dart'); |
| 13 #import('../../../../../lib/unittest/html_config.dart'); |
13 | 14 |
14 // TODO(jmesserly): these would probably be easier to debug if they were written | 15 // TODO(jmesserly): these would probably be easier to debug if they were written |
15 // in the WebKit layout test style, so we could easy compare that the DOM is | 16 // in the WebKit layout test style, so we could easy compare that the DOM is |
16 // what we expect it to be after performing some simulated user actions. | 17 // what we expect it to be after performing some simulated user actions. |
17 | 18 |
18 void main() { | 19 void main() { |
| 20 useHtmlConfiguration(); |
19 Swarm swarm = new Swarm(); | 21 Swarm swarm = new Swarm(); |
20 UIStateProxy state = new UIStateProxy(swarm.sections); | 22 UIStateProxy state = new UIStateProxy(swarm.sections); |
21 swarm.state = state; | 23 swarm.state = state; |
22 swarm.run(); | 24 swarm.run(); |
23 // TODO(jmesserly): should be adding the full stylesheet here | 25 // TODO(jmesserly): should be adding the full stylesheet here |
24 Dom.addStyle(''' | 26 Dom.addStyle(''' |
25 .story-content { | 27 .story-content { |
26 -webkit-column-width: 300px; | 28 -webkit-column-width: 300px; |
27 -webkit-column-gap: 26px; /* 2em */ | 29 -webkit-column-gap: 26px; /* 2em */ |
28 }'''); | 30 }'''); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 void invokeNext() { | 147 void invokeNext() { |
146 closures[i](); | 148 closures[i](); |
147 i++; | 149 i++; |
148 if (i < length) { | 150 if (i < length) { |
149 window.setTimeout(invokeNext, 0); | 151 window.setTimeout(invokeNext, 0); |
150 } | 152 } |
151 } | 153 } |
152 window.setTimeout(invokeNext, 0); | 154 window.setTimeout(invokeNext, 0); |
153 } | 155 } |
154 } | 156 } |
OLD | NEW |