Commit e1a63e9a authored by Yuki Shiino's avatar Yuki Shiino Committed by Commit Bot

Revert "[ozone/x11] Enabled user input monitor unit tests."

This reverts commit 30a60064.

Reason for revert: Suspicious about causing test failures.
https://ci.chromium.org/p/chromium/builders/ci/linux-lacros-tester-rel/4433

Original change's description:
> [ozone/x11] Enabled user input monitor unit tests.
>
> This CL adds Ozone platform initialisation to the user input monitor tests
> so they can now work with Ozone enabled.
>
> Bug: 1109112
> Change-Id: I31f9dabf2da9eed85cd05fe27017899b0247f4bc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2521144
> Commit-Queue: Alexander Dunaev <adunaev@igalia.com>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#826638}

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

Change-Id: Ic8cd3da17dd5d2de01981aa9a8f33b6a55621c43
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1109112
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2531810Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826688}
parent 8cf6737d
...@@ -19,35 +19,19 @@ ...@@ -19,35 +19,19 @@
#if defined(USE_OZONE) #if defined(USE_OZONE)
#include "ui/base/ui_base_features.h" // nogncheck #include "ui/base/ui_base_features.h" // nogncheck
#include "ui/ozone/public/ozone_platform.h" // nogncheck
#endif #endif
namespace media { namespace media {
namespace { TEST(UserInputMonitorTest, CreatePlatformSpecific) {
class UserInputMonitorTest : public testing::Test {
protected:
// testing::Test.
void SetUp() override {
#if defined(USE_OZONE) #if defined(USE_OZONE)
if (features::IsUsingOzonePlatform()) { // TODO(crbug.com/1109112): enable those tests for Ozone.
if (std::strcmp(ui::OzonePlatform::GetPlatformName(), "drm") == 0) { // Here, the only issue why they don't work is that the Ozone platform is not
// OzonePlatformDrm::InitializeUI hangs in tests. // initialised.
GTEST_SKIP(); if (features::IsUsingOzonePlatform())
} return;
// Initialise Ozone in single process mode, as all tests do.
ui::OzonePlatform::InitParams params;
params.single_process = true;
ui::OzonePlatform::InitializeForUI(params);
}
#endif #endif
}
};
} // namespace
TEST_F(UserInputMonitorTest, CreatePlatformSpecific) {
#if defined(OS_LINUX) || defined(OS_CHROMEOS) #if defined(OS_LINUX) || defined(OS_CHROMEOS)
base::test::TaskEnvironment task_environment( base::test::TaskEnvironment task_environment(
base::test::TaskEnvironment::MainThreadType::IO); base::test::TaskEnvironment::MainThreadType::IO);
...@@ -69,7 +53,15 @@ TEST_F(UserInputMonitorTest, CreatePlatformSpecific) { ...@@ -69,7 +53,15 @@ TEST_F(UserInputMonitorTest, CreatePlatformSpecific) {
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
} }
TEST_F(UserInputMonitorTest, CreatePlatformSpecificWithMapping) { TEST(UserInputMonitorTest, CreatePlatformSpecificWithMapping) {
#if defined(USE_OZONE)
// TODO(crbug.com/1109112): enable those tests for Ozone.
// Here, the only issue why they don't work is that the Ozone platform is not
// initialised.
if (features::IsUsingOzonePlatform())
return;
#endif
#if defined(OS_LINUX) || defined(OS_CHROMEOS) #if defined(OS_LINUX) || defined(OS_CHROMEOS)
base::test::TaskEnvironment task_environment( base::test::TaskEnvironment task_environment(
base::test::TaskEnvironment::MainThreadType::IO); base::test::TaskEnvironment::MainThreadType::IO);
...@@ -98,7 +90,7 @@ TEST_F(UserInputMonitorTest, CreatePlatformSpecificWithMapping) { ...@@ -98,7 +90,7 @@ TEST_F(UserInputMonitorTest, CreatePlatformSpecificWithMapping) {
EXPECT_EQ(0u, ReadKeyPressMonitorCount(readonly_mapping)); EXPECT_EQ(0u, ReadKeyPressMonitorCount(readonly_mapping));
} }
TEST_F(UserInputMonitorTest, ReadWriteKeyPressMonitorCount) { TEST(UserInputMonitorTest, ReadWriteKeyPressMonitorCount) {
std::unique_ptr<base::MappedReadOnlyRegion> shmem = std::unique_ptr<base::MappedReadOnlyRegion> shmem =
std::make_unique<base::MappedReadOnlyRegion>( std::make_unique<base::MappedReadOnlyRegion>(
base::ReadOnlySharedMemoryRegion::Create(sizeof(uint32_t))); base::ReadOnlySharedMemoryRegion::Create(sizeof(uint32_t)));
......
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