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

Side by Side Diff: chrome/browser/extensions/api/file_system/file_system_api_unittest.cc

Issue 2934143002: Move chrome.fileSystem implementation to //extensions (Closed)
Patch Set: rebase Created 3 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
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 #include "chrome/browser/extensions/api/file_system/file_system_api.h" 5 #include "extensions/browser/api/file_system/file_system_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/strings/string_split.h" 12 #include "base/strings/string_split.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 #include "ui/shell_dialogs/select_file_dialog.h" 17 #include "ui/shell_dialogs/select_file_dialog.h"
18 18
19 // Tests static helper methods of chrome.fileSystem API functions.
20
19 using extensions::FileSystemChooseEntryFunction; 21 using extensions::FileSystemChooseEntryFunction;
20 using extensions::api::file_system::AcceptOption; 22 using extensions::api::file_system::AcceptOption;
21 23
22 namespace extensions { 24 namespace extensions {
23 namespace { 25 namespace {
24 26
25 void CheckExtensions(const std::vector<base::FilePath::StringType>& expected, 27 void CheckExtensions(const std::vector<base::FilePath::StringType>& expected,
26 const std::vector<base::FilePath::StringType>& actual) { 28 const std::vector<base::FilePath::StringType>& actual) {
27 EXPECT_EQ(expected.size(), actual.size()); 29 EXPECT_EQ(expected.size(), actual.size());
28 if (expected.size() != actual.size()) 30 if (expected.size() != actual.size())
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 opt_name = std::string("/"); 183 opt_name = std::string("/");
182 FileSystemChooseEntryFunction::BuildSuggestion(&opt_name, &suggested_name, 184 FileSystemChooseEntryFunction::BuildSuggestion(&opt_name, &suggested_name,
183 &suggested_extension); 185 &suggested_extension);
184 EXPECT_FALSE(suggested_name.IsAbsolute()); 186 EXPECT_FALSE(suggested_name.IsAbsolute());
185 EXPECT_TRUE(suggested_name.MaybeAsASCII().empty()); 187 EXPECT_TRUE(suggested_name.MaybeAsASCII().empty());
186 EXPECT_TRUE(suggested_extension.empty()); 188 EXPECT_TRUE(suggested_extension.empty());
187 #endif 189 #endif
188 } 190 }
189 191
190 } // namespace extensions 192 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698