summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authordenisromanov@chromium.org <denisromanov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 04:13:51 +0000
committerdenisromanov@chromium.org <denisromanov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 04:13:51 +0000
commit46215d5ef32784db5544fc5f7ba06b6617935fec (patch)
treee162bc368b12813a753460c93fa3fb12c6a9efbd /views
parentb0f91150cf04f462ef39f5f087490007bb320410 (diff)
downloadchromium_src-46215d5ef32784db5544fc5f7ba06b6617935fec.zip
chromium_src-46215d5ef32784db5544fc5f7ba06b6617935fec.tar.gz
chromium_src-46215d5ef32784db5544fc5f7ba06b6617935fec.tar.bz2
Added unit test for the views::ProgressBar::AddProgress method.
BUG=37960 TEST=Run unit_tests. Review URL: http://codereview.chromium.org/1216007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/progress_bar_unittest.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/views/controls/progress_bar_unittest.cc b/views/controls/progress_bar_unittest.cc
index 971b424..73524c7 100644
--- a/views/controls/progress_bar_unittest.cc
+++ b/views/controls/progress_bar_unittest.cc
@@ -22,6 +22,17 @@ TEST(ProgressBarTest, ProgressProperty) {
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";