Commit 830244fc authored by Maksim Sisov (GMT+3)'s avatar Maksim Sisov (GMT+3) Committed by Commit Bot

Revert "X11 and Ozone: Fix screen initialization for Ozone config"

This reverts commit 81dab1d6.

Reason for revert: Found a better solution

Original change's description:
> X11 and Ozone: Fix screen initialization for Ozone config
> 
> The tests that use ClientHintsBrowserTest override FeatureList
> during ::SetUp call, which results in erasing UseOzonePlatform
> from that, and InProcessBrowserTest::SetScreenInstance cannot
> check the status of the feature flag during ::SetUp call. And,
> as a consequence, fail to decide what path it must use. Append
> the UseOzonePlatform feature flag back to the scoped feature list
> so that initialization happens properly.
> 
> -----
> 
> PS: Please note that this is a temp solution that will help to choose
> between ozone and non-ozone X11 build. The switch that will be used
> to choose the path is --enable-features=UseOzonePlatform. Once
> non-Ozone X11 path is removed (hopefully by Q1 2021 depending on how
> the finch trial goes), the wrapper will be removed.
> 
> Please also note that it's impossible to build use_x11 && use_ozone
> without some hacks in PlatformCursor code. The changes to that are
> on their way to upstream.
> 
> ----
> 
> Bug: 1085700
> Change-Id: I995a434a25b6e1a0db3d16bb516184c0d3bc87de
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2333843
> Reviewed-by: Scott Violet <sky@chromium.org>
> Commit-Queue: Maksim Sisov (GMT+3) <msisov@igalia.com>
> Cr-Commit-Position: refs/heads/master@{#796341}

TBR=sky@chromium.org,msisov@igalia.com

Change-Id: I2f04fc98b373303ee5ea131f3c79550cfa3c0e8f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1085700
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2346427Reviewed-by: default avatarMaksim Sisov (GMT+3) <msisov@igalia.com>
Commit-Queue: Maksim Sisov (GMT+3) <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#796356}
parent 7e0b0e5c
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
#include "services/network/public/cpp/features.h" #include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/network_switches.h" #include "services/network/public/cpp/network_switches.h"
#include "third_party/blink/public/common/client_hints/client_hints.h" #include "third_party/blink/public/common/client_hints/client_hints.h"
#include "ui/base/ui_base_features.h"
namespace { namespace {
...@@ -265,23 +264,7 @@ class ClientHintsBrowserTest : public policy::PolicyTest, ...@@ -265,23 +264,7 @@ class ClientHintsBrowserTest : public policy::PolicyTest,
} }
void SetUp() override { void SetUp() override {
auto enabled_features = EnabledFeatures(); scoped_feature_list_.InitWithFeatureList(EnabledFeatures());
#if defined(USE_X11) && defined(USE_OZONE)
// The ClientHintsBrowserTest overrides features during SetUp call that
// results in UseOzonePlatform disabled (though, it was enabled in the
// beginning). Thus, make sure that we preserve this feature flag. PS:
// original feature list is restored right before BrowserMain and normal
// flow continues (UseOzonePlatform feature is there as well).
// TODO(https://crbug.com/1096425): remove this once USE_X11 goes away.
if (features::IsUsingOzonePlatform()) {
std::vector<base::FeatureList::FeatureOverrideInfo> overrides;
overrides.push_back(
{std::cref(features::kUseOzonePlatform),
base::FeatureList::OverrideState::OVERRIDE_ENABLE_FEATURE});
enabled_features->RegisterExtraFeatureOverrides(overrides);
}
#endif
scoped_feature_list_.InitWithFeatureList(std::move(enabled_features));
InProcessBrowserTest::SetUp(); InProcessBrowserTest::SetUp();
} }
......
...@@ -743,7 +743,6 @@ if (!is_android) { ...@@ -743,7 +743,6 @@ if (!is_android) {
"//third_party/widevine/cdm:buildflags", "//third_party/widevine/cdm:buildflags",
"//third_party/widevine/cdm:headers", "//third_party/widevine/cdm:headers",
"//ui/accessibility:test_support", "//ui/accessibility:test_support",
"//ui/base:features",
"//ui/base:test_support", "//ui/base:test_support",
"//ui/base/clipboard:clipboard_test_support", "//ui/base/clipboard:clipboard_test_support",
"//ui/base/dragdrop/mojom:mojom_shared", "//ui/base/dragdrop/mojom:mojom_shared",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment