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

Side by Side Diff: ui/views/widget/native_widget_aura_unittest.cc

Issue 2524873002: Rename WindowTreeHost G|SetBounds to indicate they are in pixels. (Closed)
Patch Set: rebase Created 4 years 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 "ui/views/widget/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 ~NativeWidgetAuraTest() override {} 68 ~NativeWidgetAuraTest() override {}
69 69
70 TestFocusRules* test_focus_rules() { return test_focus_rules_; } 70 TestFocusRules* test_focus_rules() { return test_focus_rules_; }
71 71
72 // testing::Test overrides: 72 // testing::Test overrides:
73 void SetUp() override { 73 void SetUp() override {
74 AuraTestBase::SetUp(); 74 AuraTestBase::SetUp();
75 test_focus_rules_ = new TestFocusRules; 75 test_focus_rules_ = new TestFocusRules;
76 focus_controller_.reset(new wm::FocusController(test_focus_rules_)); 76 focus_controller_.reset(new wm::FocusController(test_focus_rules_));
77 aura::client::SetActivationClient(root_window(), focus_controller_.get()); 77 aura::client::SetActivationClient(root_window(), focus_controller_.get());
78 host()->SetBounds(gfx::Rect(640, 480)); 78 host()->SetBoundsInPixels(gfx::Rect(640, 480));
79 } 79 }
80 80
81 private: 81 private:
82 std::unique_ptr<wm::FocusController> focus_controller_; 82 std::unique_ptr<wm::FocusController> focus_controller_;
83 TestFocusRules* test_focus_rules_; 83 TestFocusRules* test_focus_rules_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAuraTest); 85 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAuraTest);
86 }; 86 };
87 87
88 TEST_F(NativeWidgetAuraTest, CenterWindowLargeParent) { 88 TEST_F(NativeWidgetAuraTest, CenterWindowLargeParent) {
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 EXPECT_FALSE(delegate.view()->HasFocus()); 596 EXPECT_FALSE(delegate.view()->HasFocus());
597 597
598 test_focus_rules()->set_can_activate(true); 598 test_focus_rules()->set_can_activate(true);
599 views::test::TestInitialFocusWidgetDelegate delegate2(root_window()); 599 views::test::TestInitialFocusWidgetDelegate delegate2(root_window());
600 delegate2.GetWidget()->Show(); 600 delegate2.GetWidget()->Show();
601 EXPECT_TRUE(delegate2.view()->HasFocus()); 601 EXPECT_TRUE(delegate2.view()->HasFocus());
602 } 602 }
603 603
604 } // namespace 604 } // namespace
605 } // namespace views 605 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc ('k') | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698