| 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 <queue> | 5 #include <queue> |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
| 8 #include "ash/accelerators/accelerator_table.h" | 8 #include "ash/accelerators/accelerator_table.h" |
| 9 #include "ash/common/accessibility_types.h" | 9 #include "ash/common/accessibility_types.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 EXPECT_EQ("Start selection", speech_monitor_.GetNextUtterance()); | 560 EXPECT_EQ("Start selection", speech_monitor_.GetNextUtterance()); |
| 561 EXPECT_EQ("Title", speech_monitor_.GetNextUtterance()); | 561 EXPECT_EQ("Title", speech_monitor_.GetNextUtterance()); |
| 562 EXPECT_EQ(", selected", speech_monitor_.GetNextUtterance()); | 562 EXPECT_EQ(", selected", speech_monitor_.GetNextUtterance()); |
| 563 | 563 |
| 564 // Press again to end the selection. | 564 // Press again to end the selection. |
| 565 SendKeyPressWithSearchAndShift(ui::VKEY_S); | 565 SendKeyPressWithSearchAndShift(ui::VKEY_S); |
| 566 EXPECT_EQ("End selection", speech_monitor_.GetNextUtterance()); | 566 EXPECT_EQ("End selection", speech_monitor_.GetNextUtterance()); |
| 567 EXPECT_EQ("Title", speech_monitor_.GetNextUtterance()); | 567 EXPECT_EQ("Title", speech_monitor_.GetNextUtterance()); |
| 568 } | 568 } |
| 569 | 569 |
| 570 #if defined(MEMORY_SANITIZER) |
| 571 // Fails under MemorySanitizer: http://crbug.com/628060 |
| 572 #define MAYBE_ChromeVoxStickyMode DISABLED_ChromeVoxStickyMode |
| 573 #else |
| 574 #define MAYBE_ChromeVoxStickyMode ChromeVoxStickyMode |
| 575 #endif |
| 570 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, ChromeVoxStickyMode) { | 576 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, ChromeVoxStickyMode) { |
| 571 LoadChromeVoxAndThenNavigateToURL( | 577 LoadChromeVoxAndThenNavigateToURL( |
| 572 GURL("data:text/html;charset=utf-8," | 578 GURL("data:text/html;charset=utf-8," |
| 573 "<label>Enter your name <input autofocus></label>" | 579 "<label>Enter your name <input autofocus></label>" |
| 574 "<p>One</p>" | 580 "<p>One</p>" |
| 575 "<h2>Two</h2>")); | 581 "<h2>Two</h2>")); |
| 576 while (speech_monitor_.GetNextUtterance() != "Enter your name") { | 582 while (speech_monitor_.GetNextUtterance() != "Enter your name") { |
| 577 } | 583 } |
| 578 EXPECT_EQ("Edit text", speech_monitor_.GetNextUtterance()); | 584 EXPECT_EQ("Edit text", speech_monitor_.GetNextUtterance()); |
| 579 | 585 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( | 754 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( |
| 749 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); | 755 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); |
| 750 while (speech_monitor_.GetNextUtterance() != "Select your language:") { | 756 while (speech_monitor_.GetNextUtterance() != "Select your language:") { |
| 751 } | 757 } |
| 752 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); | 758 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); |
| 753 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), | 759 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), |
| 754 "Combo box * of *")); | 760 "Combo box * of *")); |
| 755 } | 761 } |
| 756 | 762 |
| 757 } // namespace chromeos | 763 } // namespace chromeos |
| OLD | NEW |