|
54 | 54 | #include "ScenarioSharedWorkerManager.h" |
55 | 55 | #include "ScenarioSaveAs.h" |
56 | 56 | #include "ScenarioScreenCapture.h" |
| 57 | +#include "ScenarioSensitivityLabel.h" |
57 | 58 | #include "ScenarioSharedBuffer.h" |
58 | 59 | #include "ScenarioSharedWorkerWRR.h" |
59 | 60 | #include "ScenarioThrottlingControl.h" |
@@ -630,6 +631,30 @@ bool AppWindow::ExecuteWebViewCommands(WPARAM wParam, LPARAM lParam) |
630 | 631 | NewComponent<ScenarioNotificationReceived>(this); |
631 | 632 | return true; |
632 | 633 | } |
| 634 | + case IDM_SCENARIO_PIRM_SET_ALLOWLIST: |
| 635 | + { |
| 636 | + auto sensitivityLabelComponent = GetOrCreateComponent<ScenarioSensitivityLabel>(); |
| 637 | + sensitivityLabelComponent->SetPageRestrictionManagerAllowlist(); |
| 638 | + return true; |
| 639 | + } |
| 640 | + case IDM_SCENARIO_PIRM_CHECK_AVAILABILITY: |
| 641 | + { |
| 642 | + auto sensitivityLabelComponent = GetOrCreateComponent<ScenarioSensitivityLabel>(); |
| 643 | + sensitivityLabelComponent->CheckPageRestrictionManagerAvailability(); |
| 644 | + return true; |
| 645 | + } |
| 646 | + case IDM_SCENARIO_SENSITIVITY_LABEL_START_TEST: |
| 647 | + { |
| 648 | + auto sensitivityLabelComponent = GetOrCreateComponent<ScenarioSensitivityLabel>(); |
| 649 | + sensitivityLabelComponent->LaunchLabelDemoPage(); |
| 650 | + return true; |
| 651 | + } |
| 652 | + case IDM_SCENARIO_SENSITIVITY_LABEL_TOGGLE_EVENTS: |
| 653 | + { |
| 654 | + auto sensitivityLabelComponent = GetOrCreateComponent<ScenarioSensitivityLabel>(); |
| 655 | + sensitivityLabelComponent->ToggleEventListener(); |
| 656 | + return true; |
| 657 | + } |
633 | 658 | case IDM_SCENARIO_TESTING_FOCUS: |
634 | 659 | { |
635 | 660 | WCHAR testingFocusPath[] = L"ScenarioTestingFocus.html"; |
@@ -1740,7 +1765,12 @@ void AppWindow::InitializeWebView() |
1740 | 1765 | //! [CreateCoreWebView2EnvironmentWithOptions] |
1741 | 1766 |
|
1742 | 1767 | std::wstring args; |
1743 | | - args.append(L"--enable-features=ThirdPartyStoragePartitioning,PartitionedCookies"); |
| 1768 | + // Page Interaction Restriction Manager requires msPageInteractionManagerWebview2 to be |
| 1769 | + // enabled from the args, as by default it's disabled in the browser. If you want to |
| 1770 | + // test these scenarios, this flag should be enabled. |
| 1771 | + args.append( |
| 1772 | + L"--enable-features=ThirdPartyStoragePartitioning,PartitionedCookies," |
| 1773 | + L"msPageInteractionManagerWebview2"); |
1744 | 1774 | auto options = Microsoft::WRL::Make<CoreWebView2EnvironmentOptions>(); |
1745 | 1775 | options->put_AdditionalBrowserArguments(args.c_str()); |
1746 | 1776 | CHECK_FAILURE( |
|
0 commit comments