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

Unified Diff: cc/proto/gpu_conversions_unittest.cc

Issue 1490513005: Add support for ManagedMemoryPolicy (de)serialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@renderer-settings
Patch Set: Rebase on top of origin/master Created 5 years 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/proto/gpu_conversions.cc ('k') | cc/proto/managed_memory_policy.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/proto/gpu_conversions_unittest.cc
diff --git a/cc/proto/gpu_conversions_unittest.cc b/cc/proto/gpu_conversions_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f845f8101f83154eff6d65fb4a7b403993263c48
--- /dev/null
+++ b/cc/proto/gpu_conversions_unittest.cc
@@ -0,0 +1,27 @@
+// 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/proto/gpu_conversions.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 {
+
+TEST(GpuProtoConversionTest,
+ SerializeDeserializeMemoryAllocationPriorityCutoff) {
+ for (size_t i = 0; i < gpu::MemoryAllocation::PriorityCutoff::CUTOFF_LAST;
+ ++i) {
+ gpu::MemoryAllocation::PriorityCutoff priority_cutoff =
+ static_cast<gpu::MemoryAllocation::PriorityCutoff>(i);
+ EXPECT_EQ(priority_cutoff,
+ MemoryAllocationPriorityCutoffFromProto(
+ MemoryAllocationPriorityCutoffToProto(priority_cutoff)));
+ }
+}
+
+} // namespace
+} // namespace cc
« no previous file with comments | « cc/proto/gpu_conversions.cc ('k') | cc/proto/managed_memory_policy.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698