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

Side by Side Diff: ui/compositor/layer_unittest.cc

Issue 2877233002: Remove the i from visib[i]le. (Closed)
Patch Set: merge with tot Created 3 years, 7 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 | « services/ui/ws/window_server.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/compositor/layer.h" 5 #include "ui/compositor/layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 EXPECT_TRUE(l1->cc_layer_for_testing()->DrawsContent()); 982 EXPECT_TRUE(l1->cc_layer_for_testing()->DrawsContent());
983 EXPECT_TRUE(l1->cc_layer_for_testing()->contents_opaque()); 983 EXPECT_TRUE(l1->cc_layer_for_testing()->contents_opaque());
984 EXPECT_TRUE(l1->cc_layer_for_testing()->hide_layer_and_subtree()); 984 EXPECT_TRUE(l1->cc_layer_for_testing()->hide_layer_and_subtree());
985 EXPECT_EQ(gfx::Size(4, 5), l1->cc_layer_for_testing()->bounds()); 985 EXPECT_EQ(gfx::Size(4, 5), l1->cc_layer_for_testing()->bounds());
986 EXPECT_FALSE(callback3_run); 986 EXPECT_FALSE(callback3_run);
987 987
988 // Release the on |l1| mailbox to clean up the test. 988 // Release the on |l1| mailbox to clean up the test.
989 l1->SetShowSolidColorContent(); 989 l1->SetShowSolidColorContent();
990 } 990 }
991 991
992 // Various visibile/drawn assertions. 992 // Various visible/drawn assertions.
993 TEST_F(LayerWithNullDelegateTest, Visibility) { 993 TEST_F(LayerWithNullDelegateTest, Visibility) {
994 std::unique_ptr<Layer> l1(new Layer(LAYER_TEXTURED)); 994 std::unique_ptr<Layer> l1(new Layer(LAYER_TEXTURED));
995 std::unique_ptr<Layer> l2(new Layer(LAYER_TEXTURED)); 995 std::unique_ptr<Layer> l2(new Layer(LAYER_TEXTURED));
996 std::unique_ptr<Layer> l3(new Layer(LAYER_TEXTURED)); 996 std::unique_ptr<Layer> l3(new Layer(LAYER_TEXTURED));
997 l1->Add(l2.get()); 997 l1->Add(l2.get());
998 l2->Add(l3.get()); 998 l2->Add(l3.get());
999 999
1000 NullLayerDelegate delegate; 1000 NullLayerDelegate delegate;
1001 l1->set_delegate(&delegate); 1001 l1->set_delegate(&delegate);
1002 l2->set_delegate(&delegate); 1002 l2->set_delegate(&delegate);
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2243 layer.set_name("foo"); 2243 layer.set_name("foo");
2244 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info = 2244 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info =
2245 layer.TakeDebugInfo(nullptr); 2245 layer.TakeDebugInfo(nullptr);
2246 std::string trace_format("bar,"); 2246 std::string trace_format("bar,");
2247 debug_info->AppendAsTraceFormat(&trace_format); 2247 debug_info->AppendAsTraceFormat(&trace_format);
2248 std::string expected("bar,{\"layer_name\":\"foo\"}"); 2248 std::string expected("bar,{\"layer_name\":\"foo\"}");
2249 EXPECT_EQ(expected, trace_format); 2249 EXPECT_EQ(expected, trace_format);
2250 } 2250 }
2251 2251
2252 } // namespace ui 2252 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_server.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698