| 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 // This file contains download browser tests that are known to be runnable | 5 // This file contains download browser tests that are known to be runnable |
| 6 // in a pure content context. Over time tests should be migrated here. | 6 // in a pure content context. Over time tests should be migrated here. |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 #endif | 64 #endif |
| 65 | 65 |
| 66 using ::testing::AllOf; | 66 using ::testing::AllOf; |
| 67 using ::testing::Field; | 67 using ::testing::Field; |
| 68 using ::testing::InSequence; | 68 using ::testing::InSequence; |
| 69 using ::testing::Property; | 69 using ::testing::Property; |
| 70 using ::testing::Return; | 70 using ::testing::Return; |
| 71 using ::testing::StrictMock; | 71 using ::testing::StrictMock; |
| 72 using ::testing::_; | 72 using ::testing::_; |
| 73 | 73 |
| 74 namespace net { |
| 75 class NetLogWithSource; |
| 76 } |
| 77 |
| 74 namespace content { | 78 namespace content { |
| 75 | 79 |
| 76 namespace { | 80 namespace { |
| 77 | 81 |
| 78 class MockDownloadItemObserver : public DownloadItem::Observer { | 82 class MockDownloadItemObserver : public DownloadItem::Observer { |
| 79 public: | 83 public: |
| 80 MockDownloadItemObserver() {} | 84 MockDownloadItemObserver() {} |
| 81 virtual ~MockDownloadItemObserver() {} | 85 virtual ~MockDownloadItemObserver() {} |
| 82 | 86 |
| 83 MOCK_METHOD1(OnDownloadUpdated, void(DownloadItem*)); | 87 MOCK_METHOD1(OnDownloadUpdated, void(DownloadItem*)); |
| (...skipping 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2544 GURL document_url = | 2548 GURL document_url = |
| 2545 origin_two.GetURL("/iframe-host.html?target=" + frame_url.spec()); | 2549 origin_two.GetURL("/iframe-host.html?target=" + frame_url.spec()); |
| 2546 DownloadItem* download = StartDownloadAndReturnItem(shell(), document_url); | 2550 DownloadItem* download = StartDownloadAndReturnItem(shell(), document_url); |
| 2547 WaitForCompletion(download); | 2551 WaitForCompletion(download); |
| 2548 | 2552 |
| 2549 EXPECT_STREQ(FILE_PATH_LITERAL("download-test.lib"), | 2553 EXPECT_STREQ(FILE_PATH_LITERAL("download-test.lib"), |
| 2550 download->GetTargetFilePath().BaseName().value().c_str()); | 2554 download->GetTargetFilePath().BaseName().value().c_str()); |
| 2551 } | 2555 } |
| 2552 | 2556 |
| 2553 } // namespace content | 2557 } // namespace content |
| OLD | NEW |