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

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

Issue 1542413002: Switch to standard integer types in chrome/browser/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 <stddef.h>
6
5 #include "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
6 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
7 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
8 #include "base/stl_util.h" 10 #include "base/stl_util.h"
9 #include "chrome/browser/download/download_status_updater.h" 11 #include "chrome/browser/download/download_status_updater.h"
10 #include "content/public/test/mock_download_item.h" 12 #include "content/public/test/mock_download_item.h"
11 #include "content/public/test/mock_download_manager.h" 13 #include "content/public/test/mock_download_manager.h"
12 #include "content/public/test/test_browser_thread.h" 14 #include "content/public/test/test_browser_thread.h"
13 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 SetItemValues(0, 0, 10, 20, false); 335 SetItemValues(0, 0, 10, 20, false);
334 SetItemValues(0, 1, 50, 60, false); 336 SetItemValues(0, 1, 50, 60, false);
335 SetItemValues(1, 0, 80, 90, false); 337 SetItemValues(1, 0, 80, 90, false);
336 338
337 float progress = -1; 339 float progress = -1;
338 int download_count = -1; 340 int download_count = -1;
339 EXPECT_TRUE(updater_->GetProgress(&progress, &download_count)); 341 EXPECT_TRUE(updater_->GetProgress(&progress, &download_count));
340 EXPECT_FLOAT_EQ((10+50+80)/(20.0f+60+90), progress); 342 EXPECT_FLOAT_EQ((10+50+80)/(20.0f+60+90), progress);
341 EXPECT_EQ(3, download_count); 343 EXPECT_EQ(3, download_count);
342 } 344 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_status_updater.cc ('k') | chrome/browser/download/download_target_determiner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698