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

Side by Side Diff: ash/wm/system_modal_container_layout_manager_unittest.cc

Issue 1440593004: Make operators on scoped_ptr match the ones defined for std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrequals: operators-review Created 5 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/wm/system_modal_container_layout_manager.h" 5 #include "ash/wm/system_modal_container_layout_manager.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/session/session_state_delegate.h" 8 #include "ash/session/session_state_delegate.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 e1.ClickLeftButton(); 268 e1.ClickLeftButton();
269 EXPECT_TRUE(wm::IsActiveWindow(t1.get())); 269 EXPECT_TRUE(wm::IsActiveWindow(t1.get()));
270 270
271 // Now open another modal transient parented to the original modal transient. 271 // Now open another modal transient parented to the original modal transient.
272 aura::Window* t2 = OpenTestWindowWithParent(t1.get(), true); 272 aura::Window* t2 = OpenTestWindowWithParent(t1.get(), true);
273 TransientWindowObserver do2; 273 TransientWindowObserver do2;
274 t2->AddObserver(&do2); 274 t2->AddObserver(&do2);
275 275
276 EXPECT_TRUE(wm::IsActiveWindow(t2)); 276 EXPECT_TRUE(wm::IsActiveWindow(t2));
277 277
278 EXPECT_EQ(t1, ::wm::GetTransientParent(t2)); 278 EXPECT_EQ(t1.get(), ::wm::GetTransientParent(t2));
279 EXPECT_EQ(GetModalContainer(), t2->parent()); 279 EXPECT_EQ(GetModalContainer(), t2->parent());
280 280
281 // t2 should still be active, even after clicking on t1. 281 // t2 should still be active, even after clicking on t1.
282 ui::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), t1.get()); 282 ui::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), t1.get());
283 e2.ClickLeftButton(); 283 e2.ClickLeftButton();
284 EXPECT_TRUE(wm::IsActiveWindow(t2)); 284 EXPECT_TRUE(wm::IsActiveWindow(t2));
285 285
286 // Both transients should be destroyed with parent. 286 // Both transients should be destroyed with parent.
287 t1.reset(); 287 t1.reset();
288 EXPECT_TRUE(do1.destroyed()); 288 EXPECT_TRUE(do1.destroyed());
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 ShowKeyboard(true); 644 ShowKeyboard(true);
645 EXPECT_EQ(modal_size.ToString(), modal_window->bounds().size().ToString()); 645 EXPECT_EQ(modal_size.ToString(), modal_window->bounds().size().ToString());
646 EXPECT_EQ(modal_origin.x(), modal_window->bounds().x()); 646 EXPECT_EQ(modal_origin.x(), modal_window->bounds().x());
647 EXPECT_EQ(0, modal_window->bounds().y()); 647 EXPECT_EQ(0, modal_window->bounds().y());
648 648
649 ShowKeyboard(false); 649 ShowKeyboard(false);
650 } 650 }
651 651
652 } // namespace test 652 } // namespace test
653 } // namespace ash 653 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698