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 "content/browser/gpu/browser_gpu_channel_host_factory.h" | 5 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
6 #include "content/common/gpu/client/context_provider_command_buffer.h" | 6 #include "content/common/gpu/client/context_provider_command_buffer.h" |
7 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 7 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
8 #include "content/test/content_browser_test.h" | 8 #include "content/public/test/content_browser_test.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 namespace { | 12 namespace { |
13 | 13 |
14 class ContextProviderCommandBufferBrowserTest : public ContentBrowserTest { | 14 class ContextProviderCommandBufferBrowserTest : public ContentBrowserTest { |
15 public: | 15 public: |
16 virtual void SetUpOnMainThread() OVERRIDE { | 16 virtual void SetUpOnMainThread() OVERRIDE { |
17 if (!BrowserGpuChannelHostFactory::CanUseForTesting()) | 17 if (!BrowserGpuChannelHostFactory::CanUseForTesting()) |
18 return; | 18 return; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 scoped_refptr<ContextProviderCommandBuffer> provider = | 51 scoped_refptr<ContextProviderCommandBuffer> provider = |
52 ContextProviderCommandBuffer::Create(CreateContext3d(), "TestContext"); | 52 ContextProviderCommandBuffer::Create(CreateContext3d(), "TestContext"); |
53 provider->set_leak_on_destroy(); | 53 provider->set_leak_on_destroy(); |
54 EXPECT_TRUE(provider->BindToCurrentThread()); | 54 EXPECT_TRUE(provider->BindToCurrentThread()); |
55 // This should not crash. | 55 // This should not crash. |
56 provider = NULL; | 56 provider = NULL; |
57 } | 57 } |
58 | 58 |
59 } // namespace | 59 } // namespace |
60 } // namespace content | 60 } // namespace content |
OLD | NEW |