[web] [tests] Changing configurations for firefox (flutter/engine#14148)
* Changing configurations for firefox * remove headless * change comments on configurations files * remove unused boolean
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
# Sources of inspiration for this file:
|
||||
# For more information on test and runner configurations:
|
||||
#
|
||||
# * https://github.com/dart-lang/angular/blob/master/dev/tool/test/dart_test_repo.yaml
|
||||
# * https://github.com/dart-lang/angular/blob/master/_tests/dart_test.yaml
|
||||
# * https://github.com/dart-lang/test/blob/master/pkgs/test/doc/configuration.md#platforms
|
||||
|
||||
platforms:
|
||||
- chrome
|
||||
- vm
|
||||
|
||||
presets:
|
||||
cirrus:
|
||||
override_platforms:
|
||||
7
engine/src/flutter/lib/web_ui/dart_test_firefox.yaml
Normal file
7
engine/src/flutter/lib/web_ui/dart_test_firefox.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
# For more information on test and runner configurations:
|
||||
#
|
||||
# * https://github.com/dart-lang/test/blob/master/pkgs/test/doc/configuration.md#platforms
|
||||
|
||||
platforms:
|
||||
- firefox
|
||||
- vm
|
||||
@@ -49,17 +49,19 @@ class Firefox extends Browser {
|
||||
var args = [
|
||||
url.toString(),
|
||||
if (!debug) '--headless',
|
||||
'-width $kMaxScreenshotWidth'
|
||||
'-width $kMaxScreenshotWidth',
|
||||
'-height $kMaxScreenshotHeight',
|
||||
'-new-window',
|
||||
'-new-instance',
|
||||
'-prefs { "dom.disable_beforeunload" = true, "toolkit.startup.max_resumed_crashes"=999999 } ',
|
||||
'--start-debugger-server $kDevtoolsPort',
|
||||
];
|
||||
|
||||
final Process process = await Process.start(installation.executable, args);
|
||||
final Process process =
|
||||
await Process.start(installation.executable, args);
|
||||
|
||||
remoteDebuggerCompleter.complete(getRemoteDebuggerUrl(
|
||||
Uri.parse('http://localhost:$kDevtoolsPort')));
|
||||
remoteDebuggerCompleter.complete(
|
||||
getRemoteDebuggerUrl(Uri.parse('http://localhost:$kDevtoolsPort')));
|
||||
|
||||
unawaited(process.exitCode
|
||||
.then((_) => Directory(dir).deleteSync(recursive: true)));
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'browser.dart';
|
||||
import 'chrome.dart';
|
||||
import 'chrome_installer.dart';
|
||||
import 'common.dart';
|
||||
import 'environment.dart';
|
||||
import 'firefox.dart';
|
||||
import 'firefox_installer.dart'; // ignore: implementation_imports
|
||||
|
||||
@@ -30,6 +31,11 @@ class SupportedBrowsers {
|
||||
'firefox': Runtime.firefox
|
||||
};
|
||||
|
||||
final Map<String, String> browserToConfiguration = {
|
||||
'chrome': '--configuration=${environment.webUiRootDir.path}/dart_test_chrome.yaml',
|
||||
'firefox': '--configuration=${environment.webUiRootDir.path}/dart_test_firefox.yaml',
|
||||
};
|
||||
|
||||
static final SupportedBrowsers _singletonInstance = SupportedBrowsers._();
|
||||
|
||||
/// The [SupportedBrowsers] singleton.
|
||||
|
||||
@@ -243,6 +243,7 @@ class TestCommand extends Command<bool> {
|
||||
if (isDebug) '--pause-after-load',
|
||||
'--platform=$browser',
|
||||
'--precompiled=${environment.webUiRootDir.path}/build',
|
||||
SupportedBrowsers.instance.browserToConfiguration[browser],
|
||||
'--',
|
||||
...testFiles.map((f) => f.relativeToWebUi).toList(),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user