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

Unified Diff: chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc

Issue 2640433004: ChromeOS MD: Fix cannot drag tab onto immersive fullscreen window (Closed)
Patch Set: modify test coverage, but it is a disabled test Created 3 years, 11 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
Index: chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
index 860d0e3e4e3bf6788152dec31e903b7d78d23a01..b6fba575c9bcec09e5680b2a7458fb35755c7f28 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
@@ -8,6 +8,7 @@
#include <algorithm>
+#include "ash/common/material_design/material_design_controller.h"
sky 2017/01/18 16:40:45 Move to USE_ASH ifdef below.
Qiang(Joe) Xu 2017/01/20 17:36:24 Done.
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
@@ -2098,9 +2099,18 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest,
->controller())
.SetupForTest();
chrome::ToggleFullscreenMode(browser2);
+ // For MD, the browser's top chrome is completely hidden in immersive
+ // fullscreen mode.
ASSERT_TRUE(immersive_controller2->IsEnabled());
ASSERT_FALSE(immersive_controller2->IsRevealed());
- ASSERT_TRUE(tab_strip2->IsImmersiveStyle());
+ bool is_using_material_design =
+ ash::MaterialDesignController::IsImmersiveModeMaterial();
+ if (is_using_material_design) {
sky 2017/01/17 18:07:01 Is this test run in both md and non-md?
Qiang(Joe) Xu 2017/01/18 01:13:52 I don't know.. Do you mean it may not actually run
sky 2017/01/18 16:40:45 You have two code paths here, one md and one non-m
yiyix 2017/01/18 20:41:50 I think the test is running with the default value
Qiang(Joe) Xu 2017/01/20 17:36:24 It seems is_using_material_deisn is exercised righ
Qiang(Joe) Xu 2017/01/20 17:36:24 I think "immersive fullscreen" means "immersive un
+ ASSERT_FALSE(tab_strip2->visible());
+ } else {
+ ASSERT_TRUE(tab_strip2->visible());
+ ASSERT_TRUE(tab_strip2->IsImmersiveStyle());
+ }
// Move to the first tab and drag it enough so that it detaches, but not
// enough that it attaches to browser2.
@@ -2121,6 +2131,7 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest,
// at normal height while user is tragging tabs_strip2's tabs.
ASSERT_TRUE(immersive_controller2->IsRevealed());
ASSERT_FALSE(tab_strip2->IsImmersiveStyle());
+ ASSERT_TRUE(tab_strip2->visible());
// Release the mouse, stopping the drag session.
ASSERT_TRUE(ReleaseInput());
@@ -2143,7 +2154,12 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest,
EXPECT_TRUE(immersive_controller2->IsEnabled());
EXPECT_FALSE(immersive_controller2->IsRevealed());
- EXPECT_TRUE(tab_strip2->IsImmersiveStyle());
+ if (is_using_material_design) {
+ EXPECT_FALSE(tab_strip2->visible());
+ } else {
+ EXPECT_TRUE(tab_strip2->visible());
+ EXPECT_TRUE(tab_strip2->IsImmersiveStyle());
+ }
}
// Subclass of DetachToBrowserTabDragControllerTest that

Powered by Google App Engine
This is Rietveld 408576698