OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 "content/browser/compositor/test/no_transport_image_transport_factory.h
" | 5 #include "content/browser/compositor/test/no_transport_image_transport_factory.h
" |
6 #include "content/browser/renderer_host/offscreen_canvas_surface_impl.h" | 6 #include "content/browser/renderer_host/offscreen_canvas_surface_impl.h" |
7 #include "content/browser/renderer_host/offscreen_canvas_surface_manager.h" | 7 #include "content/browser/renderer_host/offscreen_canvas_surface_manager.h" |
8 #include "content/public/test/test_browser_thread.h" | 8 #include "content/public/test/test_browser_thread.h" |
9 #include "mojo/public/cpp/bindings/binding.h" | 9 #include "mojo/public/cpp/bindings/binding.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 #if defined(OS_ANDROID) | 12 #if defined(OS_ANDROID) |
| 13 #include "base/memory/ptr_util.h" |
13 #include "content/browser/renderer_host/context_provider_factory_impl_android.h" | 14 #include "content/browser/renderer_host/context_provider_factory_impl_android.h" |
14 #include "content/test/mock_gpu_channel_establish_factory.h" | 15 #include "content/test/mock_gpu_channel_establish_factory.h" |
15 #else | 16 #else |
16 #include "content/browser/compositor/image_transport_factory.h" | 17 #include "content/browser/compositor/image_transport_factory.h" |
17 #endif | 18 #endif |
18 | 19 |
19 namespace content { | 20 namespace content { |
20 | 21 |
21 class OffscreenCanvasSurfaceManagerTest : public testing::Test { | 22 class OffscreenCanvasSurfaceManagerTest : public testing::Test { |
22 public: | 23 public: |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 OffscreenCanvasSurfaceManager::GetInstance()->GetSurfaceInstance( | 110 OffscreenCanvasSurfaceManager::GetInstance()->GetSurfaceInstance( |
110 frame_sink_id_b)); | 111 frame_sink_id_b)); |
111 | 112 |
112 surface_impl_a = nullptr; | 113 surface_impl_a = nullptr; |
113 EXPECT_EQ(1, this->getNumSurfaceImplInstances()); | 114 EXPECT_EQ(1, this->getNumSurfaceImplInstances()); |
114 surface_impl_b = nullptr; | 115 surface_impl_b = nullptr; |
115 EXPECT_EQ(0, this->getNumSurfaceImplInstances()); | 116 EXPECT_EQ(0, this->getNumSurfaceImplInstances()); |
116 } | 117 } |
117 | 118 |
118 } // namespace content | 119 } // namespace content |
OLD | NEW |