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

Side by Side Diff: chrome/browser/ui/views/intent_picker_bubble_view_unittest.cc

Issue 2447773003: Use a const reference in IntentPickerResponse (Closed)
Patch Set: fix tests Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/browser_dialogs.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/ui/views/intent_picker_bubble_view.h" 5 #include "chrome/browser/ui/views/intent_picker_bubble_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 void FillAppListWithDummyIcons() { 62 void FillAppListWithDummyIcons() {
63 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 63 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
64 gfx::Image dummy_icon = rb.GetImageNamed(IDR_CLOSE); 64 gfx::Image dummy_icon = rb.GetImageNamed(IDR_CLOSE);
65 for (auto& app : app_info_) 65 for (auto& app : app_info_)
66 app.icon = dummy_icon; 66 app.icon = dummy_icon;
67 } 67 }
68 68
69 // Dummy method to be called upon bubble closing. 69 // Dummy method to be called upon bubble closing.
70 void OnBubbleClosed(std::string selected_app_package, 70 void OnBubbleClosed(const std::string& selected_app_package,
71 arc::ArcNavigationThrottle::CloseReason close_reason) {} 71 arc::ArcNavigationThrottle::CloseReason close_reason) {}
72 72
73 std::unique_ptr<IntentPickerBubbleView> bubble_; 73 std::unique_ptr<IntentPickerBubbleView> bubble_;
74 std::vector<AppInfo> app_info_; 74 std::vector<AppInfo> app_info_;
75 75
76 private: 76 private:
77 DISALLOW_COPY_AND_ASSIGN(IntentPickerBubbleViewTest); 77 DISALLOW_COPY_AND_ASSIGN(IntentPickerBubbleViewTest);
78 }; 78 };
79 79
80 // Verifies that we didn't set up an image for any LabelButton. 80 // Verifies that we didn't set up an image for any LabelButton.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 const ui::MouseEvent event(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(), 137 const ui::MouseEvent event(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(),
138 ui::EventTimeForNow(), 0, 0); 138 ui::EventTimeForNow(), 0, 0);
139 EXPECT_EQ(bubble_->GetInkDropStateForTesting(0), views::InkDropState::HIDDEN); 139 EXPECT_EQ(bubble_->GetInkDropStateForTesting(0), views::InkDropState::HIDDEN);
140 bubble_->PressButtonForTesting(0, event); 140 bubble_->PressButtonForTesting(0, event);
141 EXPECT_EQ(bubble_->GetInkDropStateForTesting(0), 141 EXPECT_EQ(bubble_->GetInkDropStateForTesting(0),
142 views::InkDropState::ACTIVATED); 142 views::InkDropState::ACTIVATED);
143 bubble_->PressButtonForTesting(0, event); 143 bubble_->PressButtonForTesting(0, event);
144 EXPECT_EQ(bubble_->GetInkDropStateForTesting(0), 144 EXPECT_EQ(bubble_->GetInkDropStateForTesting(0),
145 views::InkDropState::ACTIVATED); 145 views::InkDropState::ACTIVATED);
146 } 146 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_dialogs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698