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

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

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
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/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // encoded following RFC 1521. 107 // encoded following RFC 1521.
108 const char* kBase64ZipEntry = 108 const char* kBase64ZipEntry =
109 "UEsDBBQAAAAAAMROi0K/wAzGBAAAAAQAAAADAAAAbW9vQ09XClBLAQIUAxQAAAAAAMROi0K/" 109 "UEsDBBQAAAAAAMROi0K/wAzGBAAAAAQAAAADAAAAbW9vQ09XClBLAQIUAxQAAAAAAMROi0K/"
110 "wAzG\nBAAAAAQAAAADAAAAAAAAAAAAAACggQAAAABtb29QSwUGAAAAAAEAAQAxAAAAJQAAAA" 110 "wAzG\nBAAAAAQAAAADAAAAAAAAAAAAAACggQAAAABtb29QSwUGAAAAAAEAAQAxAAAAJQAAAA"
111 "AA\n"; 111 "AA\n";
112 params.SetString("file", kBase64ZipEntry); 112 params.SetString("file", kBase64ZipEntry);
113 Status status = ExecuteUploadFile(&session, params, &value); 113 Status status = ExecuteUploadFile(&session, params, &value);
114 ASSERT_EQ(kOk, status.code()) << status.message(); 114 ASSERT_EQ(kOk, status.code()) << status.message();
115 base::FilePath::StringType path; 115 base::FilePath::StringType path;
116 ASSERT_TRUE(value->GetAsString(&path)); 116 ASSERT_TRUE(value->GetAsString(&path));
117 ASSERT_TRUE(file_util::PathExists(base::FilePath(path))); 117 ASSERT_TRUE(base::PathExists(base::FilePath(path)));
118 std::string data; 118 std::string data;
119 ASSERT_TRUE(file_util::ReadFileToString(base::FilePath(path), &data)); 119 ASSERT_TRUE(file_util::ReadFileToString(base::FilePath(path), &data));
120 ASSERT_STREQ("COW\n", data.c_str()); 120 ASSERT_STREQ("COW\n", data.c_str());
121 } 121 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome_launcher_unittest.cc ('k') | chrome/test/gpu/gpu_feature_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698