Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

nturgut
Copy link
Contributor

@nturgut nturgut commented Feb 13, 2020

Changing the way we are launching Safari for tests.

So far we were using the method from dart-sdk/test to open safari browser, on the other hand it looks like this method become obsolete with the new MacOs version with the increasing file security. It became an issue in other projects as well. We applied one of the solutions proposed here: karma-runner/karma-safari-launcher#29 (comment)

Copy link
Contributor

@mdebbar mdebbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if LGT @yjbanov.

// to open, that instance to wait for opening the url until Safari launches,
// provide Safari bundles identifier.
// For more details run `man open` on MacOS.
// TODO(nurhan): explore implementing this part using Apple Script or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider creating an issue and linking to it from here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@nturgut
Copy link
Contributor Author

nturgut commented Feb 13, 2020

Launching the tests succeeded in LUCI.

// provide Safari bundles identifier.
// The details copied from `man open` on MacOS.
// TODO(nurhan): https://github.com/flutter/flutter/issues/50809
var process = await Process.start(installation.executable, [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Browser class expects that the process object returned from this function is the browser process, or at least some proxy of it. However, this would return the open process that quits immediately. I have a feeling this will become a thorn in future evolution of the Browser class. For example, this will prevent us from being able to implement logic that watches the health of the browser process, such as premature termination (examples).

Having said that, I don't have an immediate solution to this, other than what we talked about offline, i.e. use WebDriver to control launching of browsers. If I'm reading the w3c spec correctly, Selenium is not necessary to use it (see WebDriver Protocol). So please, treat this comment as non-blocking. I'll file a separate issue for us to investigate a WebDriver solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nturgut
Copy link
Contributor Author

nturgut commented Feb 14, 2020

I merging the change since it is related to safari engine unit test tooling. Hopefully will run luci-engine and we will get a green.

@nturgut nturgut merged commit 65d1126 into flutter:master Feb 14, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 15, 2020
jason-simmons pushed a commit to flutter/flutter that referenced this pull request Feb 18, 2020
* c0549fb Roll buildroot. (flutter/engine#16613)

* 8b0b649 improve surface state assert error messages (flutter/engine#16595)

* cd77e78 Fix drawRRect failure when shader is specified (flutter/engine#16601)

* fe63094 [web] Handle alignment correctly in Paragraph.getPositionForOffset (flutter/engine#16569)

* 65d1126 [web] Fixing launching Safari. This should solve the LUCI issue (flutter/engine#16590)

* f88f7df [web] Unskip tests that are already passing in Safari (flutter/engine#16567)

* 594f660 [shell tests] Integrate Vulkan with Shell Tests

* 400ed7c Revert "[shell tests] Integrate Vulkan with Shell Tests"

* 15e7f51 Implement Path extractPath, tangent APIs (flutter/engine#16599)

* 4941ff7 Remove usage of Dart_AllocateWithNativeFields from tonic (flutter/engine#16588)

* bb01cb7 Roll fuchsia/sdk/core/linux-amd64 from Bmq1m... to J-_s6... (flutter/engine#16592)
NoamDev pushed a commit to NoamDev/engine that referenced this pull request Feb 27, 2020
…ter#16590)

* Fixing launching Safari. This should solve the LUCI issue

* more comments and linking the issue
NoamDev added a commit to NoamDev/engine that referenced this pull request Feb 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants