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

Side by Side Diff: chrome/browser/importer/safari_importer_unittest.mm

Issue 11359217: Move scoped_temp_dir from base to base/files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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) 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/importer/safari_importer.h" 5 #include "chrome/browser/importer/safari_importer.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/scoped_temp_dir.h"
10 #include "base/path_service.h" 11 #include "base/path_service.h"
11 #include "base/scoped_temp_dir.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/sys_string_conversions.h" 14 #include "base/sys_string_conversions.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "chrome/browser/history/history_types.h" 16 #include "chrome/browser/history/history_types.h"
17 #include "chrome/browser/importer/importer_bridge.h" 17 #include "chrome/browser/importer/importer_bridge.h"
18 #include "chrome/common/chrome_paths.h" 18 #include "chrome/common/chrome_paths.h"
19 #include "sql/connection.h" 19 #include "sql/connection.h"
20 #include "testing/platform_test.h" 20 #include "testing/platform_test.h"
21 21
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 TEST_F(SafariImporterTest, CanImport) { 186 TEST_F(SafariImporterTest, CanImport) {
187 uint16 items = importer::NONE; 187 uint16 items = importer::NONE;
188 EXPECT_TRUE(SafariImporter::CanImport(GetTestSafariLibraryPath(), &items)); 188 EXPECT_TRUE(SafariImporter::CanImport(GetTestSafariLibraryPath(), &items));
189 EXPECT_EQ(items, importer::HISTORY | importer::FAVORITES); 189 EXPECT_EQ(items, importer::HISTORY | importer::FAVORITES);
190 EXPECT_EQ(items & importer::COOKIES, importer::NONE); 190 EXPECT_EQ(items & importer::COOKIES, importer::NONE);
191 EXPECT_EQ(items & importer::PASSWORDS, importer::NONE); 191 EXPECT_EQ(items & importer::PASSWORDS, importer::NONE);
192 EXPECT_EQ(items & importer::SEARCH_ENGINES, importer::NONE); 192 EXPECT_EQ(items & importer::SEARCH_ENGINES, importer::NONE);
193 EXPECT_EQ(items & importer::HOME_PAGE, importer::NONE); 193 EXPECT_EQ(items & importer::HOME_PAGE, importer::NONE);
194 194
195 // Check that we don't import anything from a bogus library directory. 195 // Check that we don't import anything from a bogus library directory.
196 ScopedTempDir fake_library_dir; 196 base::ScopedTempDir fake_library_dir;
197 ASSERT_TRUE(fake_library_dir.CreateUniqueTempDir()); 197 ASSERT_TRUE(fake_library_dir.CreateUniqueTempDir());
198 EXPECT_FALSE(SafariImporter::CanImport(fake_library_dir.path(), &items)); 198 EXPECT_FALSE(SafariImporter::CanImport(fake_library_dir.path(), &items));
199 } 199 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/importer_unittest_utils.h ('k') | chrome/browser/intents/web_intents_registry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698