Skip to content

Commit 75f3af3

Browse files
Update projects to the latest WebView2 SDK 1.0.1724-prerelease (#180)
* Updates for Win32, WPF and WinForms sample apps from 114.0.1777.0 * Updated package version for Win32, WPF and WinForms sample apps to 1.0.1777-prerelease --------- Co-authored-by: WebView2 Github Bot <[email protected]>
1 parent 93f1c12 commit 75f3af3

14 files changed

+689
-17
lines changed

SampleApps/WebView2APISample/ScenarioCookieManagement.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ ScenarioCookieManagement::ScenarioCookieManagement(AppWindow* appWindow, bool is
3131
CHECK_FEATURE_RETURN_EMPTY(webView2_13);
3232
wil::com_ptr<ICoreWebView2Profile> webView2Profile;
3333
CHECK_FAILURE(webView2_13->get_Profile(&webView2Profile));
34-
auto webView2ExperimentalProfile8 =
35-
webView2Profile.try_query<ICoreWebView2ExperimentalProfile8>();
36-
CHECK_FEATURE_RETURN_EMPTY(webView2ExperimentalProfile8);
37-
CHECK_FAILURE(webView2ExperimentalProfile8->get_CookieManager(&m_cookieManager));
34+
auto webView2Profile5 = webView2Profile.try_query<ICoreWebView2Profile5>();
35+
CHECK_FEATURE_RETURN_EMPTY(webView2Profile5);
36+
CHECK_FAILURE(webView2Profile5->get_CookieManager(&m_cookieManager));
3837
//! [CookieManagerProfile]
3938
}
4039
else

SampleApps/WebView2APISample/ScenarioDragDrop.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ ScenarioDragDrop::ScenarioDragDrop(AppWindow* appWindow) : m_appWindow(appWindow
2323
Callback<ICoreWebView2WebMessageReceivedEventHandler>(
2424
[this](ICoreWebView2* sender, ICoreWebView2WebMessageReceivedEventArgs* args)
2525
{
26-
wil::com_ptr<ICoreWebView2ExperimentalWebMessageReceivedEventArgs> args2 =
26+
wil::com_ptr<ICoreWebView2WebMessageReceivedEventArgs2> args2 =
2727
wil::com_ptr<ICoreWebView2WebMessageReceivedEventArgs>(args)
28-
.query<ICoreWebView2ExperimentalWebMessageReceivedEventArgs>();
29-
wil::com_ptr<ICoreWebView2ExperimentalObjectCollectionView> objectsCollection;
28+
.query<ICoreWebView2WebMessageReceivedEventArgs2>();
29+
wil::com_ptr<ICoreWebView2ObjectCollectionView> objectsCollection;
3030
args2->get_AdditionalObjects(&objectsCollection);
3131
unsigned int length;
3232
objectsCollection->get_Count(&length);
@@ -38,8 +38,7 @@ ScenarioDragDrop::ScenarioDragDrop(AppWindow* appWindow) : m_appWindow(appWindow
3838
wil::com_ptr<IUnknown> object;
3939
objectsCollection->GetValueAtIndex(i, &object);
4040

41-
wil::com_ptr<ICoreWebView2ExperimentalFile> file =
42-
object.query<ICoreWebView2ExperimentalFile>();
41+
wil::com_ptr<ICoreWebView2File> file = object.query<ICoreWebView2File>();
4342
if (file)
4443
{
4544
// Add the file to message to be sent back to webview

SampleApps/WebView2APISample/WebView2APISample.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,13 +382,13 @@
382382
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
383383
<ImportGroup Label="ExtensionTargets">
384384
<Import Project="..\packages\Microsoft.Windows.ImplementationLibrary.1.0.191107.2\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\packages\Microsoft.Windows.ImplementationLibrary.1.0.191107.2\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
385-
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.1724-prerelease\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.1724-prerelease\build\native\Microsoft.Web.WebView2.targets')" />
385+
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.1777-prerelease\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.1777-prerelease\build\native\Microsoft.Web.WebView2.targets')" />
386386
</ImportGroup>
387387
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
388388
<PropertyGroup>
389389
<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>
390390
</PropertyGroup>
391391
<Error Condition="!Exists('..\packages\Microsoft.Windows.ImplementationLibrary.1.0.191107.2\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.ImplementationLibrary.1.0.191107.2\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
392-
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.1724-prerelease\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.1724-prerelease\build\native\Microsoft.Web.WebView2.targets'))" />
392+
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.1777-prerelease\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.1777-prerelease\build\native\Microsoft.Web.WebView2.targets'))" />
393393
</Target>
394394
</Project>

SampleApps/WebView2APISample/documentation/Testing-Instructions.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ These are instructions for manually testing all the features of the WebView2 API
9090
* [Open Link in New Window From PDF](#Open-Link-in-New-Window-from-PDF)
9191
* [WebView Does Not Crash](#WebView-Does-Not-Crash)
9292
* [Draggable Regions](#Draggable-Regions)
93+
* [Drag and Drop](#Drag-and-Drop)
9394

9495
## Getting started
9596

@@ -1404,3 +1405,20 @@ this the `appRegion` changes would not take place until some document element wa
14041405
1. Expected: Sample app will maximize
14051406
1. Right click 'Microsoft Edge WebView2' element and select `restore`
14061407
1. Expected: Sample app will restore.
1408+
1409+
#### Drag and Drop
1410+
Test that Drag and Drop is supported in WebView2 using both hosting modes.
1411+
1. Launch the sample app.
1412+
1. Select text "Runtime version".
1413+
1. Click, hold, and drag the selected text to the Query text box.
1414+
1. Release mouse over text box to drop text.
1415+
1. Expected: "Runtime version" text is inserted into Query text box.
1416+
1. Go to `Window -> Close WebView.`
1417+
1. Go to `Window -> WebView Creation Mode -> Visual - DComp.`
1418+
1. Go to `Window -> Create WebView.`
1419+
1. Select text "Runtime version".
1420+
1. Click, hold, and drag the selected text to the Query text box.
1421+
1. Release mouse over text box to drop text.
1422+
1. Expected: "Runtime version" text is inserted into Query text box.
1423+
1. Go to `Window -> Close WebView.`
1424+
1. Expected: App does not crash.
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.1724-prerelease" targetFramework="native" />
3+
<package id="Microsoft.Web.WebView2" version="1.0.1777-prerelease" targetFramework="native" />
44
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.191107.2" targetFramework="native" />
55
</packages>

0 commit comments

Comments
 (0)