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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/memory/ptr_util.h" | 6 #include "base/memory/ptr_util.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 9 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
10 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 10 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 gpu::ContextSupport* context_support_ = nullptr; | 89 gpu::ContextSupport* context_support_ = nullptr; |
90 | 90 |
91 private: | 91 private: |
92 scoped_refptr<content::ContextProviderCommandBuffer> provider_; | 92 scoped_refptr<content::ContextProviderCommandBuffer> provider_; |
93 }; | 93 }; |
94 | 94 |
95 } // namespace | 95 } // namespace |
96 | 96 |
97 // Include the shared tests. | 97 // Include the shared tests. |
98 #define CONTEXT_TEST_F IN_PROC_BROWSER_TEST_F | 98 #define CONTEXT_TEST_F IN_PROC_BROWSER_TEST_F |
99 #include "content/common/gpu/client/gpu_context_tests.h" | 99 #include "gpu/ipc/client/gpu_context_tests.h" |
100 | 100 |
101 namespace content { | 101 namespace content { |
102 | 102 |
103 class BrowserGpuChannelHostFactoryTest : public ContentBrowserTest { | 103 class BrowserGpuChannelHostFactoryTest : public ContentBrowserTest { |
104 public: | 104 public: |
105 void SetUpOnMainThread() override { | 105 void SetUpOnMainThread() override { |
106 if (!BrowserGpuChannelHostFactory::CanUseForTesting()) | 106 if (!BrowserGpuChannelHostFactory::CanUseForTesting()) |
107 return; | 107 return; |
108 | 108 |
109 // Start all tests without a gpu channel so that the tests exercise a | 109 // Start all tests without a gpu channel so that the tests exercise a |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 shim->SimulateCrash(); | 290 shim->SimulateCrash(); |
291 run_loop.Run(); | 291 run_loop.Run(); |
292 | 292 |
293 EXPECT_EQ(1, counter); | 293 EXPECT_EQ(1, counter); |
294 EXPECT_FALSE(IsChannelEstablished()); | 294 EXPECT_FALSE(IsChannelEstablished()); |
295 EstablishAndWait(); | 295 EstablishAndWait(); |
296 EXPECT_TRUE(IsChannelEstablished()); | 296 EXPECT_TRUE(IsChannelEstablished()); |
297 } | 297 } |
298 | 298 |
299 } // namespace content | 299 } // namespace content |
OLD | NEW |