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

Unified Diff: cc/resources/texture_mailbox_deleter_unittest.cc

Issue 1144693002: cc: Move files out of cc/resources/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resources: android Created 5 years, 7 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 | « cc/resources/texture_mailbox_deleter.cc ('k') | cc/resources/tile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/texture_mailbox_deleter_unittest.cc
diff --git a/cc/resources/texture_mailbox_deleter_unittest.cc b/cc/resources/texture_mailbox_deleter_unittest.cc
deleted file mode 100644
index 15b425071327a8bee9e9403783ebd0e8628d1d9f..0000000000000000000000000000000000000000
--- a/cc/resources/texture_mailbox_deleter_unittest.cc
+++ /dev/null
@@ -1,48 +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 "cc/resources/texture_mailbox_deleter.h"
-
-#include "base/single_thread_task_runner.h"
-#include "base/thread_task_runner_handle.h"
-#include "cc/resources/single_release_callback.h"
-#include "cc/test/test_context_provider.h"
-#include "cc/test/test_web_graphics_context_3d.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace cc {
-namespace {
-
-TEST(TextureMailboxDeleterTest, Destroy) {
- scoped_ptr<TextureMailboxDeleter> deleter(
- new TextureMailboxDeleter(base::ThreadTaskRunnerHandle::Get()));
-
- scoped_refptr<TestContextProvider> context_provider =
- TestContextProvider::Create();
- context_provider->BindToCurrentThread();
-
- GLuint texture_id = 0u;
- context_provider->ContextGL()->GenTextures(1, &texture_id);
-
- EXPECT_TRUE(context_provider->HasOneRef());
- EXPECT_EQ(1u, context_provider->TestContext3d()->NumTextures());
-
- scoped_ptr<SingleReleaseCallback> cb =
- deleter->GetReleaseCallback(context_provider, texture_id).Pass();
- EXPECT_FALSE(context_provider->HasOneRef());
- EXPECT_EQ(1u, context_provider->TestContext3d()->NumTextures());
-
- // When the deleter is destroyed, it immediately drops its ref on the
- // ContextProvider, and deletes the texture.
- deleter = nullptr;
- EXPECT_TRUE(context_provider->HasOneRef());
- EXPECT_EQ(0u, context_provider->TestContext3d()->NumTextures());
-
- // Run the scoped release callback before destroying it, but it won't do
- // anything.
- cb->Run(0, false);
-}
-
-} // namespace
-} // namespace cc
« no previous file with comments | « cc/resources/texture_mailbox_deleter.cc ('k') | cc/resources/tile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698