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

Side by Side Diff: chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc

Issue 319703002: Add mime type information to the download database (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix DownloadUIController_HistoryDownload test failure Created 6 years, 6 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 | « chrome/browser/history/history_unittest.cc ('k') | chrome/test/data/History/history.28.sql » ('j') | 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 #include "base/auto_reset.h" 5 #include "base/auto_reset.h"
6 #include "base/files/scoped_temp_dir.h" 6 #include "base/files/scoped_temp_dir.h"
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/history/download_row.h" 10 #include "chrome/browser/history/download_row.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 GURL url = test_server()->GetURL("files/downloads/image.jpg"); 137 GURL url = test_server()->GetURL("files/downloads/image.jpg");
138 std::vector<GURL> url_chain; 138 std::vector<GURL> url_chain;
139 url_chain.push_back(url); 139 url_chain.push_back(url);
140 base::Time current(base::Time::Now()); 140 base::Time current(base::Time::Now());
141 download_manager()->CreateDownloadItem( 141 download_manager()->CreateDownloadItem(
142 1, // id 142 1, // id
143 base::FilePath(FILE_PATH_LITERAL("/path/to/file")), 143 base::FilePath(FILE_PATH_LITERAL("/path/to/file")),
144 base::FilePath(FILE_PATH_LITERAL("/path/to/file")), 144 base::FilePath(FILE_PATH_LITERAL("/path/to/file")),
145 url_chain, 145 url_chain,
146 GURL(std::string()), 146 GURL(std::string()),
147 "application/octet-stream",
148 "application/octet-stream",
147 current, 149 current,
148 current, 150 current,
149 std::string(), 151 std::string(),
150 std::string(), 152 std::string(),
151 128, 153 128,
152 128, 154 128,
153 content::DownloadItem::COMPLETE, 155 content::DownloadItem::COMPLETE,
154 content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, 156 content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
155 content::DOWNLOAD_INTERRUPT_REASON_NONE, 157 content::DOWNLOAD_INTERRUPT_REASON_NONE,
156 false); 158 false);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // TODO(benjhayden): Test incognito, both downloads_list() and that on-record 250 // TODO(benjhayden): Test incognito, both downloads_list() and that on-record
249 // calls can't access off-record items. 251 // calls can't access off-record items.
250 252
251 // TODO(benjhayden): Test that bad download ids incoming from the javascript are 253 // TODO(benjhayden): Test that bad download ids incoming from the javascript are
252 // dropped on the floor. 254 // dropped on the floor.
253 255
254 // TODO(benjhayden): Test that IsTemporary() downloads are not shown. 256 // TODO(benjhayden): Test that IsTemporary() downloads are not shown.
255 257
256 // TODO(benjhayden): Test that RemoveObserver is called on all download items, 258 // TODO(benjhayden): Test that RemoveObserver is called on all download items,
257 // including items that crossed IsTemporary() and back. 259 // including items that crossed IsTemporary() and back.
OLDNEW
« no previous file with comments | « chrome/browser/history/history_unittest.cc ('k') | chrome/test/data/History/history.28.sql » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698