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

Smoketest/1.0.2142 testing #213

Closed
wants to merge 2 commits into from
Closed
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
9 changes: 5 additions & 4 deletions SampleApps/WebView2APISample/ProcessComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ProcessComponent::ProcessComponent(AppWindow* appWindow)
// needed.
ScheduleReloadIfSelectedByUser(
L"Browser render process exited unexpectedly. Reload page?",
L"Web page unresponsive");
L"Render process exited");
}
// Check the runtime event args implements the newer interface.
auto args2 = args.try_query<ICoreWebView2ProcessFailedEventArgs2>();
Expand Down Expand Up @@ -100,17 +100,18 @@ ProcessComponent::ProcessComponent(AppWindow* appWindow)
COREWEBVIEW2_PROCESS_FAILED_REASON reason;
wil::unique_cotaskmem_string processDescription;
int exitCode;
wil::unique_cotaskmem_string blockedFile;

CHECK_FAILURE(args2->get_Reason(&reason));
CHECK_FAILURE(args2->get_ProcessDescription(&processDescription));
CHECK_FAILURE(args2->get_ExitCode(&exitCode));

std::wstringstream message;
message << L"Kind: " << ProcessFailedKindToString(kind) << L"\n"
<< L"Reason: " << ProcessFailedReasonToString(reason) << L"\n"
<< L"Exit code: " << exitCode << L"\n"
<< L"Process description: " << processDescription.get()
<< std::endl;
<< L"Process description: " << processDescription.get() << std::endl
<< (blockedFile ? L"Blocked file: " : L"")
<< (blockedFile ? blockedFile.get() : L"");
m_appWindow->AsyncMessageBox( std::move(message.str()), L"Child process failed");
}
return S_OK;
Expand Down
26 changes: 13 additions & 13 deletions SampleApps/WebView2APISample/WebView2APISample.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand All @@ -145,8 +145,8 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand All @@ -162,8 +162,8 @@
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
<PreprocessorDefinitions>USE_WEBVIEW2_WIN10;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;shlwapi.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;urlmon.lib;Gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>onecoreuap.lib %(AdditionalOptions)</AdditionalOptions>
Expand All @@ -174,8 +174,8 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
<PreprocessorDefinitions>USE_WEBVIEW2_WIN10;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;shlwapi.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;urlmon.lib;Gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>
Expand All @@ -188,8 +188,8 @@
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
<PreprocessorDefinitions>USE_WEBVIEW2_WIN10;_ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;shlwapi.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;urlmon.lib;Gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>onecoreuap.lib %(AdditionalOptions)</AdditionalOptions>
Expand All @@ -201,7 +201,7 @@
<LanguageStandard>stdcpp17</LanguageStandard>
<PreprocessorDefinitions>USE_WEBVIEW2_WIN10;_ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
</ClCompile>
<Link>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;shlwapi.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;urlmon.lib;Gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>onecoreuap.lib %(AdditionalOptions)</AdditionalOptions>
Expand Down Expand Up @@ -425,13 +425,13 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.2106-prerelease\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.2106-prerelease\build\native\Microsoft.Web.WebView2.targets')" />
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.2142-prerelease\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.2142-prerelease\build\native\Microsoft.Web.WebView2.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.2106-prerelease\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.2106-prerelease\build\native\Microsoft.Web.WebView2.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.2142-prerelease\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.2142-prerelease\build\native\Microsoft.Web.WebView2.targets'))" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion SampleApps/WebView2APISample/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Web.WebView2" version="1.0.2106-prerelease" targetFramework="native" />
<package id="Microsoft.Web.WebView2" version="1.0.2142-prerelease" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220201.1" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2106-prerelease" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2142-prerelease" />
</ItemGroup>
<ItemGroup>
<Folder Include="assets\" />
Expand Down
2 changes: 1 addition & 1 deletion SampleApps/WebView2WpfBrowser/WebView2WpfBrowser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2106-prerelease" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2142-prerelease" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function onHeaderClick() {
console.log("onHeaderClick+");
const header = document.getElementById('header');
document.getElementById('HeaderSpace').innerHTML = header.innerHTML;
document.getElementById('HeaderSpace').textContent = header.textContent;
console.log("onHeaderClick-");
}

