| Index: content/browser/gpu/gpu_ipc_browsertests.cc
|
| diff --git a/content/browser/gpu/gpu_ipc_browsertests.cc b/content/browser/gpu/gpu_ipc_browsertests.cc
|
| index 817d73229b481d8fc211a1d5c0a4dce1482b768e..a0b9f407c7ce6b9db188e354b782e82c6307c18b 100644
|
| --- a/content/browser/gpu/gpu_ipc_browsertests.cc
|
| +++ b/content/browser/gpu/gpu_ipc_browsertests.cc
|
| @@ -91,6 +91,12 @@ class BrowserGpuChannelHostFactoryTest : public ContentBrowserTest {
|
| ContentBrowserTest::SetUpOnMainThread();
|
| }
|
|
|
| + void SetUpCommandLine(base::CommandLine* command_line) override {
|
| + // Start all tests without a gpu channel so that the tests exercise a
|
| + // consistent codepath.
|
| + command_line->AppendSwitch(switches::kDisableGpuEarlyInit);
|
| + }
|
| +
|
| void OnContextLost(const base::Closure callback, int* counter) {
|
| (*counter)++;
|
| callback.Run();
|
| @@ -133,16 +139,21 @@ class BrowserGpuChannelHostFactoryTest : public ContentBrowserTest {
|
| }
|
| };
|
|
|
| -// Fails since UI Compositor establishes a GpuChannel.
|
| -IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest, DISABLED_Basic) {
|
| +// These tests are flaky on Windows.
|
| +#if !defined(OS_WIN)
|
| +IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest, Basic) {
|
| DCHECK(!IsChannelEstablished());
|
| EstablishAndWait();
|
| EXPECT_TRUE(GetGpuChannel() != NULL);
|
| }
|
| +#endif
|
|
|
| -// Fails since UI Compositor establishes a GpuChannel.
|
| +// Fails on chromeos since Shell::PlatformInitialize instantiates
|
| +// wm::WMTestHelper leading to the compositor establishing a GPU
|
| +// channel.
|
| +#if !defined(OS_CHROMEOS) && !defined(OS_WIN)
|
| IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
|
| - DISABLED_EstablishAndTerminate) {
|
| + EstablishAndTerminate) {
|
| DCHECK(!IsChannelEstablished());
|
| base::RunLoop run_loop;
|
| GetFactory()->EstablishGpuChannel(kInitCause, run_loop.QuitClosure());
|
| @@ -151,11 +162,11 @@ IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
|
| // The callback should still trigger.
|
| run_loop.Run();
|
| }
|
| +#endif
|
|
|
| -#if !defined(OS_ANDROID)
|
| -// Fails since UI Compositor establishes a GpuChannel.
|
| +#if !defined(OS_ANDROID) && !defined(OS_WIN)
|
| IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
|
| - DISABLED_AlreadyEstablished) {
|
| + AlreadyEstablished) {
|
| DCHECK(!IsChannelEstablished());
|
| scoped_refptr<GpuChannelHost> gpu_channel =
|
| GetFactory()->EstablishGpuChannelSync(kInitCause);
|
| @@ -170,9 +181,9 @@ IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
|
| }
|
| #endif
|
|
|
| -// Fails since UI Compositor establishes a GpuChannel.
|
| +#if !defined(OS_WIN)
|
| IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
|
| - DISABLED_CrashAndRecover) {
|
| + CrashAndRecover) {
|
| DCHECK(!IsChannelEstablished());
|
| EstablishAndWait();
|
| scoped_refptr<GpuChannelHost> host = GetGpuChannel();
|
| @@ -197,5 +208,6 @@ IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
|
| EstablishAndWait();
|
| EXPECT_TRUE(IsChannelEstablished());
|
| }
|
| +#endif
|
|
|
| } // namespace content
|
|
|