OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "cc/resources/ui_resource_bitmap.h" | 5 #include "cc/resources/ui_resource_bitmap.h" |
6 #include "cc/test/fake_layer_tree_host_client.h" | 6 #include "cc/test/fake_layer_tree_host_client.h" |
7 #include "cc/test/test_task_graph_runner.h" | 7 #include "cc/test/test_task_graph_runner.h" |
8 #include "cc/trees/layer_tree_host.h" | 8 #include "cc/trees/layer_tree_host.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 TEST_F(ResourceManagerTest, PreloadEnsureResource) { | 122 TEST_F(ResourceManagerTest, PreloadEnsureResource) { |
123 const cc::UIResourceId kResourceId = 99; | 123 const cc::UIResourceId kResourceId = 99; |
124 PreloadResource(kTestResourceType); | 124 PreloadResource(kTestResourceType); |
125 EXPECT_CALL(*host_.get(), CreateUIResource(_)) | 125 EXPECT_CALL(*host_.get(), CreateUIResource(_)) |
126 .WillOnce(Return(kResourceId)) | 126 .WillOnce(Return(kResourceId)) |
127 .RetiresOnSaturation(); | 127 .RetiresOnSaturation(); |
128 SetResourceAsLoaded(kTestResourceType); | 128 SetResourceAsLoaded(kTestResourceType); |
129 EXPECT_EQ(kResourceId, GetUIResourceId(kTestResourceType)); | 129 EXPECT_EQ(kResourceId, GetUIResourceId(kTestResourceType)); |
130 } | 130 } |
131 | 131 |
| 132 // TODO(twellington): Add test for new resource_manager_impl methods. |
| 133 |
132 } // namespace ui | 134 } // namespace ui |
OLD | NEW |