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

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

Issue 1967433002: [Merge-M51][Downloads/History] Add tab-url and tab-referrer-url to DownloadRow (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
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 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 const int kIntermediateSize = 1331; 1813 const int kIntermediateSize = 1331;
1814 url_chain.push_back(request_handler.url()); 1814 url_chain.push_back(request_handler.url());
1815 1815
1816 DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem( 1816 DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem(
1817 "F7FB1F59-7DE1-4845-AFDB-8A688F70F583", 1817 "F7FB1F59-7DE1-4845-AFDB-8A688F70F583",
1818 1, 1818 1,
1819 intermediate_file_path, 1819 intermediate_file_path,
1820 base::FilePath(), 1820 base::FilePath(),
1821 url_chain, 1821 url_chain,
1822 GURL(), 1822 GURL(),
1823 GURL(),
1824 GURL(),
1823 "application/octet-stream", 1825 "application/octet-stream",
1824 "application/octet-stream", 1826 "application/octet-stream",
1825 base::Time::Now(), 1827 base::Time::Now(),
1826 base::Time(), 1828 base::Time(),
1827 parameters.etag, 1829 parameters.etag,
1828 std::string(), 1830 std::string(),
1829 kIntermediateSize, 1831 kIntermediateSize,
1830 parameters.size, 1832 parameters.size,
1831 std::string(), 1833 std::string(),
1832 DownloadItem::INTERRUPTED, 1834 DownloadItem::INTERRUPTED,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 1887
1886 url_chain.push_back(request_handler.url()); 1888 url_chain.push_back(request_handler.url());
1887 1889
1888 DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem( 1890 DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem(
1889 "F7FB1F59-7DE1-4845-AFDB-8A688F70F583", 1891 "F7FB1F59-7DE1-4845-AFDB-8A688F70F583",
1890 1, 1892 1,
1891 intermediate_file_path, 1893 intermediate_file_path,
1892 base::FilePath(), 1894 base::FilePath(),
1893 url_chain, 1895 url_chain,
1894 GURL(), 1896 GURL(),
1897 GURL(),
1898 GURL(),
1895 "application/octet-stream", 1899 "application/octet-stream",
1896 "application/octet-stream", 1900 "application/octet-stream",
1897 base::Time::Now(), 1901 base::Time::Now(),
1898 base::Time(), 1902 base::Time(),
1899 parameters.etag, 1903 parameters.etag,
1900 std::string(), 1904 std::string(),
1901 kIntermediateSize, 1905 kIntermediateSize,
1902 parameters.size, 1906 parameters.size,
1903 std::string(), 1907 std::string(),
1904 DownloadItem::INTERRUPTED, 1908 DownloadItem::INTERRUPTED,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 1948
1945 url_chain.push_back(request_handler.url()); 1949 url_chain.push_back(request_handler.url());
1946 1950
1947 DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem( 1951 DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem(
1948 "F7FB1F59-7DE1-4845-AFDB-8A688F70F583", 1952 "F7FB1F59-7DE1-4845-AFDB-8A688F70F583",
1949 1, 1953 1,
1950 intermediate_file_path, 1954 intermediate_file_path,
1951 base::FilePath(), 1955 base::FilePath(),
1952 url_chain, 1956 url_chain,
1953 GURL(), 1957 GURL(),
1958 GURL(),
1959 GURL(),
1954 "application/octet-stream", 1960 "application/octet-stream",
1955 "application/octet-stream", 1961 "application/octet-stream",
1956 base::Time::Now(), 1962 base::Time::Now(),
1957 base::Time(), 1963 base::Time(),
1958 "fake-etag", 1964 "fake-etag",
1959 std::string(), 1965 std::string(),
1960 kIntermediateSize, 1966 kIntermediateSize,
1961 parameters.size, 1967 parameters.size,
1962 std::string(), 1968 std::string(),
1963 DownloadItem::INTERRUPTED, 1969 DownloadItem::INTERRUPTED,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
2008 2014
2009 url_chain.push_back(request_handler.url()); 2015 url_chain.push_back(request_handler.url());
2010 2016
2011 DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem( 2017 DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem(
2012 "F7FB1F59-7DE1-4845-AFDB-8A688F70F583", 2018 "F7FB1F59-7DE1-4845-AFDB-8A688F70F583",
2013 1, 2019 1,
2014 intermediate_file_path, 2020 intermediate_file_path,
2015 base::FilePath(), 2021 base::FilePath(),
2016 url_chain, 2022 url_chain,
2017 GURL(), 2023 GURL(),
2024 GURL(),
2025 GURL(),
2018 "application/octet-stream", 2026 "application/octet-stream",
2019 "application/octet-stream", 2027 "application/octet-stream",
2020 base::Time::Now(), 2028 base::Time::Now(),
2021 base::Time(), 2029 base::Time(),
2022 parameters.etag, 2030 parameters.etag,
2023 std::string(), 2031 std::string(),
2024 kIntermediateSize, 2032 kIntermediateSize,
2025 parameters.size, 2033 parameters.size,
2026 std::string(std::begin(kPartialHash), std::end(kPartialHash)), 2034 std::string(std::begin(kPartialHash), std::end(kPartialHash)),
2027 DownloadItem::INTERRUPTED, 2035 DownloadItem::INTERRUPTED,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 2086
2079 url_chain.push_back(request_handler.url()); 2087 url_chain.push_back(request_handler.url());
2080 2088
2081 DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem( 2089 DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem(
2082 "F7FB1F59-7DE1-4845-AFDB-8A688F70F583", 2090 "F7FB1F59-7DE1-4845-AFDB-8A688F70F583",
2083 1, 2091 1,
2084 intermediate_file_path, 2092 intermediate_file_path,
2085 base::FilePath(), 2093 base::FilePath(),
2086 url_chain, 2094 url_chain,
2087 GURL(), 2095 GURL(),
2096 GURL(),
2097 GURL(),
2088 "application/octet-stream", 2098 "application/octet-stream",
2089 "application/octet-stream", 2099 "application/octet-stream",
2090 base::Time::Now(), 2100 base::Time::Now(),
2091 base::Time(), 2101 base::Time(),
2092 parameters.etag, 2102 parameters.etag,
2093 std::string(), 2103 std::string(),
2094 kIntermediateSize, 2104 kIntermediateSize,
2095 parameters.size, 2105 parameters.size,
2096 std::string(std::begin(kPartialHash), std::end(kPartialHash)), 2106 std::string(std::begin(kPartialHash), std::end(kPartialHash)),
2097 DownloadItem::INTERRUPTED, 2107 DownloadItem::INTERRUPTED,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 base::WriteFile(intermediate_file_path, buffer.data(), buffer.size())); 2167 base::WriteFile(intermediate_file_path, buffer.data(), buffer.size()));
2158 url_chain.push_back(request_handler.url()); 2168 url_chain.push_back(request_handler.url());
2159 2169
2160 DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem( 2170 DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem(
2161 "F7FB1F59-7DE1-4845-AFDB-8A688F70F583", 2171 "F7FB1F59-7DE1-4845-AFDB-8A688F70F583",
2162 1, 2172 1,
2163 intermediate_file_path, 2173 intermediate_file_path,
2164 base::FilePath(), 2174 base::FilePath(),
2165 url_chain, 2175 url_chain,
2166 GURL(), 2176 GURL(),
2177 GURL(),
2178 GURL(),
2167 "application/octet-stream", 2179 "application/octet-stream",
2168 "application/octet-stream", 2180 "application/octet-stream",
2169 base::Time::Now(), 2181 base::Time::Now(),
2170 base::Time(), 2182 base::Time(),
2171 parameters.etag, 2183 parameters.etag,
2172 std::string(), 2184 std::string(),
2173 kIntermediateSize, 2185 kIntermediateSize,
2174 parameters.size, 2186 parameters.size,
2175 std::string(), 2187 std::string(),
2176 DownloadItem::INTERRUPTED, 2188 DownloadItem::INTERRUPTED,
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
2454 2466
2455 std::vector<DownloadItem*> downloads; 2467 std::vector<DownloadItem*> downloads;
2456 DownloadManagerForShell(shell())->GetAllDownloads(&downloads); 2468 DownloadManagerForShell(shell())->GetAllDownloads(&downloads);
2457 ASSERT_EQ(1u, downloads.size()); 2469 ASSERT_EQ(1u, downloads.size());
2458 2470
2459 EXPECT_EQ(FILE_PATH_LITERAL("Jumboshrimp.txt"), 2471 EXPECT_EQ(FILE_PATH_LITERAL("Jumboshrimp.txt"),
2460 downloads[0]->GetTargetFilePath().BaseName().value()); 2472 downloads[0]->GetTargetFilePath().BaseName().value());
2461 } 2473 }
2462 2474
2463 } // namespace content 2475 } // namespace content
OLDNEW
« no previous file with comments | « components/test/data/history/history.30.sql ('k') | content/browser/download/download_item_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698