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

Side by Side Diff: chrome/test/chromedriver/util_unittest.cc

Issue 486843004: Change base/file_utils.h includes to base/files/file_utils.h in chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad merge 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/chromedriver/util.cc ('k') | chrome/test/logging/win/test_log_collector.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <string> 5 #include <string>
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
11 #include "chrome/test/chromedriver/chrome/status.h" 11 #include "chrome/test/chromedriver/chrome/status.h"
12 #include "chrome/test/chromedriver/util.h" 12 #include "chrome/test/chromedriver/util.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 TEST(UnzipSoleFile, Entry) { 15 TEST(UnzipSoleFile, Entry) {
16 base::ScopedTempDir temp_dir; 16 base::ScopedTempDir temp_dir;
17 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 17 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
18 std::string data; 18 std::string data;
19 // A zip entry sent from a Java WebDriver client (v2.20) that contains a 19 // A zip entry sent from a Java WebDriver client (v2.20) that contains a
(...skipping 21 matching lines...) Expand all
41 "wAzGBAAAAAQAAAADAAAAAAAAAAAAAACggQAAAABtb29QSwUGAAAAAAEAAQAxAAAAJQAAAAA" 41 "wAzGBAAAAAQAAAADAAAAAAAAAAAAAACggQAAAABtb29QSwUGAAAAAAEAAQAxAAAAJQAAAAA"
42 "A"; 42 "A";
43 ASSERT_TRUE(base::Base64Decode(kBase64ZipArchive, &data)); 43 ASSERT_TRUE(base::Base64Decode(kBase64ZipArchive, &data));
44 base::FilePath file; 44 base::FilePath file;
45 Status status = UnzipSoleFile(temp_dir.path(), data, &file); 45 Status status = UnzipSoleFile(temp_dir.path(), data, &file);
46 ASSERT_EQ(kOk, status.code()) << status.message(); 46 ASSERT_EQ(kOk, status.code()) << status.message();
47 std::string contents; 47 std::string contents;
48 ASSERT_TRUE(base::ReadFileToString(file, &contents)); 48 ASSERT_TRUE(base::ReadFileToString(file, &contents));
49 ASSERT_STREQ("COW\n", contents.c_str()); 49 ASSERT_STREQ("COW\n", contents.c_str());
50 } 50 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/util.cc ('k') | chrome/test/logging/win/test_log_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698