Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: content/browser/download/download_browsertest.cc

Issue 1958413004: [M51] Fix build after 2bb4bee49cf1ef7c9c19b4790f5caf80a77c3ccf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2301 matching lines...) Expand 10 before | Expand all | Expand 10 after
2312 TestDownloadRequestHandler::CompletedRequests completed_requests; 2312 TestDownloadRequestHandler::CompletedRequests completed_requests;
2313 request_handler.GetCompletedRequestInfo(&completed_requests); 2313 request_handler.GetCompletedRequestInfo(&completed_requests);
2314 2314
2315 // There should be only one request. The intermediate file should be truncated 2315 // There should be only one request. The intermediate file should be truncated
2316 // to the expected size, and the request should be issued for the remainder. 2316 // to the expected size, and the request should be issued for the remainder.
2317 // 2317 //
2318 // TODO(asanka): Ideally we'll check that the intermediate file matches 2318 // TODO(asanka): Ideally we'll check that the intermediate file matches
2319 // expectations prior to issuing the first resumption request. 2319 // expectations prior to issuing the first resumption request.
2320 ASSERT_EQ(1u, completed_requests.size()); 2320 ASSERT_EQ(1u, completed_requests.size());
2321 EXPECT_EQ(parameters.size - kIntermediateSize, 2321 EXPECT_EQ(parameters.size - kIntermediateSize,
2322 completed_requests[0].transferred_byte_count); 2322 completed_requests[0]->transferred_byte_count);
2323 } 2323 }
2324 2324
2325 // Check that the cookie policy is correctly updated when downloading a file 2325 // Check that the cookie policy is correctly updated when downloading a file
2326 // that redirects cross origin. 2326 // that redirects cross origin.
2327 IN_PROC_BROWSER_TEST_F(DownloadContentTest, CookiePolicy) { 2327 IN_PROC_BROWSER_TEST_F(DownloadContentTest, CookiePolicy) {
2328 net::EmbeddedTestServer origin_one; 2328 net::EmbeddedTestServer origin_one;
2329 net::EmbeddedTestServer origin_two; 2329 net::EmbeddedTestServer origin_two;
2330 ASSERT_TRUE(origin_one.Start()); 2330 ASSERT_TRUE(origin_one.Start());
2331 ASSERT_TRUE(origin_two.Start()); 2331 ASSERT_TRUE(origin_two.Start());
2332 2332
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2566 2566
2567 std::vector<DownloadItem*> downloads; 2567 std::vector<DownloadItem*> downloads;
2568 DownloadManagerForShell(shell())->GetAllDownloads(&downloads); 2568 DownloadManagerForShell(shell())->GetAllDownloads(&downloads);
2569 ASSERT_EQ(1u, downloads.size()); 2569 ASSERT_EQ(1u, downloads.size());
2570 2570
2571 EXPECT_EQ(FILE_PATH_LITERAL("Jumboshrimp.txt"), 2571 EXPECT_EQ(FILE_PATH_LITERAL("Jumboshrimp.txt"),
2572 downloads[0]->GetTargetFilePath().BaseName().value()); 2572 downloads[0]->GetTargetFilePath().BaseName().value());
2573 } 2573 }
2574 2574
2575 } // namespace content 2575 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698