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

Side by Side Diff: tools/gn/function_write_file_unittest.cc

Issue 560883003: Cleanup: Use base/files/file_util.h instead of base/file_util.h in [r-t]*/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « tools/gn/function_write_file.cc ('k') | tools/gn/generate_test_gn_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_util.h"
6 #include "base/files/file.h" 5 #include "base/files/file.h"
6 #include "base/files/file_util.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "tools/gn/functions.h" 9 #include "tools/gn/functions.h"
10 #include "tools/gn/test_with_scope.h" 10 #include "tools/gn/test_with_scope.h"
11 11
12 namespace { 12 namespace {
13 13
14 // Returns true on success, false if write_file signaled an error. 14 // Returns true on success, false if write_file signaled an error.
15 bool CallWriteFile(Scope* scope, 15 bool CallWriteFile(Scope* scope,
16 const std::string& filename, 16 const std::string& filename,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 base::File::Info original_info; 77 base::File::Info original_info;
78 foo_file.GetInfo(&original_info); 78 foo_file.GetInfo(&original_info);
79 79
80 EXPECT_TRUE(CallWriteFile(setup.scope(), "//out/foo.txt", some_list)); 80 EXPECT_TRUE(CallWriteFile(setup.scope(), "//out/foo.txt", some_list));
81 81
82 // Verify that the last modified time is the same as before. 82 // Verify that the last modified time is the same as before.
83 base::File::Info new_info; 83 base::File::Info new_info;
84 foo_file.GetInfo(&new_info); 84 foo_file.GetInfo(&new_info);
85 EXPECT_EQ(original_info.last_modified, new_info.last_modified); 85 EXPECT_EQ(original_info.last_modified, new_info.last_modified);
86 } 86 }
OLDNEW
« no previous file with comments | « tools/gn/function_write_file.cc ('k') | tools/gn/generate_test_gn_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698