Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ci/builders/linux_web_engine.json
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@
"recipe": "engine_v2/tester_engine",
"drone_dimensions": [
"device_type=none",
"os=Mac-13",
"os=Mac-13|Mac-14",
"cpu=arm64"
],
"gclient_variables": {
Expand Down Expand Up @@ -1164,7 +1164,7 @@
"recipe": "engine_v2/tester_engine",
"drone_dimensions": [
"device_type=none",
"os=Mac-13",
"os=Mac-13|Mac-14",
"cpu=arm64"
],
"gclient_variables": {
Expand Down Expand Up @@ -1197,7 +1197,7 @@
"recipe": "engine_v2/tester_engine",
"drone_dimensions": [
"device_type=none",
"os=Mac-13",
"os=Mac-13|Mac-14",
"cpu=arm64"
],
"gclient_variables": {
Expand Down Expand Up @@ -1230,7 +1230,7 @@
"recipe": "engine_v2/tester_engine",
"drone_dimensions": [
"device_type=none",
"os=Mac-13",
"os=Mac-13|Mac-14",
"cpu=arm64"
],
"gclient_variables": {
Expand Down Expand Up @@ -1263,7 +1263,7 @@
"recipe": "engine_v2/tester_engine",
"drone_dimensions": [
"device_type=none",
"os=Mac-13",
"os=Mac-13|Mac-14",
"cpu=arm64"
],
"gclient_variables": {
Expand Down Expand Up @@ -1296,7 +1296,7 @@
"recipe": "engine_v2/tester_engine",
"drone_dimensions": [
"device_type=none",
"os=Mac-13",
"os=Mac-13|Mac-14",
"cpu=arm64"
],
"gclient_variables": {
Expand Down
2 changes: 1 addition & 1 deletion lib/web_ui/dev/generate_builder_json.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Iterable<dynamic> _getAllTestSteps(List<TestSuite> suites) {
suite.runConfig.browser == BrowserName.chrome ||
suite.runConfig.browser == BrowserName.firefox
),
..._getTestStepsForPlatform(suites, 'Mac', specificOS: 'Mac-13', cpu: 'arm64', (TestSuite suite) =>
..._getTestStepsForPlatform(suites, 'Mac', specificOS: 'Mac-13|Mac-14', cpu: 'arm64', (TestSuite suite) =>
suite.runConfig.browser == BrowserName.safari
),
..._getTestStepsForPlatform(suites, 'Windows', (TestSuite suite) =>
Expand Down
16 changes: 16 additions & 0 deletions lib/web_ui/dev/webdriver_browser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,30 @@ abstract class WebDriverBrowserEnvironment extends BrowserEnvironment {
class WebDriverBrowser extends Browser {
WebDriverBrowser(this._driver, this._url) {
_driver.get(_url);
_activateLoopFuture = () async {
// Some browsers (i.e. Safari) stop actually executing our unit tests if
// their window is occluded or non-visible. This hacky solution of
// re-activating the window every two seconds prevents our unit tests from
// stalling out if the window becomes obscured by some other thing that
// may appear on the system.
while (!_shouldStopActivating) {
await (await _driver.window).setAsActive();
await Future<void>.delayed(const Duration(seconds: 2));
}
}();
}

final WebDriver _driver;
final Uri _url;
final Completer<void> _onExitCompleter = Completer<void>();
bool _shouldStopActivating = false;
late final Future<void> _activateLoopFuture;

@override
Future<void> close() async {
_shouldStopActivating = true;
await _activateLoopFuture;

await (await _driver.window).close();
if (!_onExitCompleter.isCompleted) {
_onExitCompleter.complete();
Expand Down