OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/media/fake_desktop_media_list.h" | 8 #include "chrome/browser/media/fake_desktop_media_list.h" |
9 #include "chrome/browser/ui/views/desktop_media_picker_views.h" | 9 #include "chrome/browser/ui/views/desktop_media_picker_views.h" |
10 #include "components/web_modal/test_web_contents_modal_dialog_host.h" | 10 #include "components/web_modal/test_web_contents_modal_dialog_host.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 | 178 |
179 GetPickerDialogView()->GetMediaSourceViewForTesting(0)->OnFocus(); | 179 GetPickerDialogView()->GetMediaSourceViewForTesting(0)->OnFocus(); |
180 EXPECT_TRUE( | 180 EXPECT_TRUE( |
181 GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_OK)); | 181 GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_OK)); |
182 | 182 |
183 media_list_->RemoveSource(0); | 183 media_list_->RemoveSource(0); |
184 EXPECT_FALSE( | 184 EXPECT_FALSE( |
185 GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_OK)); | 185 GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_OK)); |
186 } | 186 } |
187 | 187 |
188 // Verifies that the MediaListView get the initial focus | |
Sergey Ulanov
2015/10/01 18:23:11
nit: add. at the end
gyzhou
2015/10/02 18:51:26
Done.
| |
189 TEST_F(DesktopMediaPickerViewsTest, ListViewHasInitialFocus) { | |
190 EXPECT_TRUE(GetPickerDialogView()-> | |
191 GetMediaListViewForTesting()->HasFocus()); | |
Sergey Ulanov
2015/10/01 18:23:11
nit: don't need to wrap this line - it can all fit
gyzhou
2015/10/02 18:51:26
Done.
| |
192 } | |
193 | |
188 } // namespace views | 194 } // namespace views |
OLD | NEW |