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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 #include "content/public/common/page_transition_types.h" | 79 #include "content/public/common/page_transition_types.h" |
80 #include "content/public/test/browser_test_utils.h" | 80 #include "content/public/test/browser_test_utils.h" |
81 #include "content/public/test/download_test_observer.h" | 81 #include "content/public/test/download_test_observer.h" |
82 #include "content/public/test/test_file_error_injector.h" | 82 #include "content/public/test/test_file_error_injector.h" |
83 #include "content/public/test/test_navigation_observer.h" | 83 #include "content/public/test/test_navigation_observer.h" |
84 #include "content/test/net/url_request_mock_http_job.h" | 84 #include "content/test/net/url_request_mock_http_job.h" |
85 #include "content/test/net/url_request_slow_download_job.h" | 85 #include "content/test/net/url_request_slow_download_job.h" |
86 #include "extensions/browser/extension_system.h" | 86 #include "extensions/browser/extension_system.h" |
87 #include "extensions/common/feature_switch.h" | 87 #include "extensions/common/feature_switch.h" |
88 #include "grit/generated_resources.h" | 88 #include "grit/generated_resources.h" |
89 #include "net/base/net_util.h" | 89 #include "net/base/filename_util.h" |
90 #include "net/test/spawned_test_server/spawned_test_server.h" | 90 #include "net/test/spawned_test_server/spawned_test_server.h" |
91 #include "testing/gtest/include/gtest/gtest.h" | 91 #include "testing/gtest/include/gtest/gtest.h" |
92 #include "ui/base/l10n/l10n_util.h" | 92 #include "ui/base/l10n/l10n_util.h" |
93 | 93 |
94 using content::BrowserContext; | 94 using content::BrowserContext; |
95 using content::BrowserThread; | 95 using content::BrowserThread; |
96 using content::DownloadItem; | 96 using content::DownloadItem; |
97 using content::DownloadManager; | 97 using content::DownloadManager; |
98 using content::DownloadUrlParameters; | 98 using content::DownloadUrlParameters; |
99 using content::URLRequestMockHTTPJob; | 99 using content::URLRequestMockHTTPJob; |
(...skipping 3107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3207 | 3207 |
3208 // No errors this time. The download should complete successfully. | 3208 // No errors this time. The download should complete successfully. |
3209 EXPECT_FALSE(completion_observer->IsFinished()); | 3209 EXPECT_FALSE(completion_observer->IsFinished()); |
3210 completion_observer->StartObserving(); | 3210 completion_observer->StartObserving(); |
3211 download->Resume(); | 3211 download->Resume(); |
3212 completion_observer->WaitForFinished(); | 3212 completion_observer->WaitForFinished(); |
3213 EXPECT_EQ(DownloadItem::COMPLETE, download->GetState()); | 3213 EXPECT_EQ(DownloadItem::COMPLETE, download->GetState()); |
3214 | 3214 |
3215 EXPECT_FALSE(DidShowFileChooser()); | 3215 EXPECT_FALSE(DidShowFileChooser()); |
3216 } | 3216 } |
OLD | NEW |