| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/download/download_service.h" | 10 #include "chrome/browser/download/download_service.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "content/public/browser/download_item.h" | 26 #include "content/public/browser/download_item.h" |
| 27 #include "content/public/common/page_transition_types.h" | 27 #include "content/public/common/page_transition_types.h" |
| 28 #include "content/public/test/browser_test_utils.h" | 28 #include "content/public/test/browser_test_utils.h" |
| 29 #include "content/public/test/download_test_observer.h" | 29 #include "content/public/test/download_test_observer.h" |
| 30 #include "content/test/net/url_request_slow_download_job.h" | 30 #include "content/test/net/url_request_slow_download_job.h" |
| 31 | 31 |
| 32 using content::BrowserContext; | 32 using content::BrowserContext; |
| 33 using content::BrowserThread; | 33 using content::BrowserThread; |
| 34 using content::DownloadItem; | 34 using content::DownloadItem; |
| 35 using content::DownloadManager; | 35 using content::DownloadManager; |
| 36 using content::URLRequestSlowDownloadJob; |
| 36 | 37 |
| 37 class BrowserCloseTest : public InProcessBrowserTest { | 38 class BrowserCloseTest : public InProcessBrowserTest { |
| 38 public: | 39 public: |
| 39 // Structure defining test cases for DownloadsCloseCheck. | 40 // Structure defining test cases for DownloadsCloseCheck. |
| 40 struct DownloadsCloseCheckCase { | 41 struct DownloadsCloseCheckCase { |
| 41 std::string DebugString() const; | 42 std::string DebugString() const; |
| 42 | 43 |
| 43 // Input | 44 // Input |
| 44 struct { | 45 struct { |
| 45 struct { | 46 struct { |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 } | 576 } |
| 576 } | 577 } |
| 577 | 578 |
| 578 IN_PROC_BROWSER_TEST_F(BrowserCloseTest, MAYBE_DownloadsCloseCheck_5) { | 579 IN_PROC_BROWSER_TEST_F(BrowserCloseTest, MAYBE_DownloadsCloseCheck_5) { |
| 579 ASSERT_TRUE(SetupForDownloadCloseCheck()); | 580 ASSERT_TRUE(SetupForDownloadCloseCheck()); |
| 580 for (size_t i = 5 * arraysize(download_close_check_cases) / 6; | 581 for (size_t i = 5 * arraysize(download_close_check_cases) / 6; |
| 581 i < 6 * arraysize(download_close_check_cases) / 6; ++i) { | 582 i < 6 * arraysize(download_close_check_cases) / 6; ++i) { |
| 582 ExecuteDownloadCloseCheckCase(i); | 583 ExecuteDownloadCloseCheckCase(i); |
| 583 } | 584 } |
| 584 } | 585 } |
| OLD | NEW |