Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1167)

Unified Diff: ash/system/status_area_widget_unittest.cc

Issue 2807833002: [views-mus] Prevent creating a native OzonePlatform in mus tests. (Closed)
Patch Set: sky comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/aura/env.cc » ('j') | ui/base/dragdrop/os_exchange_data_provider_factory.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/status_area_widget_unittest.cc
diff --git a/ash/system/status_area_widget_unittest.cc b/ash/system/status_area_widget_unittest.cc
index 3062256281300df52b986a28f78865d87a3a27f1..49e4f957f20d623c4780867bc0fdb6903e74acd6 100644
--- a/ash/system/status_area_widget_unittest.cc
+++ b/ash/system/status_area_widget_unittest.cc
@@ -15,6 +15,7 @@
#include "ash/test/ash_test_base.h"
#include "ash/test/status_area_widget_test_helper.h"
#include "base/command_line.h"
+#include "ui/aura/env.h"
namespace ash {
@@ -64,18 +65,27 @@ class StatusAreaWidgetPaletteTest : public test::AshTestBase {
// testing::Test:
void SetUp() override {
- base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
- cmd->AppendSwitch(switches::kAshForceEnablePalette);
- // It's difficult to write a test that marks the primary display as
- // internal before the status area is constructed. Just force the palette
- // for all displays.
- cmd->AppendSwitch(switches::kAshEnablePaletteOnAllDisplays);
+ // TODO(erg): The implementation of PaletteTray assumes it can talk directly
+ // to ui::InputDeviceManager in a mus environment, which it can't.
+ if (aura::Env::GetInstance()->mode() != aura::Env::Mode::MUS) {
+ base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
+ cmd->AppendSwitch(switches::kAshForceEnablePalette);
+ // It's difficult to write a test that marks the primary display as
+ // internal before the status area is constructed. Just force the palette
+ // for all displays.
+ cmd->AppendSwitch(switches::kAshEnablePaletteOnAllDisplays);
+ }
AshTestBase::SetUp();
}
};
// Tests that the stylus palette tray is constructed.
TEST_F(StatusAreaWidgetPaletteTest, Basics) {
+ // TODO(erg): The implementation of PaletteTray assumes it can talk directly
+ // to ui::InputDeviceManager in a mus environment, which it can't.
+ if (aura::Env::GetInstance()->mode() == aura::Env::Mode::MUS)
+ return;
+
StatusAreaWidget* status = StatusAreaWidgetTestHelper::GetStatusAreaWidget();
EXPECT_TRUE(status->palette_tray());
« no previous file with comments | « no previous file | ui/aura/env.cc » ('j') | ui/base/dragdrop/os_exchange_data_provider_factory.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698