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

Side by Side Diff: chrome/browser/extensions/api/file_handlers/mime_util_unittest.cc

Issue 2314363002: extensions: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Comment addressed Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/extensions/api/file_handlers/mime_util.h" 5 #include "chrome/browser/extensions/api/file_handlers/mime_util.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } // namespace 49 } // namespace
50 50
51 class FileHandlersMimeUtilTest : public testing::Test { 51 class FileHandlersMimeUtilTest : public testing::Test {
52 protected: 52 protected:
53 FileHandlersMimeUtilTest() {} 53 FileHandlersMimeUtilTest() {}
54 ~FileHandlersMimeUtilTest() override {} 54 ~FileHandlersMimeUtilTest() override {}
55 55
56 void SetUp() override { 56 void SetUp() override {
57 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); 57 ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
58 file_system_context_ = 58 file_system_context_ =
59 content::CreateFileSystemContextForTesting(NULL, data_dir_.path()); 59 content::CreateFileSystemContextForTesting(NULL, data_dir_.GetPath());
60 60
61 EXPECT_TRUE(base::CreateTemporaryFile(&html_mime_file_path_)); 61 EXPECT_TRUE(base::CreateTemporaryFile(&html_mime_file_path_));
62 const std::string kSampleContent = "<html><body></body></html>"; 62 const std::string kSampleContent = "<html><body></body></html>";
63 EXPECT_TRUE(base::WriteFile( 63 EXPECT_TRUE(base::WriteFile(
64 html_mime_file_path_, kSampleContent.c_str(), kSampleContent.size())); 64 html_mime_file_path_, kSampleContent.c_str(), kSampleContent.size()));
65 } 65 }
66 66
67 content::TestBrowserThreadBundle thread_bundle_; 67 content::TestBrowserThreadBundle thread_bundle_;
68 TestingProfile profile_; 68 TestingProfile profile_;
69 scoped_refptr<storage::FileSystemContext> file_system_context_; 69 scoped_refptr<storage::FileSystemContext> file_system_context_;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 content::RunAllBlockingPoolTasksUntilIdle(); 140 content::RunAllBlockingPoolTasksUntilIdle();
141 141
142 ASSERT_EQ(3u, result.size()); 142 ASSERT_EQ(3u, result.size());
143 EXPECT_EQ("image/jpeg", result[0]); 143 EXPECT_EQ("image/jpeg", result[0]);
144 EXPECT_EQ("image/jpeg", result[1]); 144 EXPECT_EQ("image/jpeg", result[1]);
145 EXPECT_EQ("text/html", result[2]); 145 EXPECT_EQ("text/html", result[2]);
146 } 146 }
147 147
148 } // namespace app_file_handler_util 148 } // namespace app_file_handler_util
149 } // namespace extensions 149 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698