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

Unified Diff: cc/output/managed_memory_policy_unittest.cc

Issue 2493853002: cc/blimp: Proto Cleanup. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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/output/managed_memory_policy.cc ('k') | cc/output/renderer_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/managed_memory_policy_unittest.cc
diff --git a/cc/output/managed_memory_policy_unittest.cc b/cc/output/managed_memory_policy_unittest.cc
deleted file mode 100644
index de2ecfd52e6fde272cc71cfa381624f28ff6d2ac..0000000000000000000000000000000000000000
--- a/cc/output/managed_memory_policy_unittest.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2015 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/output/managed_memory_policy.h"
-
-#include <stddef.h>
-
-#include "cc/proto/managed_memory_policy.pb.h"
-#include "cc/proto/memory_allocation.pb.h"
-#include "gpu/command_buffer/common/gpu_memory_allocation.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace cc {
-namespace {
-
-void VerifySerializeAndDeserialize(
- size_t bytes_limit_when_visible,
- gpu::MemoryAllocation::PriorityCutoff priority_cutoff_when_visible,
- size_t num_resources_limit) {
- ManagedMemoryPolicy policy1(bytes_limit_when_visible,
- gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY,
- num_resources_limit);
- proto::ManagedMemoryPolicy proto;
- policy1.ToProtobuf(&proto);
- ManagedMemoryPolicy policy2(1);
- policy2.FromProtobuf(proto);
- EXPECT_EQ(policy1, policy2);
-}
-
-TEST(ManagedMemoryPolicyTest, SerializeDeserialize) {
- VerifySerializeAndDeserialize(
- 42, gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY, 24);
- VerifySerializeAndDeserialize(0, gpu::MemoryAllocation::CUTOFF_ALLOW_NOTHING,
- 1);
- VerifySerializeAndDeserialize(
- 1, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, 0);
- VerifySerializeAndDeserialize(
- 1024, gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING, 4096);
-}
-
-} // namespace
-} // namespace cc
« no previous file with comments | « cc/output/managed_memory_policy.cc ('k') | cc/output/renderer_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698