From 57f755840f26b7ac063899ebe780eafdf65814b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20K=C3=A4s?= Date: Sat, 20 Jun 2020 00:53:46 +0200 Subject: [PATCH] WebBrowser doesn't like multiple UI threads --- .../System/Windows/Forms/AxHost.AxPropertyDescriptorTests.cs | 1 + .../System/Windows/Forms/ControlTests.ControlCollection.cs | 1 + src/System.Windows.Forms/tests/UnitTests/WebBrowserBaseTests.cs | 1 + 3 files changed, 3 insertions(+) diff --git a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AxHost.AxPropertyDescriptorTests.cs b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AxHost.AxPropertyDescriptorTests.cs index 3809414d5b0..87ef34535f4 100644 --- a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AxHost.AxPropertyDescriptorTests.cs +++ b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/AxHost.AxPropertyDescriptorTests.cs @@ -12,6 +12,7 @@ namespace System.Windows.Forms.Tests { + [Collection("Sequential")] // workaround for WebBrowser control corrupting memory when run on multiple UI threads (instantiated via GUID) public class AxHostPropertyDescriptorTests : IClassFixture { private const string EmptyClsidString = "00000000-0000-0000-0000-000000000000"; diff --git a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ControlTests.ControlCollection.cs b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ControlTests.ControlCollection.cs index 4af2acc4b0b..7adf522b5d0 100644 --- a/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ControlTests.ControlCollection.cs +++ b/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ControlTests.ControlCollection.cs @@ -16,6 +16,7 @@ namespace System.Windows.Forms.Tests { + [Collection("Sequential")] // workaround for WebBrowser control corrupting memory when run on multiple UI threads (instantiated via GUID) public class ControlControlCollectionTests : IClassFixture { [WinFormsFact] diff --git a/src/System.Windows.Forms/tests/UnitTests/WebBrowserBaseTests.cs b/src/System.Windows.Forms/tests/UnitTests/WebBrowserBaseTests.cs index 1fc17f5f070..0fdd48b3028 100644 --- a/src/System.Windows.Forms/tests/UnitTests/WebBrowserBaseTests.cs +++ b/src/System.Windows.Forms/tests/UnitTests/WebBrowserBaseTests.cs @@ -12,6 +12,7 @@ namespace System.Windows.Forms.Tests { using Size = System.Drawing.Size; + [Collection("Sequential")] // workaround for WebBrowser control corrupting memory when run on multiple UI threads (instantiated via GUID) public class WebBrowserBaseTests { public static IEnumerable Bounds_Set_TestData()