| 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/prefs/pref_service.h" | 5 #include "base/prefs/pref_service.h" |
| 6 #include "chrome/browser/chrome_notification_types.h" | 6 #include "chrome/browser/chrome_notification_types.h" |
| 7 #include "chrome/browser/ui/browser_window.h" | 7 #include "chrome/browser/ui/browser_window.h" |
| 8 #include "chrome/browser/ui/chrome_pages.h" | 8 #include "chrome/browser/ui/chrome_pages.h" |
| 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 ASSERT_TRUE(content::ExecuteScriptAndExtractString( | 119 ASSERT_TRUE(content::ExecuteScriptAndExtractString( |
| 120 active_frame, | 120 active_frame, |
| 121 get_children_of_current_element_script, | 121 get_children_of_current_element_script, |
| 122 &languages)); | 122 &languages)); |
| 123 EXPECT_EQ("English (United States)SpanishFrench", languages); | 123 EXPECT_EQ("English (United States)SpanishFrench", languages); |
| 124 } | 124 } |
| 125 | 125 |
| 126 // This test will validate that the language webui is accessible through | 126 // This test will validate that the language webui is accessible through |
| 127 // the keyboard. | 127 // the keyboard. |
| 128 // This test must be updated if the tab order of the elements on this page | 128 // This test must be updated if the tab order of the elements on this page |
| 129 // is chagned. | 129 // is changed. |
| 130 // flaky: http://crbug.com/405711 | 130 // flaky: http://crbug.com/405711 |
| 131 IN_PROC_BROWSER_TEST_F(LanguageOptionsWebUITest, TestListTabAccessibility) { | 131 IN_PROC_BROWSER_TEST_F(LanguageOptionsWebUITest, TestListTabAccessibility) { |
| 132 // Verify that the language list is focused by default. | 132 // Verify that the language list is focused by default. |
| 133 std::string original_id = GetActiveElementId(); | 133 std::string original_id = GetActiveElementId(); |
| 134 EXPECT_EQ("language-options-list", original_id); | 134 EXPECT_EQ("language-options-list", original_id); |
| 135 | 135 |
| 136 // Press tab to select the next element. | 136 // Press tab to select the next element. |
| 137 ASSERT_TRUE(PressKey(ui::VKEY_TAB)); | 137 ASSERT_TRUE(PressKey(ui::VKEY_TAB)); |
| 138 | 138 |
| 139 // Make sure that the element is now the button that is next in the tab order. | 139 // Make sure that the element is now the button that is next in the tab order. |
| 140 // Checking that the list is no longer selected is not sufficient to validate | 140 // Checking that the list is no longer selected is not sufficient to validate |
| 141 // this use case because this test should fail if an item inside the list is | 141 // this use case because this test should fail if an item inside the list is |
| 142 // selected. | 142 // selected. |
| 143 std::string new_id = GetActiveElementId(); | 143 std::string new_id = GetActiveElementId(); |
| 144 EXPECT_EQ("language-options-add-button", new_id); | 144 EXPECT_EQ("language-options-add-button", new_id); |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace language_options_ui_test | 147 } // namespace language_options_ui_test |
| 148 | 148 |
| OLD | NEW |