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

Side by Side Diff: chrome/browser/ui/views/extensions/chooser_dialog_view_browsertest.cc

Issue 2061193003: Remove "BUBBLE" from chooser related string IDs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 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/extensions/chooser_dialog_view.h" 5 #include "chrome/browser/ui/views/extensions/chooser_dialog_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/browser/extensions/extension_browsertest.h" 8 #include "chrome/browser/extensions/extension_browsertest.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model.h" 9 #include "chrome/browser/ui/tabs/tab_strip_model.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 28 matching lines...) Expand all
39 ui::TableModel* table_model_; 39 ui::TableModel* table_model_;
40 40
41 private: 41 private:
42 DISALLOW_COPY_AND_ASSIGN(ChooserDialogViewTest); 42 DISALLOW_COPY_AND_ASSIGN(ChooserDialogViewTest);
43 }; 43 };
44 44
45 IN_PROC_BROWSER_TEST_F(ChooserDialogViewTest, InitialState) { 45 IN_PROC_BROWSER_TEST_F(ChooserDialogViewTest, InitialState) {
46 // Since "No devices found." needs to be displayed on the |table_view_|, 46 // Since "No devices found." needs to be displayed on the |table_view_|,
47 // the number of rows is 1. 47 // the number of rows is 1.
48 EXPECT_EQ(table_view_->RowCount(), 1); 48 EXPECT_EQ(table_view_->RowCount(), 1);
49 EXPECT_EQ( 49 EXPECT_EQ(table_model_->GetText(0, 0),
50 table_model_->GetText(0, 0), 50 l10n_util::GetStringUTF16(IDS_CHOOSER_NO_DEVICES_FOUND_PROMPT));
51 l10n_util::GetStringUTF16(IDS_CHOOSER_BUBBLE_NO_DEVICES_FOUND_PROMPT));
52 // |table_view_| should be disabled since there is no option shown. 51 // |table_view_| should be disabled since there is no option shown.
53 EXPECT_FALSE(table_view_->enabled()); 52 EXPECT_FALSE(table_view_->enabled());
54 // No option selected. 53 // No option selected.
55 EXPECT_EQ(table_view_->SelectedRowCount(), 0); 54 EXPECT_EQ(table_view_->SelectedRowCount(), 0);
56 EXPECT_EQ(table_view_->FirstSelectedRow(), -1); 55 EXPECT_EQ(table_view_->FirstSelectedRow(), -1);
57 } 56 }
58 57
59 IN_PROC_BROWSER_TEST_F(ChooserDialogViewTest, Accept) { 58 IN_PROC_BROWSER_TEST_F(ChooserDialogViewTest, Accept) {
60 EXPECT_CALL(*mock_chooser_controller_, Select(testing::_)).Times(1); 59 EXPECT_CALL(*mock_chooser_controller_, Select(testing::_)).Times(1);
61 chooser_dialog_view_->Accept(); 60 chooser_dialog_view_->Accept();
62 } 61 }
63 62
64 IN_PROC_BROWSER_TEST_F(ChooserDialogViewTest, Cancel) { 63 IN_PROC_BROWSER_TEST_F(ChooserDialogViewTest, Cancel) {
65 EXPECT_CALL(*mock_chooser_controller_, Cancel()).Times(1); 64 EXPECT_CALL(*mock_chooser_controller_, Cancel()).Times(1);
66 chooser_dialog_view_->Cancel(); 65 chooser_dialog_view_->Cancel();
67 } 66 }
68 67
69 IN_PROC_BROWSER_TEST_F(ChooserDialogViewTest, Close) { 68 IN_PROC_BROWSER_TEST_F(ChooserDialogViewTest, Close) {
70 EXPECT_CALL(*mock_chooser_controller_, Close()).Times(1); 69 EXPECT_CALL(*mock_chooser_controller_, Close()).Times(1);
71 chooser_dialog_view_->Close(); 70 chooser_dialog_view_->Close();
72 } 71 }
73 72
74 IN_PROC_BROWSER_TEST_F(ChooserDialogViewTest, ClickStyledLabelLink) { 73 IN_PROC_BROWSER_TEST_F(ChooserDialogViewTest, ClickStyledLabelLink) {
75 EXPECT_CALL(*mock_chooser_controller_, OpenHelpCenterUrl()).Times(1); 74 EXPECT_CALL(*mock_chooser_controller_, OpenHelpCenterUrl()).Times(1);
76 chooser_dialog_view_->StyledLabelLinkClicked(nullptr, gfx::Range(), 0); 75 chooser_dialog_view_->StyledLabelLinkClicked(nullptr, gfx::Range(), 0);
77 } 76 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698