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 "cc/resource_update_controller.h" | 5 #include "cc/resource_update_controller.h" |
6 | 6 |
7 #include "cc/single_thread_proxy.h" // For DebugScopedSetImplThread | 7 #include "cc/single_thread_proxy.h" // For DebugScopedSetImplThread |
8 #include "cc/test/fake_proxy.h" | 8 #include "cc/test/fake_proxy.h" |
9 #include "cc/test/fake_web_compositor_output_surface.h" | 9 #include "cc/test/fake_web_compositor_output_surface.h" |
10 #include "cc/test/fake_web_graphics_context_3d.h" | 10 #include "cc/test/fake_web_graphics_context_3d.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 ResourceUpdateControllerTest* m_test; | 58 ResourceUpdateControllerTest* m_test; |
59 bool m_supportShallowFlush; | 59 bool m_supportShallowFlush; |
60 }; | 60 }; |
61 | 61 |
62 | 62 |
63 class ResourceUpdateControllerTest : public Test { | 63 class ResourceUpdateControllerTest : public Test { |
64 public: | 64 public: |
65 ResourceUpdateControllerTest() | 65 ResourceUpdateControllerTest() |
66 : m_proxy(scoped_ptr<Thread>(NULL)) | 66 : m_proxy(scoped_ptr<Thread>(NULL)) |
67 , m_queue(make_scoped_ptr(new ResourceUpdateQueue)) | 67 , m_queue(make_scoped_ptr(new ResourceUpdateQueue)) |
68 , m_resourceManager(PrioritizedResourceManager::create(60*1024*1024, 102
4, Renderer::ContentPool, &m_proxy)) | 68 , m_resourceManager(PrioritizedResourceManager::create(Renderer::Content
Pool, &m_proxy)) |
69 , m_fullUploadCountExpected(0) | 69 , m_fullUploadCountExpected(0) |
70 , m_partialCountExpected(0) | 70 , m_partialCountExpected(0) |
71 , m_totalUploadCountExpected(0) | 71 , m_totalUploadCountExpected(0) |
72 , m_maxUploadCountPerUpdate(0) | 72 , m_maxUploadCountPerUpdate(0) |
73 , m_numConsecutiveFlushes(0) | 73 , m_numConsecutiveFlushes(0) |
74 , m_numDanglingUploads(0) | 74 , m_numDanglingUploads(0) |
75 , m_numTotalUploads(0) | 75 , m_numTotalUploads(0) |
76 , m_numTotalFlushes(0) | 76 , m_numTotalFlushes(0) |
77 , m_queryResultsAvailable(0) | 77 , m_queryResultsAvailable(0) |
78 { | 78 { |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 runPendingTask(&thread, controller.get()); | 497 runPendingTask(&thread, controller.get()); |
498 } | 498 } |
499 | 499 |
500 EXPECT_FALSE(thread.hasPendingTask()); | 500 EXPECT_FALSE(thread.hasPendingTask()); |
501 EXPECT_TRUE(client.readyToFinalizeCalled()); | 501 EXPECT_TRUE(client.readyToFinalizeCalled()); |
502 EXPECT_EQ(2, m_numTotalUploads); | 502 EXPECT_EQ(2, m_numTotalUploads); |
503 } | 503 } |
504 | 504 |
505 } // namespace | 505 } // namespace |
506 } // namespace cc | 506 } // namespace cc |
OLD | NEW |