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

Unified Diff: ui/base/resource/data_pack_unittest.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (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 | « ui/base/resource/data_pack.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/data_pack_unittest.cc
diff --git a/ui/base/resource/data_pack_unittest.cc b/ui/base/resource/data_pack_unittest.cc
index b0932fcef8edd6d5e5bead7ce13d92dcf86b89aa..966bf13b5ceb6f72502d1977af6fe9d792009795 100644
--- a/ui/base/resource/data_pack_unittest.cc
+++ b/ui/base/resource/data_pack_unittest.cc
@@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "ui/base/resource/data_pack.h"
+
+#include <utility>
+
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -9,7 +13,6 @@
#include "base/path_service.h"
#include "base/strings/string_piece.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/base/resource/data_pack.h"
#include "ui/base/ui_base_paths.h"
namespace ui {
@@ -71,7 +74,7 @@ TEST(DataPackTest, LoadFromFile) {
// Load the file through the data pack API.
DataPack pack(SCALE_FACTOR_100P);
- ASSERT_TRUE(pack.LoadFromFile(file.Pass()));
+ ASSERT_TRUE(pack.LoadFromFile(std::move(file)));
base::StringPiece data;
ASSERT_TRUE(pack.HasResource(4));
@@ -111,7 +114,7 @@ TEST(DataPackTest, LoadFromFileRegion) {
// Load the file through the data pack API.
DataPack pack(SCALE_FACTOR_100P);
base::MemoryMappedFile::Region region = {sizeof(kPadding), kSamplePakSize};
- ASSERT_TRUE(pack.LoadFromFileRegion(file.Pass(), region));
+ ASSERT_TRUE(pack.LoadFromFileRegion(std::move(file), region));
base::StringPiece data;
ASSERT_TRUE(pack.HasResource(4));
@@ -200,7 +203,7 @@ TEST(DataPackTest, ModifiedWhileUsed) {
// Load the file through the data pack API.
DataPack pack(SCALE_FACTOR_100P);
- ASSERT_TRUE(pack.LoadFromFile(file.Pass()));
+ ASSERT_TRUE(pack.LoadFromFile(std::move(file)));
base::StringPiece data;
ASSERT_TRUE(pack.HasResource(10));
« no previous file with comments | « ui/base/resource/data_pack.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698