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

Unified Diff: athena/wm/split_view_controller_unittest.cc

Issue 488153003: Fix crash when dragging a half width window to split view from overivew mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« athena/wm/split_view_controller.h ('K') | « athena/wm/split_view_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/split_view_controller_unittest.cc
diff --git a/athena/wm/split_view_controller_unittest.cc b/athena/wm/split_view_controller_unittest.cc
index 268a3acf1d24e29ea391720991f10ac70ae26164..f4476294ae682ee4db6791dd05306f2756b85581 100644
--- a/athena/wm/split_view_controller_unittest.cc
+++ b/athena/wm/split_view_controller_unittest.cc
@@ -4,7 +4,7 @@
#include "athena/wm/split_view_controller.h"
-#include "athena/common/fill_layout_manager.h"
+#include "athena/screen/public/screen_manager.h"
#include "athena/test/athena_test_base.h"
#include "athena/wm/window_list_provider_impl.h"
#include "base/memory/scoped_vector.h"
@@ -18,6 +18,9 @@ typedef test::AthenaTestBase SplitViewControllerTest;
// Tests that when split mode is activated, the windows on the left and right
// are selected correctly.
TEST_F(SplitViewControllerTest, SplitModeActivation) {
+ aura::Window* container = ScreenManager::Get()->CreateContainer(
+ ScreenManager::ContainerParams("Test", 0));
+
aura::test::TestWindowDelegate delegate;
ScopedVector<aura::Window> windows;
const int kNumWindows = 6;
@@ -25,13 +28,13 @@ TEST_F(SplitViewControllerTest, SplitModeActivation) {
aura::Window* window = new aura::Window(&delegate);
window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
window->Init(aura::WINDOW_LAYER_SOLID_COLOR);
- root_window()->AddChild(window);
+ container->AddChild(window);
sadrul 2014/08/21 16:04:04 There's now a AthenaTestBase::CreateTestWindow().
windows.push_back(window);
}
scoped_ptr<WindowListProvider> list_provider(
- new WindowListProviderImpl(root_window()));
- SplitViewController controller(root_window(), list_provider.get());
+ new WindowListProviderImpl(container));
+ SplitViewController controller(container, list_provider.get());
sadrul 2014/08/21 16:04:04 Instead of creating this new SVC here, perhaps you
ASSERT_FALSE(controller.IsSplitViewModeActive());
controller.ActivateSplitMode(NULL, NULL);
« athena/wm/split_view_controller.h ('K') | « athena/wm/split_view_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698