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

Side by Side Diff: ui/app_list/views/apps_grid_view_unittest.cc

Issue 1402543002: Don't use base::MessageLoop::{Quit,QuitClosure} in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 "ui/app_list/views/apps_grid_view.h" 5 #include "ui/app_list/views/apps_grid_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 private: 60 private:
61 // PaginationModelObserver overrides: 61 // PaginationModelObserver overrides:
62 void TotalPagesChanged() override {} 62 void TotalPagesChanged() override {}
63 void SelectedPageChanged(int old_selected, int new_selected) override { 63 void SelectedPageChanged(int old_selected, int new_selected) override {
64 if (!selected_pages_.empty()) 64 if (!selected_pages_.empty())
65 selected_pages_ += ','; 65 selected_pages_ += ',';
66 selected_pages_ += base::IntToString(new_selected); 66 selected_pages_ += base::IntToString(new_selected);
67 67
68 if (wait_) 68 if (wait_)
69 ui_loop_->Quit(); 69 ui_loop_->QuitWhenIdle();
70 } 70 }
71 void TransitionStarted() override {} 71 void TransitionStarted() override {}
72 void TransitionChanged() override {} 72 void TransitionChanged() override {}
73 73
74 base::MessageLoopForUI* ui_loop_; 74 base::MessageLoopForUI* ui_loop_;
75 PaginationModel* model_; 75 PaginationModel* model_;
76 bool wait_; 76 bool wait_;
77 std::string selected_pages_; 77 std::string selected_pages_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(PageFlipWaiter); 79 DISALLOW_COPY_AND_ASSIGN(PageFlipWaiter);
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 AppListItemView* item_view = GetItemViewAt(0); 784 AppListItemView* item_view = GetItemViewAt(0);
785 ASSERT_TRUE(item_view); 785 ASSERT_TRUE(item_view);
786 const views::Label* title_label = item_view->title(); 786 const views::Label* title_label = item_view->title();
787 EXPECT_FALSE(title_label->GetTooltipText( 787 EXPECT_FALSE(title_label->GetTooltipText(
788 title_label->bounds().CenterPoint(), &actual_tooltip)); 788 title_label->bounds().CenterPoint(), &actual_tooltip));
789 EXPECT_EQ(title, base::UTF16ToUTF8(title_label->text())); 789 EXPECT_EQ(title, base::UTF16ToUTF8(title_label->text()));
790 } 790 }
791 791
792 } // namespace test 792 } // namespace test
793 } // namespace app_list 793 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698