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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc

Issue 2318023002: //chrome/browser/chromeos: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Address comment and also remove non-trivial cases 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // File contains browser tests for the fileBrowserHandler api. 5 // File contains browser tests for the fileBrowserHandler api.
6 6
7 #include "chrome/browser/chromeos/extensions/file_manager/file_browser_handler_a pi.h" 7 #include "chrome/browser/chromeos/extensions/file_manager/file_browser_handler_a pi.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 }; 163 };
164 164
165 // Extension api test for the fileBrowserHandler extension API. 165 // Extension api test for the fileBrowserHandler extension API.
166 class FileBrowserHandlerExtensionTest : public ExtensionApiTest { 166 class FileBrowserHandlerExtensionTest : public ExtensionApiTest {
167 protected: 167 protected:
168 void SetUp() override { 168 void SetUp() override {
169 // Create mount point directory that will be used in the test. 169 // Create mount point directory that will be used in the test.
170 // Mount point will be called "tmp", and it will be located in a tmp 170 // Mount point will be called "tmp", and it will be located in a tmp
171 // directory with an unique name. 171 // directory with an unique name.
172 ASSERT_TRUE(scoped_tmp_dir_.CreateUniqueTempDir()); 172 ASSERT_TRUE(scoped_tmp_dir_.CreateUniqueTempDir());
173 tmp_mount_point_ = scoped_tmp_dir_.path().Append("tmp"); 173 tmp_mount_point_ = scoped_tmp_dir_.GetPath().Append("tmp");
174 base::CreateDirectory(tmp_mount_point_); 174 base::CreateDirectory(tmp_mount_point_);
175 175
176 ExtensionApiTest::SetUp(); 176 ExtensionApiTest::SetUp();
177 } 177 }
178 178
179 // Creates new, test mount point. 179 // Creates new, test mount point.
180 void AddTmpMountPoint(const std::string& extension_id) { 180 void AddTmpMountPoint(const std::string& extension_id) {
181 BrowserContext::GetMountPoints(browser()->profile()) 181 BrowserContext::GetMountPoints(browser()->profile())
182 ->RegisterFileSystem("tmp", 182 ->RegisterFileSystem("tmp",
183 storage::kFileSystemTypeNativeLocal, 183 storage::kFileSystemTypeNativeLocal,
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 select_file_function.get(), 373 select_file_function.get(),
374 "[{\"suggestedName\": \"/path_to_file/some_file_name.txt\"}]", 374 "[{\"suggestedName\": \"/path_to_file/some_file_name.txt\"}]",
375 browser()))); 375 browser())));
376 376
377 EXPECT_FALSE(extensions::api_test_utils::GetBoolean(result.get(), "success")); 377 EXPECT_FALSE(extensions::api_test_utils::GetBoolean(result.get(), "success"));
378 base::DictionaryValue* entry_info; 378 base::DictionaryValue* entry_info;
379 EXPECT_FALSE(result->GetDictionary("entry", &entry_info)); 379 EXPECT_FALSE(result->GetDictionary("entry", &entry_info));
380 } 380 }
381 381
382 } // namespace 382 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698