| OLD | NEW |
| 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 2227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2238 | 2238 |
| 2239 root->SetOpacity(0.5f); | 2239 root->SetOpacity(0.5f); |
| 2240 WaitForSwap(); | 2240 WaitForSwap(); |
| 2241 EXPECT_EQ(1u, animation_observer.animation_step_count()); | 2241 EXPECT_EQ(1u, animation_observer.animation_step_count()); |
| 2242 | 2242 |
| 2243 EXPECT_FALSE(animation_observer.shutdown()); | 2243 EXPECT_FALSE(animation_observer.shutdown()); |
| 2244 ResetCompositor(); | 2244 ResetCompositor(); |
| 2245 EXPECT_TRUE(animation_observer.shutdown()); | 2245 EXPECT_TRUE(animation_observer.shutdown()); |
| 2246 } | 2246 } |
| 2247 | 2247 |
| 2248 TEST(LayerDebugInfoTest, LayerNameDoesNotClobber) { |
| 2249 Layer layer(LAYER_NOT_DRAWN); |
| 2250 layer.set_name("foo"); |
| 2251 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info = |
| 2252 layer.TakeDebugInfo(nullptr); |
| 2253 std::string trace_format("bar,"); |
| 2254 debug_info->AppendAsTraceFormat(&trace_format); |
| 2255 std::string expected("bar,{\"layer_name\":\"foo\"}"); |
| 2256 EXPECT_EQ(expected, trace_format); |
| 2257 } |
| 2258 |
| 2248 } // namespace ui | 2259 } // namespace ui |
| OLD | NEW |