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. | |
189 TEST_F(DesktopMediaPickerViewsTest, ListViewHasInitialFocus) { | |
190 EXPECT_TRUE(GetPickerDialogView()->GetMediaListViewForTesting()->HasFocus()); | |
Peter Kasting
2015/10/02 18:52:56
I was thinking more along the lines of checking th
gyzhou
2015/10/05 20:50:16
We were verified that bool DesktopMediaListView::O
Peter Kasting
2015/10/05 20:59:45
Yes, I know this. That's why I asked for an inter
gyzhou
2015/10/05 21:12:27
We knew that the arrow key wasn't controlled by li
Peter Kasting
2015/10/05 21:59:26
I don't even understand how this sentence has any
| |
191 } | |
192 | |
188 } // namespace views | 193 } // namespace views |
OLD | NEW |