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

Side by Side Diff: pkg/unittest/lib/interactive_html_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 * This configuration can be used to rerun selected tests, as well 6 * This configuration can be used to rerun selected tests, as well
7 * as see diagnostic output from tests. It runs each test in its own 7 * as see diagnostic output from tests. It runs each test in its own
8 * IFrame, so the configuration consists of two parts - a 'parent' 8 * IFrame, so the configuration consists of two parts - a 'parent'
9 * config that manages all the tests, and a 'child' config for the 9 * config that manages all the tests, and a 'child' config for the
10 * IFrame that runs the individual tests. 10 * IFrame that runs the individual tests.
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 if (document.query('#child') == null) { 462 if (document.query('#child') == null) {
463 document.body.nodes.add(new Element.html("<div id='child'></div>")); 463 document.body.nodes.add(new Element.html("<div id='child'></div>"));
464 } 464 }
465 } 465 }
466 466
467 /** 467 /**
468 * Allocate a Configuration. We allocate either a parent or 468 * Allocate a Configuration. We allocate either a parent or
469 * child, depedning on whether the URL has a search part. 469 * child, depedning on whether the URL has a search part.
470 */ 470 */
471 void useInteractiveHtmlConfiguration() { 471 void useInteractiveHtmlConfiguration() {
472 if (config != null) return;
472 if (window.location.search == '') { // This is the parent. 473 if (window.location.search == '') { // This is the parent.
473 _prepareDom(); 474 _prepareDom();
474 configure(new ParentInteractiveHtmlConfiguration()); 475 configure(new ParentInteractiveHtmlConfiguration());
475 } else { 476 } else {
476 configure(new ChildInteractiveHtmlConfiguration()); 477 configure(new ChildInteractiveHtmlConfiguration());
477 } 478 }
478 } 479 }
479 480
480 String _CSS = """ 481 String _CSS = """
481 body { 482 body {
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 display: block; 670 display: block;
670 list-style-type: disc; 671 list-style-type: disc;
671 -webkit-margin-before: 1em; 672 -webkit-margin-before: 1em;
672 -webkit-margin-after: 1em; 673 -webkit-margin-after: 1em;
673 -webkit-margin-start: 0px; 674 -webkit-margin-start: 0px;
674 -webkit-margin-end: 0px; 675 -webkit-margin-end: 0px;
675 -webkit-padding-start: 40px; 676 -webkit-padding-start: 40px;
676 } 677 }
677 678
678 """; 679 """;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698