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

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

Issue 863663002: Add debug logging for android testing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « tests/co19/co19-dartium.status ('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) 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 library browser; 4 library browser;
5 5
6 import "dart:async"; 6 import "dart:async";
7 import "dart:convert" show LineSplitter, UTF8, JSON; 7 import "dart:convert" show LineSplitter, UTF8, JSON;
8 import "dart:core"; 8 import "dart:core";
9 import "dart:io"; 9 import "dart:io";
10 10
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 status.lastTest = status.currentTest; 1080 status.lastTest = status.currentTest;
1081 status.currentTest = null; 1081 status.currentTest = null;
1082 1082
1083 // We don't want to start a new browser if we are terminating. 1083 // We don't want to start a new browser if we are terminating.
1084 if (underTermination) return; 1084 if (underTermination) return;
1085 restartBrowser(id); 1085 restartBrowser(id);
1086 }); 1086 });
1087 } 1087 }
1088 1088
1089 void restartBrowser(String id) { 1089 void restartBrowser(String id) {
1090 if (browserName.contains('OnAndroid')) {
1091 DebugLogger.info("Restarting browser $id");
1092 }
1090 var browser; 1093 var browser;
1091 var new_id = id; 1094 var new_id = id;
1092 if (browserName == 'chromeOnAndroid') { 1095 if (browserName == 'chromeOnAndroid') {
1093 browser = new AndroidChrome(adbDeviceMapping[id]); 1096 browser = new AndroidChrome(adbDeviceMapping[id]);
1094 } else if (browserName == 'ContentShellOnAndroid') { 1097 } else if (browserName == 'ContentShellOnAndroid') {
1095 browser = new AndroidBrowser(adbDeviceMapping[id], 1098 browser = new AndroidBrowser(adbDeviceMapping[id],
1096 contentShellOnAndroidConfig, 1099 contentShellOnAndroidConfig,
1097 checkedMode, 1100 checkedMode,
1098 configuration['drt']); 1101 configuration['drt']);
1099 } else if (browserName == 'DartiumOnAndroid') { 1102 } else if (browserName == 'DartiumOnAndroid') {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 exit(1); 1185 exit(1);
1183 } 1186 }
1184 1187
1185 status.currentTest.timeoutTimer = createTimeoutTimer(test, status); 1188 status.currentTest.timeoutTimer = createTimeoutTimer(test, status);
1186 status.currentTest.stopwatch = new Stopwatch()..start(); 1189 status.currentTest.stopwatch = new Stopwatch()..start();
1187 1190
1188 // Reset the test specific output information (stdout, stderr) on the 1191 // Reset the test specific output information (stdout, stderr) on the
1189 // browser, since a new test is being started. 1192 // browser, since a new test is being started.
1190 status.browser.resetTestBrowserOutput(); 1193 status.browser.resetTestBrowserOutput();
1191 status.browser.logBrowserInfoToTestBrowserOutput(); 1194 status.browser.logBrowserInfoToTestBrowserOutput();
1195 if (browserName.contains('OnAndroid')) {
1196 DebugLogger.info("Browser $browserId getting test ${test.url}");
1197 }
1192 1198
1193 return test; 1199 return test;
1194 } 1200 }
1195 1201
1196 Timer createTimeoutTimer(BrowserTest test, BrowserTestingStatus status) { 1202 Timer createTimeoutTimer(BrowserTest test, BrowserTestingStatus status) {
1197 return new Timer(new Duration(seconds: test.timeout), 1203 return new Timer(new Duration(seconds: test.timeout),
1198 () { handleTimeout(status); }); 1204 () { handleTimeout(status); });
1199 } 1205 }
1200 1206
1201 Timer createNextTestTimer(BrowserTestingStatus status) { 1207 Timer createNextTestTimer(BrowserTestingStatus status) {
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 </div> 1792 </div>
1787 <div id="embedded_iframe_div" class="test box"> 1793 <div id="embedded_iframe_div" class="test box">
1788 <iframe style="width:100%;height:100%;" id="embedded_iframe"></iframe> 1794 <iframe style="width:100%;height:100%;" id="embedded_iframe"></iframe>
1789 </div> 1795 </div>
1790 </body> 1796 </body>
1791 </html> 1797 </html>
1792 """; 1798 """;
1793 return driverContent; 1799 return driverContent;
1794 } 1800 }
1795 } 1801 }
OLDNEW
« no previous file with comments | « tests/co19/co19-dartium.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698