| OLD | NEW |
| 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 "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 // These tests need to be browser tests in order to be able to run the OOP | 213 // These tests need to be browser tests in order to be able to run the OOP |
| 214 // import (via ExternalProcessImporterHost) which launches a utility process on | 214 // import (via ExternalProcessImporterHost) which launches a utility process on |
| 215 // supported platforms. | 215 // supported platforms. |
| 216 class FirefoxProfileImporterBrowserTest : public InProcessBrowserTest { | 216 class FirefoxProfileImporterBrowserTest : public InProcessBrowserTest { |
| 217 protected: | 217 protected: |
| 218 virtual void SetUp() OVERRIDE { | 218 virtual void SetUp() OVERRIDE { |
| 219 // Creates a new profile in a new subdirectory in the temp directory. | 219 // Creates a new profile in a new subdirectory in the temp directory. |
| 220 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 220 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 221 base::FilePath test_path = temp_dir_.path().AppendASCII("ImporterTest"); | 221 base::FilePath test_path = temp_dir_.path().AppendASCII("ImporterTest"); |
| 222 base::Delete(test_path, true); | 222 base::DeleteFile(test_path, true); |
| 223 file_util::CreateDirectory(test_path); | 223 file_util::CreateDirectory(test_path); |
| 224 profile_path_ = test_path.AppendASCII("profile"); | 224 profile_path_ = test_path.AppendASCII("profile"); |
| 225 app_path_ = test_path.AppendASCII("app"); | 225 app_path_ = test_path.AppendASCII("app"); |
| 226 file_util::CreateDirectory(app_path_); | 226 file_util::CreateDirectory(app_path_); |
| 227 | 227 |
| 228 // This will launch the browser test and thus needs to happen last. | 228 // This will launch the browser test and thus needs to happen last. |
| 229 InProcessBrowserTest::SetUp(); | 229 InProcessBrowserTest::SetUp(); |
| 230 } | 230 } |
| 231 | 231 |
| 232 void Firefox3xImporterBrowserTest( | 232 void Firefox3xImporterBrowserTest( |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 } | 289 } |
| 290 | 290 |
| 291 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, | 291 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, |
| 292 MAYBE_IMPORTER(Firefox35Importer)) { | 292 MAYBE_IMPORTER(Firefox35Importer)) { |
| 293 bool import_search_engines = false; | 293 bool import_search_engines = false; |
| 294 scoped_refptr<Firefox3Observer> observer( | 294 scoped_refptr<Firefox3Observer> observer( |
| 295 new Firefox3Observer(import_search_engines)); | 295 new Firefox3Observer(import_search_engines)); |
| 296 Firefox3xImporterBrowserTest("firefox35_profile", observer.get(), | 296 Firefox3xImporterBrowserTest("firefox35_profile", observer.get(), |
| 297 observer.get(), import_search_engines); | 297 observer.get(), import_search_engines); |
| 298 } | 298 } |
| OLD | NEW |