OLD | NEW |
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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 if (document.query('#child') == null) { | 298 if (document.query('#child') == null) { |
299 document.body.nodes.add(new Element.html("<div id='child'></div>")); | 299 document.body.nodes.add(new Element.html("<div id='child'></div>")); |
300 } | 300 } |
301 } | 301 } |
302 | 302 |
303 /** | 303 /** |
304 * Allocate a Configuration. We allocate either a parent or | 304 * Allocate a Configuration. We allocate either a parent or |
305 * child, depending on whether the URL has a search part. | 305 * child, depending on whether the URL has a search part. |
306 */ | 306 */ |
307 void useHtmlLayoutConfiguration() { | 307 void useHtmlLayoutConfiguration() { |
| 308 if (config != null) return; |
308 if (window.location.search == '') { // This is the parent. | 309 if (window.location.search == '') { // This is the parent. |
309 _prepareDom(); | 310 _prepareDom(); |
310 configure(new ParentHtmlConfiguration()); | 311 configure(new ParentHtmlConfiguration()); |
311 } else { | 312 } else { |
312 configure(new ChildHtmlConfiguration()); | 313 configure(new ChildHtmlConfiguration()); |
313 } | 314 } |
314 } | 315 } |
315 | 316 |
OLD | NEW |