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

Unified Diff: content/common/cc_messages_unittest.cc

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « content/common/cc_messages_perftest.cc ('k') | content/common/discardable_shared_memory_heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/cc_messages_unittest.cc
diff --git a/content/common/cc_messages_unittest.cc b/content/common/cc_messages_unittest.cc
index d7f12cc6c734c19ff2f81d979132c561525a66f3..799c39ff4502cd87834bf1f37bc2864b477c4e64 100644
--- a/content/common/cc_messages_unittest.cc
+++ b/content/common/cc_messages_unittest.cc
@@ -6,8 +6,8 @@
#include <stddef.h>
#include <string.h>
-
#include <algorithm>
+#include <utility>
#include "base/macros.h"
#include "build/build_config.h"
@@ -468,8 +468,8 @@ TEST_F(CCMessagesTest, AllQuads) {
}
DelegatedFrameData frame_in;
- frame_in.render_pass_list.push_back(child_pass_in.Pass());
- frame_in.render_pass_list.push_back(pass_in.Pass());
+ frame_in.render_pass_list.push_back(std::move(child_pass_in));
+ frame_in.render_pass_list.push_back(std::move(pass_in));
IPC::ParamTraits<DelegatedFrameData>::Write(&msg, frame_in);
@@ -479,11 +479,12 @@ TEST_F(CCMessagesTest, AllQuads) {
&iter, &frame_out));
// Make sure the out and cmp RenderPasses match.
- scoped_ptr<RenderPass> child_pass_out = frame_out.render_pass_list[0].Pass();
+ scoped_ptr<RenderPass> child_pass_out =
+ std::move(frame_out.render_pass_list[0]);
Compare(child_pass_cmp.get(), child_pass_out.get());
ASSERT_EQ(0u, child_pass_out->shared_quad_state_list.size());
ASSERT_EQ(0u, child_pass_out->quad_list.size());
- scoped_ptr<RenderPass> pass_out = frame_out.render_pass_list[1].Pass();
+ scoped_ptr<RenderPass> pass_out = std::move(frame_out.render_pass_list[1]);
Compare(pass_cmp.get(), pass_out.get());
ASSERT_EQ(3u, pass_out->shared_quad_state_list.size());
ASSERT_EQ(9u, pass_out->quad_list.size());
@@ -588,7 +589,7 @@ TEST_F(CCMessagesTest, UnusedSharedQuadStates) {
ASSERT_EQ(2u, pass_in->quad_list.size());
DelegatedFrameData frame_in;
- frame_in.render_pass_list.push_back(pass_in.Pass());
+ frame_in.render_pass_list.push_back(std::move(pass_in));
IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
IPC::ParamTraits<DelegatedFrameData>::Write(&msg, frame_in);
@@ -598,7 +599,7 @@ TEST_F(CCMessagesTest, UnusedSharedQuadStates) {
EXPECT_TRUE(
IPC::ParamTraits<DelegatedFrameData>::Read(&msg, &iter, &frame_out));
- scoped_ptr<RenderPass> pass_out = frame_out.render_pass_list[0].Pass();
+ scoped_ptr<RenderPass> pass_out = std::move(frame_out.render_pass_list[0]);
// 2 SharedQuadStates come out. The first and fourth SharedQuadStates were
// used by quads, and so serialized. Others were not.
@@ -656,7 +657,7 @@ TEST_F(CCMessagesTest, Resources) {
DelegatedFrameData frame_in;
frame_in.resource_list.push_back(arbitrary_resource1);
frame_in.resource_list.push_back(arbitrary_resource2);
- frame_in.render_pass_list.push_back(renderpass_in.Pass());
+ frame_in.render_pass_list.push_back(std::move(renderpass_in));
IPC::ParamTraits<DelegatedFrameData>::Write(&msg, frame_in);
« no previous file with comments | « content/common/cc_messages_perftest.cc ('k') | content/common/discardable_shared_memory_heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698