OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/output/texture_mailbox_deleter.h" | 5 #include "cc/output/texture_mailbox_deleter.h" |
6 | 6 |
7 #include "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" |
8 #include "base/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
9 #include "cc/resources/single_release_callback.h" | 9 #include "cc/resources/single_release_callback.h" |
10 #include "cc/test/test_context_provider.h" | 10 #include "cc/test/test_context_provider.h" |
11 #include "cc/test/test_web_graphics_context_3d.h" | 11 #include "cc/test/test_web_graphics_context_3d.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 namespace { | 15 namespace { |
16 | 16 |
17 TEST(TextureMailboxDeleterTest, Destroy) { | 17 TEST(TextureMailboxDeleterTest, Destroy) { |
18 std::unique_ptr<TextureMailboxDeleter> deleter( | 18 std::unique_ptr<TextureMailboxDeleter> deleter( |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 cb->Run(gpu::SyncToken(), false); | 66 cb->Run(gpu::SyncToken(), false); |
67 | 67 |
68 // With no task runner the callback will immediately drops its ref on the | 68 // With no task runner the callback will immediately drops its ref on the |
69 // ContextProvider and delete the texture. | 69 // ContextProvider and delete the texture. |
70 EXPECT_TRUE(context_provider->HasOneRef()); | 70 EXPECT_TRUE(context_provider->HasOneRef()); |
71 EXPECT_EQ(0u, context_provider->TestContext3d()->NumTextures()); | 71 EXPECT_EQ(0u, context_provider->TestContext3d()->NumTextures()); |
72 } | 72 } |
73 | 73 |
74 } // namespace | 74 } // namespace |
75 } // namespace cc | 75 } // namespace cc |
OLD | NEW |