| OLD | NEW |
| 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 <list> | 5 #include <list> |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 ASSERT_TRUE(StartEmbeddedTestServer()); | 409 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 410 ASSERT_TRUE(RunExtensionTest("webnavigation/serverRedirect")) | 410 ASSERT_TRUE(RunExtensionTest("webnavigation/serverRedirect")) |
| 411 << message_; | 411 << message_; |
| 412 } | 412 } |
| 413 | 413 |
| 414 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, Download) { | 414 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, Download) { |
| 415 base::ScopedTempDir download_directory; | 415 base::ScopedTempDir download_directory; |
| 416 ASSERT_TRUE(download_directory.CreateUniqueTempDir()); | 416 ASSERT_TRUE(download_directory.CreateUniqueTempDir()); |
| 417 DownloadPrefs* download_prefs = | 417 DownloadPrefs* download_prefs = |
| 418 DownloadPrefs::FromBrowserContext(browser()->profile()); | 418 DownloadPrefs::FromBrowserContext(browser()->profile()); |
| 419 download_prefs->SetDownloadPath(download_directory.path()); | 419 download_prefs->SetDownloadPath(download_directory.GetPath()); |
| 420 | 420 |
| 421 DownloadTestObserverNotInProgress download_observer( | 421 DownloadTestObserverNotInProgress download_observer( |
| 422 content::BrowserContext::GetDownloadManager(profile()), 1); | 422 content::BrowserContext::GetDownloadManager(profile()), 1); |
| 423 download_observer.StartObserving(); | 423 download_observer.StartObserving(); |
| 424 ASSERT_TRUE(StartEmbeddedTestServer()); | 424 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 425 ASSERT_TRUE(RunExtensionTest("webnavigation/download")) | 425 ASSERT_TRUE(RunExtensionTest("webnavigation/download")) |
| 426 << message_; | 426 << message_; |
| 427 download_observer.WaitForFinished(); | 427 download_observer.WaitForFinished(); |
| 428 } | 428 } |
| 429 | 429 |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 "extensions/api_test/webnavigation/crash/b.html", | 790 "extensions/api_test/webnavigation/crash/b.html", |
| 791 embedded_test_server()->port())); | 791 embedded_test_server()->port())); |
| 792 ui_test_utils::NavigateToURL(browser(), url); | 792 ui_test_utils::NavigateToURL(browser(), url); |
| 793 | 793 |
| 794 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 794 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 795 } | 795 } |
| 796 | 796 |
| 797 #endif | 797 #endif |
| 798 | 798 |
| 799 } // namespace extensions | 799 } // namespace extensions |
| OLD | NEW |