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

Side by Side Diff: chrome/browser/download/download_history_unittest.cc

Issue 1751603002: [Downloads] Rework how hashes are calculated for download files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 #include "chrome/browser/download/download_history.h" 5 #include "chrome/browser/download/download_history.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 row.url_chain, 242 row.url_chain,
243 row.referrer_url, 243 row.referrer_url,
244 row.mime_type, 244 row.mime_type,
245 row.original_mime_type, 245 row.original_mime_type,
246 row.start_time, 246 row.start_time,
247 row.end_time, 247 row.end_time,
248 row.etag, 248 row.etag,
249 row.last_modified, 249 row.last_modified,
250 row.received_bytes, 250 row.received_bytes,
251 row.total_bytes, 251 row.total_bytes,
252 std::string(),
252 history::ToContentDownloadState(row.state), 253 history::ToContentDownloadState(row.state),
253 history::ToContentDownloadDangerType(row.danger_type), 254 history::ToContentDownloadDangerType(row.danger_type),
254 history::ToContentDownloadInterruptReason(row.interrupt_reason), 255 history::ToContentDownloadInterruptReason(row.interrupt_reason),
255 row.opened); 256 row.opened);
256 EXPECT_CALL(manager(), MockCreateDownloadItem(adapter)) 257 EXPECT_CALL(manager(), MockCreateDownloadItem(adapter))
257 .WillOnce(DoAll( 258 .WillOnce(DoAll(
258 InvokeWithoutArgs( 259 InvokeWithoutArgs(
259 this, &DownloadHistoryTest::CallOnDownloadCreatedInOrder), 260 this, &DownloadHistoryTest::CallOnDownloadCreatedInOrder),
260 Return(&item(index)))); 261 Return(&item(index))));
261 } 262 }
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 FinishCreateDownload(); 855 FinishCreateDownload();
855 EXPECT_TRUE(DownloadHistory::IsPersisted(&item(0))); 856 EXPECT_TRUE(DownloadHistory::IsPersisted(&item(0)));
856 857
857 // ItemAdded should call OnDownloadUpdated, which should detect that the item 858 // ItemAdded should call OnDownloadUpdated, which should detect that the item
858 // changed while it was being added and call UpdateDownload immediately. 859 // changed while it was being added and call UpdateDownload immediately.
859 info.opened = true; 860 info.opened = true;
860 ExpectDownloadUpdated(info); 861 ExpectDownloadUpdated(info);
861 } 862 }
862 863
863 } // anonymous namespace 864 } // anonymous namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698