OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "cc/heads_up_display_layer.h" | 7 #include "cc/heads_up_display_layer.h" |
8 #include "cc/layer.h" | 8 #include "cc/layer.h" |
9 #include "cc/layer_tree_host.h" | 9 #include "cc/layer_tree_host.h" |
10 #include "cc/test/layer_tree_test_common.h" | 10 #include "cc/test/layer_tree_test_common.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 public: | 39 public: |
40 HudWithRootLayerChange() | 40 HudWithRootLayerChange() |
41 : m_rootLayer1(DrawsContentLayer::create()) | 41 : m_rootLayer1(DrawsContentLayer::create()) |
42 , m_rootLayer2(DrawsContentLayer::create()) | 42 , m_rootLayer2(DrawsContentLayer::create()) |
43 , m_numCommits(0) | 43 , m_numCommits(0) |
44 { | 44 { |
45 } | 45 } |
46 | 46 |
47 virtual void beginTest() OVERRIDE | 47 virtual void beginTest() OVERRIDE |
48 { | 48 { |
49 m_rootLayer1->setBounds(IntSize(30, 30)); | 49 m_rootLayer1->setBounds(gfx::Size(30, 30)); |
50 m_rootLayer2->setBounds(IntSize(30, 30)); | 50 m_rootLayer2->setBounds(gfx::Size(30, 30)); |
51 | 51 |
52 postSetNeedsCommitToMainThread(); | 52 postSetNeedsCommitToMainThread(); |
53 } | 53 } |
54 | 54 |
55 virtual void didCommit() OVERRIDE | 55 virtual void didCommit() OVERRIDE |
56 { | 56 { |
57 ++m_numCommits; | 57 ++m_numCommits; |
58 | 58 |
59 ASSERT_TRUE(m_layerTreeHost->hudLayer()); | 59 ASSERT_TRUE(m_layerTreeHost->hudLayer()); |
60 | 60 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 scoped_refptr<DrawsContentLayer> m_rootLayer2; | 104 scoped_refptr<DrawsContentLayer> m_rootLayer2; |
105 int m_numCommits; | 105 int m_numCommits; |
106 }; | 106 }; |
107 | 107 |
108 TEST_F(HudWithRootLayerChange, runMultiThread) | 108 TEST_F(HudWithRootLayerChange, runMultiThread) |
109 { | 109 { |
110 runTest(true); | 110 runTest(true); |
111 } | 111 } |
112 | 112 |
113 } // namespace | 113 } // namespace |
OLD | NEW |