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

Side by Side Diff: tools/testing/dart/test_runner.dart

Issue 16948002: Add correct timing collection for new browser controller (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
« no previous file with comments | « tools/testing/dart/browser_controller.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * Classes and methods for executing tests. 6 * Classes and methods for executing tests.
7 * 7 *
8 * This module includes: 8 * This module includes:
9 * - Managing parallel execution of tests, including timeout checks. 9 * - Managing parallel execution of tests, including timeout checks.
10 * - Evaluating the output of each test as pass/fail/crash/timeout. 10 * - Evaluating the output of each test as pass/fail/crash/timeout.
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1660 return testRunner; 1660 return testRunner;
1661 } 1661 }
1662 print("Issue starting browser test runner"); 1662 print("Issue starting browser test runner");
1663 io.exit(1); 1663 io.exit(1);
1664 }); 1664 });
1665 } 1665 }
1666 return new Future.immediate(_browserTestRunners[runtime]); 1666 return new Future.immediate(_browserTestRunners[runtime]);
1667 } 1667 }
1668 1668
1669 void _startBrowserControllerTest(var test) { 1669 void _startBrowserControllerTest(var test) {
1670 var callback = (var output) { 1670 var callback = (var output, var duration) {
1671 var nextCommandIndex = test.commandOutputs.keys.length; 1671 var nextCommandIndex = test.commandOutputs.keys.length;
1672 new CommandOutput.fromCase(test, 1672 new CommandOutput.fromCase(test,
1673 test.commands[nextCommandIndex], 1673 test.commands[nextCommandIndex],
1674 0, 1674 0,
1675 false, 1675 false,
1676 output == "TIMEOUT", 1676 output == "TIMEOUT",
1677 encodeUtf8(output), 1677 encodeUtf8(output),
1678 [], 1678 [],
1679 const Duration(seconds: 1), 1679 duration,
1680 false); 1680 false);
1681 test.completedHandler(test); 1681 test.completedHandler(test);
1682 }; 1682 };
1683 BrowserTest browserTest = new BrowserTest(test.testingUrl, 1683 BrowserTest browserTest = new BrowserTest(test.testingUrl,
1684 callback, 1684 callback,
1685 test.timeout); 1685 test.timeout);
1686 _getBrowserTestRunner(test).then((testRunner) { 1686 _getBrowserTestRunner(test).then((testRunner) {
1687 testRunner.queueTest(browserTest); 1687 testRunner.queueTest(browserTest);
1688 }); 1688 });
1689 } 1689 }
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 } 1910 }
1911 } 1911 }
1912 1912
1913 void eventAllTestsDone() { 1913 void eventAllTestsDone() {
1914 for (var listener in _eventListener) { 1914 for (var listener in _eventListener) {
1915 listener.allDone(); 1915 listener.allDone();
1916 } 1916 }
1917 } 1917 }
1918 } 1918 }
1919 1919
OLDNEW
« no previous file with comments | « tools/testing/dart/browser_controller.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698