| Index: ui/app_list/cocoa/apps_grid_controller_unittest.mm
|
| diff --git a/ui/app_list/cocoa/apps_grid_controller_unittest.mm b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
|
| index 13634d818b9938cf7cb6c913d43cdb04a9e22d1c..7aa69380c4e20d1125b54161c23244fde6bdb635 100644
|
| --- a/ui/app_list/cocoa/apps_grid_controller_unittest.mm
|
| +++ b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
|
| @@ -16,6 +16,7 @@
|
| #import "ui/app_list/cocoa/test/apps_grid_controller_test_helper.h"
|
| #include "ui/app_list/test/app_list_test_model.h"
|
| #include "ui/app_list/test/app_list_test_view_delegate.h"
|
| +#include "ui/app_list/views/progress_bar_view.h"
|
| #include "ui/base/models/simple_menu_model.h"
|
| #import "ui/events/test/cocoa_test_event_utils.h"
|
|
|
| @@ -580,14 +581,14 @@ TEST_F(AppsGridControllerTest, ItemInstallProgress) {
|
|
|
| EXPECT_EQ(2u, [[containerView subviews] count]);
|
| EXPECT_NSEQ(@"", [button title]);
|
| - NSProgressIndicator* progressIndicator =
|
| - [[containerView subviews] objectAtIndex:1];
|
| - EXPECT_FALSE([progressIndicator isIndeterminate]);
|
| - EXPECT_EQ(0.0, [progressIndicator doubleValue]);
|
| + app_list::ProgressBarView* progressBar =
|
| + [[apps_grid_controller_ itemAtIndex:kItemsPerPage] progressIndicator];
|
| + // TODO(tapted): Check for indeterminate:NO.
|
| + EXPECT_EQ(0.0, progressBar->current_value());
|
|
|
| // Updating the progress in the model should update the progress bar.
|
| item_model->SetPercentDownloaded(50);
|
| - EXPECT_EQ(50.0, [progressIndicator doubleValue]);
|
| + EXPECT_EQ(0.5, progressBar->current_value());
|
|
|
| // Two things can be installing simultaneously. When one starts or completes
|
| // the model builder will ask for the item to be highlighted.
|
| @@ -599,13 +600,13 @@ TEST_F(AppsGridControllerTest, ItemInstallProgress) {
|
|
|
| // Update the first item (page doesn't change on updates).
|
| item_model->SetPercentDownloaded(100);
|
| - EXPECT_EQ(100.0, [progressIndicator doubleValue]);
|
| + EXPECT_EQ(1.0, progressBar->current_value());
|
| EXPECT_EQ(0u, [apps_grid_controller_ visiblePage]);
|
|
|
| // A percent of -1 indicates the download is complete and the unpack/install
|
| // process has started.
|
| item_model->SetPercentDownloaded(-1);
|
| - EXPECT_TRUE([progressIndicator isIndeterminate]);
|
| + // TODO(tapted): Check for indeterminate:YES.
|
|
|
| // Completing install removes the progress bar, and restores the title.
|
| // ExtensionAppModelBuilder will reload the ExtensionAppItem, which also
|
|
|