| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 } // namespace | 261 } // namespace |
| 262 | 262 |
| 263 // These tests need to be browser tests in order to be able to run the OOP | 263 // These tests need to be browser tests in order to be able to run the OOP |
| 264 // import (via ExternalProcessImporterHost) which launches a utility process on | 264 // import (via ExternalProcessImporterHost) which launches a utility process on |
| 265 // supported platforms. | 265 // supported platforms. |
| 266 class FirefoxProfileImporterBrowserTest : public InProcessBrowserTest { | 266 class FirefoxProfileImporterBrowserTest : public InProcessBrowserTest { |
| 267 protected: | 267 protected: |
| 268 void SetUp() override { | 268 void SetUp() override { |
| 269 // Creates a new profile in a new subdirectory in the temp directory. | 269 // Creates a new profile in a new subdirectory in the temp directory. |
| 270 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 270 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 271 base::FilePath test_path = temp_dir_.path().AppendASCII("ImporterTest"); | 271 base::FilePath test_path = temp_dir_.GetPath().AppendASCII("ImporterTest"); |
| 272 base::DeleteFile(test_path, true); | 272 base::DeleteFile(test_path, true); |
| 273 base::CreateDirectory(test_path); | 273 base::CreateDirectory(test_path); |
| 274 profile_path_ = test_path.AppendASCII("profile"); | 274 profile_path_ = test_path.AppendASCII("profile"); |
| 275 app_path_ = test_path.AppendASCII("app"); | 275 app_path_ = test_path.AppendASCII("app"); |
| 276 base::CreateDirectory(app_path_); | 276 base::CreateDirectory(app_path_); |
| 277 | 277 |
| 278 // This will launch the browser test and thus needs to happen last. | 278 // This will launch the browser test and thus needs to happen last. |
| 279 InProcessBrowserTest::SetUp(); | 279 InProcessBrowserTest::SetUp(); |
| 280 } | 280 } |
| 281 | 281 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 scoped_refptr<FirefoxObserver> observer(new FirefoxObserver(true)); | 354 scoped_refptr<FirefoxObserver> observer(new FirefoxObserver(true)); |
| 355 FirefoxImporterBrowserTest("firefox_profile", observer.get(), observer.get()); | 355 FirefoxImporterBrowserTest("firefox_profile", observer.get(), observer.get()); |
| 356 } | 356 } |
| 357 | 357 |
| 358 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, | 358 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, |
| 359 MAYBE_IMPORTER(Firefox320Importer)) { | 359 MAYBE_IMPORTER(Firefox320Importer)) { |
| 360 scoped_refptr<FirefoxObserver> observer(new FirefoxObserver(true)); | 360 scoped_refptr<FirefoxObserver> observer(new FirefoxObserver(true)); |
| 361 FirefoxImporterBrowserTest("firefox320_profile", observer.get(), | 361 FirefoxImporterBrowserTest("firefox320_profile", observer.get(), |
| 362 observer.get()); | 362 observer.get()); |
| 363 } | 363 } |
| OLD | NEW |