Skip to content

Commit d1cf80d

Browse files
Smoketest/1.0.2783 testing (#253)
* Updates for Win32, WPF, WinForms, UWP and WinUI3 sample apps from 129.0.2783.0 * Updated package version for Win32, WPF and WinForms sample apps to 1.0.2783-prerelease --------- Co-authored-by: WebView2 Github Bot <[email protected]>
1 parent 8c4db2a commit d1cf80d

File tree

8 files changed

+78
-28
lines changed

8 files changed

+78
-28
lines changed

SampleApps/WebView2APISample/WebView2APISample.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,13 +480,13 @@
480480
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
481481
<ImportGroup Label="ExtensionTargets">
482482
<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')" />
483-
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.2730-prerelease\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.2730-prerelease\build\native\Microsoft.Web.WebView2.targets')" />
483+
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.2783-prerelease\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.2783-prerelease\build\native\Microsoft.Web.WebView2.targets')" />
484484
</ImportGroup>
485485
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
486486
<PropertyGroup>
487487
<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>
488488
</PropertyGroup>
489489
<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'))" />
490-
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.2730-prerelease\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.2730-prerelease\build\native\Microsoft.Web.WebView2.targets'))" />
490+
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.2783-prerelease\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.2783-prerelease\build\native\Microsoft.Web.WebView2.targets'))" />
491491
</Target>
492492
</Project>

SampleApps/WebView2APISample/documentation/Testing-Instructions.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,12 +1448,10 @@ this the `appRegion` changes would not take place until some document element wa
14481448
1. Right click 'Microsoft Edge WebView2' element and select `restore`
14491449
1. Expected: Sample app will restore.
14501450
1451-
#### Interactive Dragging
1451+
#### Interactive Dragging Enabled By Default
14521452
1453-
Test that interactive dragging works on Webview2.
1453+
Test that interactive dragging is enabled by default on Webview2.
14541454
1455-
1. Run the application with the following flag
1456-
--edge-webview-interactive-dragging.
14571455
1. Click Scenario > Non-Client Region Support.
14581456
1. Look under the Heading "Interactive Elements".
14591457
1. Hover the mouse on the textarea and button.
@@ -1468,6 +1466,24 @@ Test that interactive dragging works on Webview2.
14681466
1. Click button.
14691467
1. Expected: The click counter should increment.
14701468
1469+
#### Interactive Dragging Opt-out
1470+
1471+
Test that the interactive dragging opt-out switch works on Webview2.
1472+
1473+
1. run the app with the flag
1474+
--edge-webview-disable-interactive-dragging
1475+
1. Click Scenario > Non-Client Region Support.
1476+
1. Look under the Heading "Interactive Elements".
1477+
1. Hover the mouse on the textarea and button.
1478+
1. Expected: Cursor should be arrow, the element border should
1479+
stay the same.
1480+
1. Drag on text area and button.
1481+
1. Expected: The entire app should drag.
1482+
1. Click into text area.
1483+
1. Expected: Cursor remains the same.
1484+
1. Click button.
1485+
1. Expected: The click counter should not increment.
1486+
14711487
#### Drag and Drop
14721488
14731489
Test that Drag and Drop is supported in WebView2 using both hosting modes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Web.WebView2" version="1.0.2730-prerelease" targetFramework="native" />
3+
<package id="Microsoft.Web.WebView2" version="1.0.2783-prerelease" targetFramework="native" />
44
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220201.1" targetFramework="native" />
55
</packages>

SampleApps/WebView2WindowsFormsBrowser/BrowserForm.cs

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using Microsoft.Web.WebView2.Core;
1414
using Microsoft.Web.WebView2.WinForms;
1515
using System.Linq;
16+
using System.ComponentModel;
1617

1718
namespace WebView2WindowsFormsBrowser
1819
{
@@ -1448,25 +1449,29 @@ private string GetAppPath()
14481449

14491450
private string GetRuntimePath(CoreWebView2 webView2)
14501451
{
1451-
int processId = (int)webView2.BrowserProcessId;
1452-
try
1453-
{
1454-
Process process = System.Diagnostics.Process.GetProcessById(processId);
1455-
var fileName = process.MainModule.FileName;
1456-
return System.IO.Path.GetDirectoryName(fileName);
1457-
}
1458-
catch (ArgumentException e)
1459-
{
1460-
Trace.WriteLine(e.Message);
1461-
}
1462-
catch (SystemException e)
1463-
{
1464-
Trace.WriteLine(e.Message);
1465-
}
1466-
return "";
1452+
int processId = (int)webView2.BrowserProcessId;
1453+
try
1454+
{
1455+
Process process = System.Diagnostics.Process.GetProcessById(processId);
1456+
var fileName = process.MainModule.FileName;
1457+
return System.IO.Path.GetDirectoryName(fileName);
1458+
}
1459+
catch (ArgumentException e)
1460+
{
1461+
return e.Message;
1462+
}
1463+
catch (InvalidOperationException e)
1464+
{
1465+
return e.Message;
1466+
}
1467+
// Occurred when a 32-bit process wants to access the modules of a 64-bit process.
1468+
catch (Win32Exception e)
1469+
{
1470+
return e.Message;
1471+
}
14671472
}
14681473

1469-
private string GetStartPageUri(CoreWebView2 webView2)
1474+
private string GetStartPageUri(CoreWebView2 webView2)
14701475
{
14711476
string uri = "https://appassets.example/AppStartPage.html";
14721477
if (webView2 == null)

SampleApps/WebView2WindowsFormsBrowser/WebView2WindowsFormsBrowser.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<PlatformTarget>AnyCPU</PlatformTarget>
2626
</PropertyGroup>
2727
<ItemGroup>
28-
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2730-prerelease" />
28+
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2783-prerelease" />
2929
</ItemGroup>
3030
<ItemGroup>
3131
<Folder Include="assets\" />

SampleApps/WebView2WpfBrowser/MainWindow.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ found in the LICENSE file.
107107
<CommandBinding Command="{x:Static local:MainWindow.FileExplorerCommand}" Executed="FileExplorerExecuted" CanExecute="CoreWebView2RequiringCmdsCanExecute"/>
108108
<CommandBinding Command="{x:Static local:MainWindow.ToggleScreenCaptureEnableCommand}" Executed="TogglScreenCaptureEnabledCmdExecuted" CanExecute="CoreWebView2RequiringCmdsCanExecute"/>
109109
<CommandBinding Command="{x:Static local:MainWindow.FileTypePolicyCommand}" Executed="FileTypePolicyExecuted" CanExecute="CoreWebView2RequiringCmdsCanExecute"/>
110-
111110
</Window.CommandBindings>
112111
<DockPanel>
113112
<Menu DockPanel.Dock="Top">

SampleApps/WebView2WpfBrowser/MainWindow.xaml.cs

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Collections;
77
using System.Collections.Generic;
88
using System.ComponentModel;
9+
using System.Data.Common;
910
using System.Diagnostics;
1011
using System.IO;
1112
using System.Linq;
@@ -127,6 +128,13 @@ public partial class MainWindow : Window
127128
public static RoutedCommand ToggleScreenCaptureEnableCommand = new RoutedCommand();
128129
public static RoutedCommand FileTypePolicyCommand = new RoutedCommand();
129130

131+
public static RoutedCommand ServiceWorkerRegisteredCommand = new RoutedCommand();
132+
public static RoutedCommand GetServiceWorkerRegistrationsCommand = new RoutedCommand();
133+
public static RoutedCommand GetServiceWorkerRegisteredForScopeCommand = new RoutedCommand();
134+
public static RoutedCommand DedicatedWorkerCreatedCommand = new RoutedCommand();
135+
public static RoutedCommand SharedWorkerManagerCommand = new RoutedCommand();
136+
public static RoutedCommand GetSharedWorkersCommand = new RoutedCommand();
137+
130138
#endregion commands
131139

132140
bool _isNavigating = false;
@@ -3718,5 +3726,27 @@ void WebView_FileTypePolicy_DOMContentLoaded(object sender, CoreWebView2DOMConte
37183726
}
37193727
#endif
37203728

3729+
void DedicatedWorkerCreatedExecuted(object target, ExecutedRoutedEventArgs e)
3730+
{
3731+
}
3732+
void ServiceWorkerRegisteredExecuted(object target, ExecutedRoutedEventArgs e)
3733+
{
3734+
}
3735+
private async void GetServiceWorkerRegistrationsExecuted(object target, ExecutedRoutedEventArgs e)
3736+
{
3737+
await Task.Delay(0);
3738+
}
3739+
3740+
async void GetServiceWorkerRegisteredForScopeExecuted(object target, ExecutedRoutedEventArgs e)
3741+
{
3742+
await Task.Delay(0);
3743+
}
3744+
void SharedWorkerManagerExecuted(object target, ExecutedRoutedEventArgs e)
3745+
{
3746+
}
3747+
private async void GetSharedWorkersExecuted(object target, ExecutedRoutedEventArgs e)
3748+
{
3749+
await Task.Delay(0);
3750+
}
3751+
}
37213752
}
3722-
}

SampleApps/WebView2WpfBrowser/WebView2WpfBrowser.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
</Content>
6262
</ItemGroup>
6363
<ItemGroup>
64-
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2730-prerelease" />
64+
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2783-prerelease" />
6565
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
6666
</ItemGroup>
6767
</Project>

0 commit comments

Comments
 (0)