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

Unified Diff: ui/aura/mus/window_tree_client_unittest.cc

Issue 2524873002: Rename WindowTreeHost G|SetBounds to indicate they are in pixels. (Closed)
Patch Set: rebase Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/mus/window_tree_client.cc ('k') | ui/aura/mus/window_tree_host_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_client_unittest.cc
diff --git a/ui/aura/mus/window_tree_client_unittest.cc b/ui/aura/mus/window_tree_client_unittest.cc
index 15adabeaf7d00926359e2f7002080377a9204c05..d79db8f5518fdf2b316b6466f6a6e53a35fbfd86 100644
--- a/ui/aura/mus/window_tree_client_unittest.cc
+++ b/ui/aura/mus/window_tree_client_unittest.cc
@@ -472,10 +472,10 @@ TEST_F(WindowTreeClientClientTest, InputEventBasic) {
WindowTreeHostMus window_tree_host(window_tree_client_impl());
Window* top_level = window_tree_host.window();
const gfx::Rect bounds(0, 0, 100, 100);
- window_tree_host.SetBounds(bounds);
+ window_tree_host.SetBoundsInPixels(bounds);
window_tree_host.Show();
EXPECT_EQ(bounds, top_level->bounds());
- EXPECT_EQ(bounds, window_tree_host.GetBounds());
+ EXPECT_EQ(bounds, window_tree_host.GetBoundsInPixels());
Window child(&window_delegate);
child.Init(ui::LAYER_NOT_DRAWN);
top_level->AddChild(&child);
@@ -769,7 +769,7 @@ TEST_F(WindowTreeClientClientTest, NewTopLevelWindowGetsPropertiesFromData) {
// TODO: check display_id.
EXPECT_EQ(display_id, window_tree_host.display_id());
EXPECT_EQ(gfx::Rect(0, 0, 3, 4), top_level->bounds());
- EXPECT_EQ(gfx::Rect(1, 2, 3, 4), top_level->GetHost()->GetBounds());
+ EXPECT_EQ(gfx::Rect(1, 2, 3, 4), top_level->GetHost()->GetBoundsInPixels());
}
TEST_F(WindowTreeClientClientTest, NewWindowGetsAllChangesInFlight) {
@@ -785,7 +785,7 @@ TEST_F(WindowTreeClientClientTest, NewWindowGetsAllChangesInFlight) {
top_level->Hide();
// Change bounds to 5, 6, 7, 8.
- window_tree_host.SetBounds(gfx::Rect(5, 6, 7, 8));
+ window_tree_host.SetBoundsInPixels(gfx::Rect(5, 6, 7, 8));
EXPECT_EQ(gfx::Rect(0, 0, 7, 8), window_tree_host.window()->bounds());
const uint8_t explicitly_set_test_property1_value = 2;
@@ -815,7 +815,7 @@ TEST_F(WindowTreeClientClientTest, NewWindowGetsAllChangesInFlight) {
// The only value that should take effect is the property for 'yy' as it was
// not in flight.
EXPECT_FALSE(top_level->TargetVisibility());
- EXPECT_EQ(gfx::Rect(5, 6, 7, 8), window_tree_host.GetBounds());
+ EXPECT_EQ(gfx::Rect(5, 6, 7, 8), window_tree_host.GetBoundsInPixels());
EXPECT_EQ(gfx::Rect(0, 0, 7, 8), top_level->bounds());
EXPECT_EQ(explicitly_set_test_property1_value,
top_level->GetProperty(kTestPropertyKey1));
@@ -835,7 +835,7 @@ TEST_F(WindowTreeClientClientTest, NewWindowGetsAllChangesInFlight) {
EXPECT_EQ(gfx::Rect(bounds_from_server.size()), top_level->bounds());
// But the bounds of the WindowTreeHost is display relative.
EXPECT_EQ(bounds_from_server,
- top_level->GetRootWindow()->GetHost()->GetBounds());
+ top_level->GetRootWindow()->GetHost()->GetBoundsInPixels());
window_tree()->AckAllChangesOfType(WindowTreeChangeType::PROPERTY, false);
EXPECT_EQ(server_test_property1_value,
top_level->GetProperty(kTestPropertyKey1));
« no previous file with comments | « ui/aura/mus/window_tree_client.cc ('k') | ui/aura/mus/window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698