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

Side by Side Diff: ui/aura/mus/window_tree_client_unittest.cc

Issue 2513753003: Add string16 and name/title support to aura::PropertyConverter. (Closed)
Patch Set: Update failing test to ack all changes as failed. 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 unified diff | Download patch
« no previous file with comments | « ui/aura/mus/property_converter_unittest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/aura/mus/window_tree_client.h" 5 #include "ui/aura/mus/window_tree_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 EXPECT_FALSE(top_level->TargetVisibility()); 838 EXPECT_FALSE(top_level->TargetVisibility());
839 ASSERT_TRUE(window_tree()->AckSingleChangeOfType( 839 ASSERT_TRUE(window_tree()->AckSingleChangeOfType(
840 WindowTreeChangeType::VISIBLE, false)); 840 WindowTreeChangeType::VISIBLE, false));
841 EXPECT_TRUE(top_level->TargetVisibility()); 841 EXPECT_TRUE(top_level->TargetVisibility());
842 window_tree()->AckAllChangesOfType(WindowTreeChangeType::BOUNDS, false); 842 window_tree()->AckAllChangesOfType(WindowTreeChangeType::BOUNDS, false);
843 // The bounds of the top_level is always at the origin. 843 // The bounds of the top_level is always at the origin.
844 EXPECT_EQ(gfx::Rect(bounds_from_server.size()), top_level->bounds()); 844 EXPECT_EQ(gfx::Rect(bounds_from_server.size()), top_level->bounds());
845 // But the bounds of the WindowTreeHost is display relative. 845 // But the bounds of the WindowTreeHost is display relative.
846 EXPECT_EQ(bounds_from_server, 846 EXPECT_EQ(bounds_from_server,
847 top_level->GetRootWindow()->GetHost()->GetBounds()); 847 top_level->GetRootWindow()->GetHost()->GetBounds());
848 ASSERT_TRUE(window_tree()->AckSingleChangeOfType( 848 window_tree()->AckAllChangesOfType(WindowTreeChangeType::PROPERTY, false);
849 WindowTreeChangeType::PROPERTY, false));
850 EXPECT_EQ(server_test_property1_value, 849 EXPECT_EQ(server_test_property1_value,
851 top_level->GetProperty(kTestPropertyKey1)); 850 top_level->GetProperty(kTestPropertyKey1));
852 EXPECT_EQ(server_test_property2_value, 851 EXPECT_EQ(server_test_property2_value,
853 top_level->GetProperty(kTestPropertyKey2)); 852 top_level->GetProperty(kTestPropertyKey2));
854 } 853 }
855 854
856 TEST_F(WindowTreeClientClientTest, NewWindowGetsProperties) { 855 TEST_F(WindowTreeClientClientTest, NewWindowGetsProperties) {
857 RegisterTestProperties(GetPropertyConverter()); 856 RegisterTestProperties(GetPropertyConverter());
858 Window window(nullptr); 857 Window window(nullptr);
859 const uint8_t explicitly_set_test_property1_value = 29; 858 const uint8_t explicitly_set_test_property1_value = 29;
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 ASSERT_EQ(1u, root_window()->children().size()); 1220 ASSERT_EQ(1u, root_window()->children().size());
1222 Window* server_window = root_window()->children()[0]; 1221 Window* server_window = root_window()->children()[0];
1223 EXPECT_EQ(window1->parent(), server_window); 1222 EXPECT_EQ(window1->parent(), server_window);
1224 EXPECT_EQ(window2->parent(), server_window); 1223 EXPECT_EQ(window2->parent(), server_window);
1225 ASSERT_EQ(2u, server_window->children().size()); 1224 ASSERT_EQ(2u, server_window->children().size());
1226 EXPECT_EQ(window1, server_window->children()[0]); 1225 EXPECT_EQ(window1, server_window->children()[0]);
1227 EXPECT_EQ(window2, server_window->children()[1]); 1226 EXPECT_EQ(window2, server_window->children()[1]);
1228 } 1227 }
1229 1228
1230 } // namespace aura 1229 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/mus/property_converter_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698