[dds] Fix sse_smoke_test on Windows

Cq-Include-Trybots: luci.dart.try:pkg-win-release-try
Change-Id: I8993ee16a23bfbaeffaf48f6ef5906a4e90f11fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322703
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This commit is contained in:
Alexander Thomas 2023-08-30 14:13:37 +00:00 committed by Commit Queue
parent e2971da563
commit d12904f278

View file

@ -29,10 +29,14 @@ void main() {
late WebDriver webdriver;
setUpAll(() async {
final chromedriverUri = Platform.script.resolveUri(
Uri.parse('../../../third_party/webdriver/chrome/chromedriver'));
var chromedriverPath = '../../../third_party/webdriver/chrome/chromedriver';
if (Platform.isWindows) {
chromedriverPath = '$chromedriverPath.exe';
}
final chromedriverUri =
Platform.script.resolveUri(Uri.parse(chromedriverPath));
try {
chromeDriver = await Process.start(chromedriverUri.path, [
chromeDriver = await Process.start(chromedriverUri.toFilePath(), [
'--port=4444',
'--url-base=wd/hub',
]);
@ -54,7 +58,7 @@ void main() {
final cascade = shelf.Cascade()
.add(handler.handler)
.add(_faviconHandler)
.add(createStaticHandler(Platform.script.resolve('web').path,
.add(createStaticHandler(Platform.script.resolve('web').toFilePath(),
listDirectories: true, defaultDocument: 'index.html'));
server = await io.serve(cascade.handler, 'localhost', 0);