Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ensuring WebView2 runtime, add WebView2 TestSuite D #6120

Merged
merged 4 commits into from
Oct 26, 2021

Conversation

krschau
Copy link
Contributor

@krschau krschau commented Oct 19, 2021

Cleans up code for ensuring a machine has the proper WebView2 runtime before running tests. Also splits WebView2 tests into four test suites instead of three, to guard against hitting timeouts from trying to run too many tests.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Oct 19, 2021
@krschau
Copy link
Contributor Author

krschau commented Oct 19, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@krschau
Copy link
Contributor Author

krschau commented Oct 20, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@StephenLPeters StephenLPeters added area-TestInfrastructure Issue in the test infrastructure (e.g. in Helix scripts) area-WebView team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Oct 21, 2021
@krschau
Copy link
Contributor Author

krschau commented Oct 22, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -114,53 +176,63 @@ public static void EnsureBrowser()
{
Log.Error("WebView2Tests Init: could not find loader at {0} [exception: {1}]", loaderPath, e.ToString());
}
return loaderBuildVersion;
Copy link
Contributor

@DmitriyKomin DmitriyKomin Oct 25, 2021

Choose a reason for hiding this comment

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

We no longer rely on webview2loader.dll (in favor of the winrt wrapper)... is it ok to still rely on geting the version from this file (which is still present in the package for COM CWV2SDK)? I wonder if there is a better way to get the "SDK version"... #WontFix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's keep for now and update in another change.

@@ -65,16 +65,75 @@ private static void DownloadFile(string url, string filePath)
task.Wait(TimeSpan.FromMinutes(10));
}

// Ensure a suitable version of Anaheim Browser is present, if not use mini_installer to install one on the beta channel.
// Ensure a suitable version of Anaheim Browser is present, if not use mini_installer to install the runtime.
Copy link
Contributor

@DmitriyKomin DmitriyKomin Oct 25, 2021

Choose a reason for hiding this comment

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

, if not use mini_installer to install the runtime.

not using mini_installer anymore,,, #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

}
}
}

private static Microsoft.Win32.RegistryKey GetBrowserExecutableFolderKey()
{
return Microsoft.Win32.Registry.LocalMachine.CreateSubKey(@"Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder", true);
Copy link
Contributor

@DmitriyKomin DmitriyKomin Oct 25, 2021

Choose a reason for hiding this comment

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

return Microsoft.Win32.Registry.LocalMachine.CreateSubKey(@"Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder", true);

This can throw an exception and/or return null - if that happens, we can probably skip the test? #WontFix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's keep for now and update in another change.

@StephenLPeters
Copy link
Contributor

StephenLPeters commented Oct 25, 2021

@jevansaks and @DmitriyKomin is this ready to check in?


In reply to: 951275901

@krschau
Copy link
Contributor Author

krschau commented Oct 25, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@DmitriyKomin DmitriyKomin left a comment

Choose a reason for hiding this comment

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

:shipit:

@DmitriyKomin
Copy link
Contributor

yep, just approved. Thanks!


In reply to: 951275901

@krschau krschau merged commit e5d0ec1 into main Oct 26, 2021
@krschau krschau deleted the user/krschau/ensure-runtime branch October 26, 2021 18:14
@ghost
Copy link

ghost commented Apr 14, 2022

🎉Microsoft.UI.Xaml v2.8.0-prerelease.220413001 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Jul 13, 2022

🎉Microsoft.UI.Xaml v2.8.0-prerelease.220712001 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Jul 18, 2022

🎉Microsoft.UI.Xaml v2.8.0 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TestInfrastructure Issue in the test infrastructure (e.g. in Helix scripts) area-WebView team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants