diff options
author | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-30 06:37:20 +0000 |
---|---|---|
committer | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-30 06:37:20 +0000 |
commit | e384fd8b3eaa3044dcbd60abc529f4b9711d89bf (patch) | |
tree | c22facc3dd9a5cbde57d72691208738f7dcaca7e /chrome/browser/download/download_item_unittest.cc | |
parent | 64d5c30d9869c2ab4781a7728f12498e19a5cfb8 (diff) | |
download | chromium_src-e384fd8b3eaa3044dcbd60abc529f4b9711d89bf.zip chromium_src-e384fd8b3eaa3044dcbd60abc529f4b9711d89bf.tar.gz chromium_src-e384fd8b3eaa3044dcbd60abc529f4b9711d89bf.tar.bz2 |
Move download speed calculation to file thread / DownloadFile class.
This change doesn't change the way the calculation is performed but moves
it to the file thread, in preperation for implementing a different speed
calculation method.
BUG=None
TEST=Manually tested; automated tests needed.
Review URL: http://codereview.chromium.org/8595004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112152 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_item_unittest.cc')
-rw-r--r-- | chrome/browser/download/download_item_unittest.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/download/download_item_unittest.cc b/chrome/browser/download/download_item_unittest.cc index 86d7aaa..1961a21 100644 --- a/chrome/browser/download/download_item_unittest.cc +++ b/chrome/browser/download/download_item_unittest.cc @@ -107,6 +107,7 @@ class DownloadItemTest : public testing::Test { namespace { const int kDownloadChunkSize = 1000; +const int kDownloadSpeed = 1000; const int kDummyDBHandle = 10; const FilePath::CharType kDummyPath[] = FILE_PATH_LITERAL("/testpath"); @@ -126,8 +127,9 @@ TEST_F(DownloadItemTest, NotificationAfterUpdate) { DownloadItem* item = CreateDownloadItem(DownloadItem::IN_PROGRESS); MockObserver observer(item); - item->Update(kDownloadChunkSize); + item->UpdateProgress(kDownloadChunkSize, kDownloadSpeed); ASSERT_TRUE(observer.CheckUpdated()); + EXPECT_EQ(kDownloadSpeed, item->CurrentSpeed()); } TEST_F(DownloadItemTest, NotificationAfterCancel) { |