Skip to content

Commit

Permalink
Add logging for CoreWebView2Initialized_FailedTest
Browse files Browse the repository at this point in the history
  • Loading branch information
krschau committed Oct 21, 2021
1 parent d0bbaf8 commit 3f9d08e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dev/WebView2/InteractionTests/WebView2Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1829,8 +1829,10 @@ public void CoreWebView2Initialized_FailedTest()
{
ChooseTest("CoreWebView2Initialized_FailedTest", false /* waitForLoadCompleted */);

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

// Imitate Edge not being installed by setting a reg key to point Edge at a location where the WebView2 runtime does not exist
// https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.865-prerelease#createcorewebview2environmentwithoptions
var browserExecutableKey = GetBrowserExecutableFolderKey();
Log.Comment("Setting key for MuxControlsTestApp.exe");
browserExecutableKey.SetValue("MuxControlsTestApp.exe", "c:\\badpath");

try
Expand All @@ -1840,6 +1842,7 @@ public void CoreWebView2Initialized_FailedTest()
finally
{
browserExecutableKey.DeleteValue("MuxControlsTestApp.exe");
Log.Comment("Removed key for MuxControlsTestApp.exe");
}
}
}
Expand Down

0 comments on commit 3f9d08e

Please sign in to comment.