OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "chrome/test/base/ui_test_utils.h" | 24 #include "chrome/test/base/ui_test_utils.h" |
25 #include "content/browser/download/download_item.h" | 25 #include "content/browser/download/download_item.h" |
26 #include "content/browser/download/download_manager.h" | 26 #include "content/browser/download/download_manager.h" |
27 #include "content/browser/download/download_persistent_store_info.h" | 27 #include "content/browser/download/download_persistent_store_info.h" |
28 #include "content/browser/net/url_request_mock_http_job.h" | 28 #include "content/browser/net/url_request_mock_http_job.h" |
29 #include "content/browser/tab_contents/tab_contents.h" | 29 #include "content/browser/tab_contents/tab_contents.h" |
30 #include "content/public/browser/notification_service.h" | 30 #include "content/public/browser/notification_service.h" |
31 #include "content/public/browser/notification_types.h" | 31 #include "content/public/browser/notification_types.h" |
32 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
33 | 33 |
| 34 using content::BrowserThread; |
| 35 |
34 namespace { | 36 namespace { |
35 | 37 |
36 static const FilePath::CharType* kTestDir = FILE_PATH_LITERAL("save_page"); | 38 static const FilePath::CharType* kTestDir = FILE_PATH_LITERAL("save_page"); |
37 | 39 |
38 static const char* kAppendedExtension = | 40 static const char* kAppendedExtension = |
39 #if defined(OS_WIN) | 41 #if defined(OS_WIN) |
40 ".htm"; | 42 ".htm"; |
41 #else | 43 #else |
42 ".html"; | 44 ".html"; |
43 #endif | 45 #endif |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, ExplicitCancel) { | 352 IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, ExplicitCancel) { |
351 GURL url = NavigateToMockURL("a"); | 353 GURL url = NavigateToMockURL("a"); |
352 FilePath full_file_name, dir; | 354 FilePath full_file_name, dir; |
353 GetDestinationPaths("a", &full_file_name, &dir); | 355 GetDestinationPaths("a", &full_file_name, &dir); |
354 scoped_refptr<SavePackage> save_package(new SavePackage(GetCurrentTab(), | 356 scoped_refptr<SavePackage> save_package(new SavePackage(GetCurrentTab(), |
355 SavePackage::SAVE_AS_ONLY_HTML, full_file_name, dir)); | 357 SavePackage::SAVE_AS_ONLY_HTML, full_file_name, dir)); |
356 save_package->Cancel(true); | 358 save_package->Cancel(true); |
357 } | 359 } |
358 | 360 |
359 } // namespace | 361 } // namespace |
OLD | NEW |