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

Unified Diff: views/controls/progress_bar_unittest.cc

Issue 1216007: Added unit test for the views::ProgressBar::AddProgress method.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/progress_bar_unittest.cc
===================================================================
--- views/controls/progress_bar_unittest.cc (revision 42580)
+++ views/controls/progress_bar_unittest.cc (working copy)
@@ -22,6 +22,17 @@
EXPECT_EQ(62, progress);
}
+TEST(ProgressBarTest, AddProgressMethod) {
+ ProgressBar bar;
+ bar.SetProgress(10);
+ bar.AddProgress(22);
+ int progress = bar.GetProgress();
+ EXPECT_EQ(32, progress);
+ bar.AddProgress(200);
+ progress = bar.GetProgress();
+ EXPECT_EQ(100, progress);
+}
+
TEST(ProgressBarTest, TooltipTextProperty) {
ProgressBar bar;
std::wstring tooltip = L"Some text";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698