Expand Down
25 changes: 0 additions & 25 deletions SampleApps/webview2_sample_uwp/Pages/Browser.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@
using System.Diagnostics;
using System.IO;
using webview2_sample_uwp;
#if USE_WEBVIEW2_SMOKETEST
using Windows.Storage;
#endif
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;

namespace WebView2_UWP.Pages
{
public sealed partial class Browser : BasePage
Expand All @@ -36,22 +32,11 @@ public Browser()
WebView2.Source = new Uri(AddressBar.Text);
}

#if USE_WEBVIEW2_SMOKETEST
private async void WebView2_CoreWebView2Initialized(WebView2 sender, CoreWebView2InitializedEventArgs args)
#else
private void WebView2_CoreWebView2Initialized(WebView2 sender, CoreWebView2InitializedEventArgs args)
#endif
{
if (args.Exception != null)
{
StatusUpdate($"Error initializing WebView2: {args.Exception.Message}");

#if USE_WEBVIEW2_SMOKETEST
StorageFolder localFolder = ApplicationData.Current.LocalFolder;
StorageFile file = await localFolder.CreateFileAsync(@"Failure.txt", CreationCollisionOption.FailIfExists);
await FileIO.WriteTextAsync(file, args.Exception.ToString());
Environment.Exit(1);
#endif
}
else
{
Expand Down Expand Up @@ -152,11 +137,7 @@ private void WebView2_NavigationStarting(WebView2 sender, CoreWebView2Navigation
CancelButton.IsEnabled = true;
}

#if USE_WEBVIEW2_SMOKETEST
private async void WebView2_NavigationCompleted(WebView2 sender, CoreWebView2NavigationCompletedEventArgs args)
#else
private void WebView2_NavigationCompleted(WebView2 sender, CoreWebView2NavigationCompletedEventArgs args)
#endif
{
StatusUpdate("Navigation complete");

Expand All @@ -165,12 +146,6 @@ private void WebView2_NavigationCompleted(WebView2 sender, CoreWebView2Navigatio

// Update the address bar with the full URL that was navigated to.
AddressBar.Text = sender.Source.ToString();

#if USE_WEBVIEW2_SMOKETEST
StorageFolder localFolder = ApplicationData.Current.LocalFolder;
await localFolder.CreateFileAsync(@"Success.txt", CreationCollisionOption.FailIfExists);
Environment.Exit(0);
#endif
}

private bool TryCreateUri(String potentialUri, out Uri result)
Expand Down
5 changes: 0 additions & 5 deletions SampleApps/webview2_sample_uwp/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ public Settings()
_localSettings[SettingsVersionKey] = SettingsVersion;
}

#if USE_WEBVIEW2_SMOKETEST
var webViewExecutableFolder = ApplicationData.Current.LocalFolder.Path + "\\EdgeBin";
Environment.SetEnvironmentVariable(WebViewExecutableFolderEnvKey, webViewExecutableFolder);
#else
InitializeEnvSetting(WebViewExecutableFolderKey, WebViewExecutableFolderEnvKey);
#endif
InitializeEnvSetting(WebViewUserDataFolderKey, WebViewUserDataFolderEnvKey);
InitializeEnvSetting(WebViewReleaseChannelPrefKey, WebViewReleaseChannelPrefEnvKey);
InitializeEnvSetting(WebViewAdditionalArgumentsKey, WebViewAdditionalArgumentsEnvKey);
Expand Down
26 changes: 0 additions & 26 deletions SampleApps/webview2_sample_uwp/readme.md

This file was deleted.

Loading