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

Side by Side Diff: athena/wm/window_manager_unittest.cc

Issue 545393002: Adding split view divider widget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a NOTREACHED in the test Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « athena/wm/window_manager_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "athena/wm/public/window_manager.h" 5 #include "athena/wm/public/window_manager.h"
6 6
7 #include "athena/screen/public/screen_manager.h" 7 #include "athena/screen/public/screen_manager.h"
8 #include "athena/test/athena_test_base.h" 8 #include "athena/test/athena_test_base.h"
9 #include "athena/wm/public/window_list_provider.h" 9 #include "athena/wm/public/window_list_provider.h"
10 #include "athena/wm/split_view_controller.h" 10 #include "athena/wm/split_view_controller.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 scoped_ptr<aura::Window> w2(CreateAndShowWindow(&delegate)); 312 scoped_ptr<aura::Window> w2(CreateAndShowWindow(&delegate));
313 w2->Show(); 313 w2->Show();
314 314
315 generator.PressKey(ui::VKEY_F6, ui::EF_CONTROL_DOWN); 315 generator.PressKey(ui::VKEY_F6, ui::EF_CONTROL_DOWN);
316 generator.ReleaseKey(ui::VKEY_F6, ui::EF_CONTROL_DOWN); 316 generator.ReleaseKey(ui::VKEY_F6, ui::EF_CONTROL_DOWN);
317 EXPECT_TRUE(wm_api.GetSplitViewController()->IsSplitViewModeActive()); 317 EXPECT_TRUE(wm_api.GetSplitViewController()->IsSplitViewModeActive());
318 int width = 318 int width =
319 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().work_area().width(); 319 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().work_area().width();
320 320
321 EXPECT_EQ(width / 2, w1->bounds().width()); 321 EXPECT_EQ(w1->bounds().width(), w2->bounds().width());
322 EXPECT_EQ(width / 2, w2->bounds().width()); 322 EXPECT_GE(width / 2, w1->bounds().width());
323 323
324 // Toggle back to normal mode. 324 // Toggle back to normal mode.
325 generator.PressKey(ui::VKEY_F6, ui::EF_CONTROL_DOWN); 325 generator.PressKey(ui::VKEY_F6, ui::EF_CONTROL_DOWN);
326 generator.ReleaseKey(ui::VKEY_F6, ui::EF_CONTROL_DOWN); 326 generator.ReleaseKey(ui::VKEY_F6, ui::EF_CONTROL_DOWN);
327 EXPECT_FALSE(wm_api.GetSplitViewController()->IsSplitViewModeActive()); 327 EXPECT_FALSE(wm_api.GetSplitViewController()->IsSplitViewModeActive());
328 328
329 EXPECT_EQ(width, w1->bounds().width()); 329 EXPECT_EQ(width, w1->bounds().width());
330 EXPECT_EQ(width, w2->bounds().width()); 330 EXPECT_EQ(width, w2->bounds().width());
331 } 331 }
332 332
(...skipping 15 matching lines...) Expand all
348 WindowOverviewModeDelegate* overview_delegate = wm_api.wm(); 348 WindowOverviewModeDelegate* overview_delegate = wm_api.wm();
349 overview_delegate->OnSelectWindow(w1.get()); 349 overview_delegate->OnSelectWindow(w1.get());
350 EXPECT_FALSE(wm_api.GetSplitViewController()->IsSplitViewModeActive()); 350 EXPECT_FALSE(wm_api.GetSplitViewController()->IsSplitViewModeActive());
351 EXPECT_TRUE(w1->IsVisible()); 351 EXPECT_TRUE(w1->IsVisible());
352 // Make sure the windows that were in split-view mode are hidden. 352 // Make sure the windows that were in split-view mode are hidden.
353 EXPECT_FALSE(w2->IsVisible()); 353 EXPECT_FALSE(w2->IsVisible());
354 EXPECT_FALSE(w3->IsVisible()); 354 EXPECT_FALSE(w3->IsVisible());
355 } 355 }
356 356
357 } // namespace athena 357 } // namespace athena
OLDNEW
« no previous file with comments | « athena/wm/window_manager_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698