Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1206)

Unified Diff: content/common/gpu/client/context_provider_command_buffer_browsertest.cc

Issue 251343002: Remove offscreen compositor contexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-offscreencontext: include Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/client/context_provider_command_buffer.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/client/context_provider_command_buffer_browsertest.cc
diff --git a/content/common/gpu/client/context_provider_command_buffer_browsertest.cc b/content/common/gpu/client/context_provider_command_buffer_browsertest.cc
deleted file mode 100644
index 7588571fd6518d8896f88da87836c7fce4e5b058..0000000000000000000000000000000000000000
--- a/content/common/gpu/client/context_provider_command_buffer_browsertest.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
-#include "content/common/gpu/client/context_provider_command_buffer.h"
-#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
-#include "content/public/test/content_browser_test.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace content {
-namespace {
-
-class ContextProviderCommandBufferBrowserTest : public ContentBrowserTest {
- public:
- virtual void SetUpOnMainThread() OVERRIDE {
- if (!BrowserGpuChannelHostFactory::CanUseForTesting())
- return;
-
- if (!GetFactory())
- BrowserGpuChannelHostFactory::Initialize(true);
-
- CHECK(GetFactory());
- ContentBrowserTest::SetUpOnMainThread();
- }
-
- protected:
- BrowserGpuChannelHostFactory* GetFactory() {
- return BrowserGpuChannelHostFactory::instance();
- }
-
- scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateContext3d() {
- bool lose_context_when_out_of_memory = false;
- scoped_refptr<GpuChannelHost> gpu_channel_host(
- GetFactory()->EstablishGpuChannelSync(
- CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE));
- scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
- WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
- gpu_channel_host.get(),
- blink::WebGraphicsContext3D::Attributes(),
- lose_context_when_out_of_memory,
- GURL("chrome://gpu/ContextProviderCommandBufferTest"),
- WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(),
- NULL));
- return context.Pass();
- }
-};
-
-IN_PROC_BROWSER_TEST_F(ContextProviderCommandBufferBrowserTest, LeakOnDestroy) {
- if (!BrowserGpuChannelHostFactory::CanUseForTesting())
- return;
-
- scoped_refptr<ContextProviderCommandBuffer> provider =
- ContextProviderCommandBuffer::Create(CreateContext3d(), "TestContext");
- provider->set_leak_on_destroy();
- EXPECT_TRUE(provider->BindToCurrentThread());
- // This should not crash.
- provider = NULL;
-}
-
-} // namespace
-} // namespace content
« no previous file with comments | « content/common/gpu/client/context_provider_command_buffer.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698