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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/panel_test.extjs

Issue 2782753002: Ensure only one instance of AutomationInternalCustomBindings for background page extensions (Closed)
Patch Set: Rebase. Created 3 years, 8 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 test fixture. 5 // Include test fixture.
6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']); 6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']);
7 7
8 GEN_INCLUDE(['../../testing/mock_feedback.js']); 8 GEN_INCLUDE(['../../testing/mock_feedback.js']);
9 9
10 /** 10 /**
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 'Announce The Title Of The Current Page ChromeVox+A>W', 78 'Announce The Title Of The Current Page ChromeVox+A>W',
79 'Menu item', / 1 of [0-9]{2} /) 79 'Menu item', / 1 of [0-9]{2} /)
80 .replay(); 80 .replay();
81 }); 81 });
82 }); 82 });
83 83
84 TEST_F('PanelTest', 'LinkMenu', function() { 84 TEST_F('PanelTest', 'LinkMenu', function() {
85 var mockFeedback = this.createMockFeedback(); 85 var mockFeedback = this.createMockFeedback();
86 this.runWithLoadedTree(this.linksDoc, function(root) { 86 this.runWithLoadedTree(this.linksDoc, function(root) {
87 var openMenus = new PanelCommand(PanelCommandType.OPEN_MENUS, 'role_link'); 87 var openMenus = new PanelCommand(PanelCommandType.OPEN_MENUS, 'role_link');
88 mockFeedback.expectSpeech('apple') 88 mockFeedback.call(openMenus.send.bind(openMenus))
89 .call(openMenus.send.bind(openMenus))
90 .expectSpeech('apple Link ', 'Menu item', ' 1 of 3 ', 'Link', 'Menu') 89 .expectSpeech('apple Link ', 'Menu item', ' 1 of 3 ', 'Link', 'Menu')
91 .call(this.fireMockEvent('ArrowLeft')) 90 .call(this.fireMockEvent('ArrowLeft'))
92 .expectSpeech('Landmark', 'Menu', 'No items. ', 'Menu item', ' 1 of 1 ') 91 .expectSpeech('Landmark', 'Menu', 'No items. ', 'Menu item', ' 1 of 1 ')
93 .call(this.fireMockEvent('ArrowRight')) 92 .call(this.fireMockEvent('ArrowRight'))
94 .expectSpeech('Link', 'Menu', 'apple Link ', 'Menu item', ' 1 of 3 ') 93 .expectSpeech('Link', 'Menu', 'apple Link ', 'Menu item', ' 1 of 3 ')
95 .call(this.fireMockEvent('ArrowUp')) 94 .call(this.fireMockEvent('ArrowUp'))
96 .expectSpeech( 'banana Link ', 'Menu item', ' 3 of 3 ') 95 .expectSpeech( 'banana Link ', 'Menu item', ' 3 of 3 ')
97 .call(this.fireMockEvent('Enter')) 96 .call(this.fireMockEvent('Enter'))
98 .expectSpeech( 'apple', 'Link', /data[\s\S]*window/) 97 .expectSpeech('banana', 'Link', /data.*window/)
99 .expectSpeech('banana', 'Link')
100 .replay(); 98 .replay();
101 }); 99 });
102 }); 100 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698