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

Unified Diff: ui/views/widget/widget_interactive_uitest.cc

Issue 1972363002: mus: Add views_mus_interactive_ui_tests target (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase onto Sadrul's patch, pull out ViewsMusTestSuite Created 4 years, 7 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 | « ui/views/test/views_test_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget_interactive_uitest.cc
diff --git a/ui/views/widget/widget_interactive_uitest.cc b/ui/views/widget/widget_interactive_uitest.cc
index b6267682e6ff9953aae0546479fb524718caadf7..11fb5ee44449a1be3169d9d4b573bad459cff9c1 100644
--- a/ui/views/widget/widget_interactive_uitest.cc
+++ b/ui/views/widget/widget_interactive_uitest.cc
@@ -278,11 +278,15 @@ class WidgetTestInteractive : public WidgetTest {
~WidgetTestInteractive() override {}
void SetUp() override {
- gfx::GLSurfaceTestSupport::InitializeOneOff();
- ui::RegisterPathProvider();
- base::FilePath ui_test_pak_path;
- ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
- ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
+ // On mus these tests run as part of views::ViewTestSuite which already does
+ // this initialization.
+ if (!IsMus()) {
+ gfx::GLSurfaceTestSupport::InitializeOneOff();
+ ui::RegisterPathProvider();
+ base::FilePath ui_test_pak_path;
+ ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
+ ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
+ }
WidgetTest::SetUp();
}
@@ -877,6 +881,10 @@ class ModalDialogDelegate : public DialogDelegateView {
// Tests whether the focused window is set correctly when a modal window is
// created and destroyed. When it is destroyed it should focus the owner window.
TEST_F(WidgetTestInteractive, WindowModalWindowDestroyedActivationTest) {
+ // Fails on mus due to focus issues. http://crbug.com/611601
+ if (IsMus())
+ return;
+
TestWidgetFocusChangeListener focus_listener;
WidgetFocusManager::GetInstance()->AddFocusChangeListener(&focus_listener);
const std::vector<gfx::NativeView>& focus_changes =
@@ -948,6 +956,10 @@ TEST_F(WidgetTestInteractive, WindowModalWindowDestroyedActivationTest) {
// Test that when opening a system-modal window, capture is released.
TEST_F(WidgetTestInteractive, MAYBE_SystemModalWindowReleasesCapture) {
+ // Crashes on mus due to capture issue. http://crbug.com/611764
+ if (IsMus())
+ return;
+
TestWidgetFocusChangeListener focus_listener;
WidgetFocusManager::GetInstance()->AddFocusChangeListener(&focus_listener);
@@ -1008,6 +1020,11 @@ TEST_F(WidgetTestInteractive, CanActivateFlagIsHonored) {
#if defined(USE_AURA)
// Test that touch selection quick menu is not activated when opened.
TEST_F(WidgetTestInteractive, TouchSelectionQuickMenuIsNotActivated) {
+ // Fails on mus because the USER_PRIVATE window container is not visible by
+ // default. See http://crbug.com/611601
+ if (IsMus())
+ return;
+
#if defined(OS_WIN)
views_delegate()->set_use_desktop_native_widgets(true);
#endif // !defined(OS_WIN)
@@ -1039,6 +1056,11 @@ TEST_F(WidgetTestInteractive, TouchSelectionQuickMenuIsNotActivated) {
#endif // defined(USE_AURA)
TEST_F(WidgetTestInteractive, DisableViewDoesNotActivateWidget) {
+ // Fails on mus because the USER_PRIVATE window container is not visible by
+ // default. See http://crbug.com/611601
+ if (IsMus())
+ return;
+
#if defined(OS_WIN)
views_delegate()->set_use_desktop_native_widgets(true);
#endif // !defined(OS_WIN)
@@ -1285,11 +1307,15 @@ class WidgetCaptureTest : public ViewsTestBase {
~WidgetCaptureTest() override {}
void SetUp() override {
- gfx::GLSurfaceTestSupport::InitializeOneOff();
- ui::RegisterPathProvider();
- base::FilePath ui_test_pak_path;
- ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
- ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
+ // On mus these tests run as part of views::ViewTestSuite which already does
+ // this initialization.
+ if (!IsMus()) {
+ gfx::GLSurfaceTestSupport::InitializeOneOff();
+ ui::RegisterPathProvider();
+ base::FilePath ui_test_pak_path;
+ ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
+ ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
+ }
ViewsTestBase::SetUp();
}
@@ -1356,12 +1382,20 @@ TEST_F(WidgetCaptureTest, Capture) {
#if !defined(OS_CHROMEOS)
// See description in TestCapture(). Creates DesktopNativeWidget.
TEST_F(WidgetCaptureTest, CaptureDesktopNativeWidget) {
+ // Fails on mus. http://crbug.com/611764
+ if (IsMus())
+ return;
+
TestCapture(true);
}
#endif
// Test that no state is set if capture fails.
TEST_F(WidgetCaptureTest, FailedCaptureRequestIsNoop) {
+ // Fails on mus. http://crbug.com/611764
+ if (IsMus())
+ return;
+
Widget widget;
Widget::InitParams params =
CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS);
@@ -1404,6 +1438,10 @@ TEST_F(WidgetCaptureTest, FailedCaptureRequestIsNoop) {
// Test that a synthetic mouse exit is sent to the widget which was handling
// mouse events when a different widget grabs capture.
TEST_F(WidgetCaptureTest, MAYBE_MouseExitOnCaptureGrab) {
+ // Fails on mus. http://crbug.com/611764
+ if (IsMus())
+ return;
+
Widget widget1;
Widget::InitParams params1 =
CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS);
@@ -1659,6 +1697,10 @@ TEST_F(WidgetInputMethodInteractiveTest, OneWindow) {
// Test input method focus changes affected by focus changes cross 2 windows
// which shares the same top window.
TEST_F(WidgetInputMethodInteractiveTest, TwoWindows) {
+ // Fails on mus. http://crbug.com/611766
+ if (IsMus())
+ return;
+
Widget* parent = CreateWidget();
parent->SetBounds(gfx::Rect(100, 100, 100, 100));
« no previous file with comments | « ui/views/test/views_test_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698