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

Side by Side Diff: pkg/unittest/lib/html_layout_config.dart

Issue 11862002: Make 'useXConfiguration' check for an existing configuration. This is so that it (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698