| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 layout tests with testrunner. | 6 * A configuration for running layout 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 if (document.query('#child') == null) { | 299 if (document.query('#child') == null) { |
| 300 document.body.nodes.add(new Element.html("<div id='child'></div>")); | 300 document.body.nodes.add(new Element.html("<div id='child'></div>")); |
| 301 } | 301 } |
| 302 } | 302 } |
| 303 | 303 |
| 304 /** | 304 /** |
| 305 * Allocate a Configuration. We allocate either a parent or | 305 * Allocate a Configuration. We allocate either a parent or |
| 306 * child, depending on whether the URL has a search part. | 306 * child, depending on whether the URL has a search part. |
| 307 */ | 307 */ |
| 308 void useHtmlLayoutConfiguration() { | 308 void useHtmlLayoutConfiguration() { |
| 309 if (config != null) return; | |
| 310 if (window.location.search == '') { // This is the parent. | 309 if (window.location.search == '') { // This is the parent. |
| 311 _prepareDom(); | 310 _prepareDom(); |
| 312 configure(new ParentHtmlConfiguration()); | 311 config = _singletonParent; |
| 313 } else { | 312 } else { |
| 314 configure(new ChildHtmlConfiguration()); | 313 config = _singletonChild; |
| 315 } | 314 } |
| 316 } | 315 } |
| 317 | 316 |
| 317 final _singletonParent = new ParentHtmlConfiguration(); |
| 318 final _singletonChild = new ChildHtmlConfiguration(); |
| OLD | NEW |