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/resources/resource_update_controller.h" | 5 #include "cc/resources/resource_update_controller.h" |
6 | 6 |
7 #include "cc/resources/prioritized_resource_manager.h" | 7 #include "cc/resources/prioritized_resource_manager.h" |
8 #include "cc/test/fake_output_surface.h" | 8 #include "cc/test/fake_output_surface.h" |
9 #include "cc/test/fake_proxy.h" | 9 #include "cc/test/fake_proxy.h" |
10 #include "cc/test/scheduler_test_common.h" | 10 #include "cc/test/scheduler_test_common.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 WGC3Duint* value); | 62 WGC3Duint* value); |
63 | 63 |
64 private: | 64 private: |
65 ResourceUpdateControllerTest* test_; | 65 ResourceUpdateControllerTest* test_; |
66 bool support_shallow_flush_; | 66 bool support_shallow_flush_; |
67 }; | 67 }; |
68 | 68 |
69 class ResourceUpdateControllerTest : public Test { | 69 class ResourceUpdateControllerTest : public Test { |
70 public: | 70 public: |
71 ResourceUpdateControllerTest() | 71 ResourceUpdateControllerTest() |
72 : proxy_(scoped_ptr<Thread>(NULL)), | 72 : proxy_(scoped_ptr<Thread>()), |
73 queue_(make_scoped_ptr(new ResourceUpdateQueue)), | 73 queue_(make_scoped_ptr(new ResourceUpdateQueue)), |
74 resource_manager_(PrioritizedResourceManager::Create(&proxy_)), | 74 resource_manager_(PrioritizedResourceManager::Create(&proxy_)), |
75 query_results_available_(0), | 75 query_results_available_(0), |
76 full_upload_count_expected_(0), | 76 full_upload_count_expected_(0), |
77 partial_count_expected_(0), | 77 partial_count_expected_(0), |
78 total_upload_count_expected_(0), | 78 total_upload_count_expected_(0), |
79 max_upload_count_per_update_(0), | 79 max_upload_count_per_update_(0), |
80 num_consecutive_flushes_(0), | 80 num_consecutive_flushes_(0), |
81 num_dangling_uploads_(0), | 81 num_dangling_uploads_(0), |
82 num_total_uploads_(0), | 82 num_total_uploads_(0), |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 RunPendingTask(&thread, controller.get()); | 498 RunPendingTask(&thread, controller.get()); |
499 } | 499 } |
500 | 500 |
501 EXPECT_FALSE(thread.HasPendingTask()); | 501 EXPECT_FALSE(thread.HasPendingTask()); |
502 EXPECT_TRUE(client.ReadyToFinalizeCalled()); | 502 EXPECT_TRUE(client.ReadyToFinalizeCalled()); |
503 EXPECT_EQ(2, num_total_uploads_); | 503 EXPECT_EQ(2, num_total_uploads_); |
504 } | 504 } |
505 | 505 |
506 } // namespace | 506 } // namespace |
507 } // namespace cc | 507 } // namespace cc |
OLD | NEW |