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

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

Issue 2857923002: Gardening: update path to capture_screenshot.ps1 script (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | 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 UTF8, JSON; 7 import "dart:convert" show UTF8, JSON;
8 import "dart:core"; 8 import "dart:core";
9 import "dart:io"; 9 import "dart:io";
10 import "dart:math" show min; 10 import "dart:math" show min;
(...skipping 1885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 return; 1896 return;
1897 } 1897 }
1898 1898
1899 print('--------------------------------------------------------------------'); 1899 print('--------------------------------------------------------------------');
1900 final String date = 1900 final String date =
1901 new DateTime.now().toUtc().toIso8601String().replaceAll(':', '_'); 1901 new DateTime.now().toUtc().toIso8601String().replaceAll(':', '_');
1902 final screenshotName = 'ie_screenshot_${date}.png'; 1902 final screenshotName = 'ie_screenshot_${date}.png';
1903 1903
1904 // The "capture_screen.ps1" script is next to "test.dart" in "tools/" 1904 // The "capture_screen.ps1" script is next to "test.dart" in "tools/"
1905 final powerShellScript = 1905 final powerShellScript =
1906 Platform.script.resolve('capture_screenshot.ps1').toFilePath(); 1906 Platform.script.resolve('../../capture_screenshot.ps1').toFilePath();
1907 final screenshotFile = 1907 final screenshotFile =
1908 Platform.script.resolve('../$screenshotName').toFilePath(); 1908 Platform.script.resolve('../../../$screenshotName').toFilePath();
1909 1909
1910 final args = [ 1910 final args = [
1911 '-ExecutionPolicy', 1911 '-ExecutionPolicy',
1912 'ByPass', 1912 'ByPass',
1913 '-File', 1913 '-File',
1914 powerShellScript, 1914 powerShellScript,
1915 screenshotFile 1915 screenshotFile
1916 ]; 1916 ];
1917 final ProcessResult result = 1917 final ProcessResult result =
1918 await Process.run('powershell.exe', args, runInShell: true); 1918 await Process.run('powershell.exe', args, runInShell: true);
(...skipping 18 matching lines...) Expand all
1937 'exit code: ${result.exitCode}\n' 1937 'exit code: ${result.exitCode}\n'
1938 'stdout: ${result.stdout}\n' 1938 'stdout: ${result.stdout}\n'
1939 'stderr: ${result.stderr}'); 1939 'stderr: ${result.stderr}');
1940 } else { 1940 } else {
1941 print('[$message] Successfully uploaded screenshot to $storageUrl'); 1941 print('[$message] Successfully uploaded screenshot to $storageUrl');
1942 } 1942 }
1943 new File(screenshotFile).deleteSync(); 1943 new File(screenshotFile).deleteSync();
1944 } 1944 }
1945 print('--------------------------------------------------------------------'); 1945 print('--------------------------------------------------------------------');
1946 } 1946 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698