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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs

Issue 2255923002: Turn Browser Context Menu Async (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Vox Tests Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/renderer_context_menu/views/toolkit_delegate_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
index 19dde92b495c6fa3627c195e282d2777d8b6a7e3..e2aa0efc97a1fa69fd39176fbdf801145fa61048 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
@@ -276,20 +276,14 @@ TEST_F('BackgroundTest', 'ShowContextMenu', function() {
var mockFeedback = this.createMockFeedback();
this.runWithLoadedTree('<p>before</p><a href="a">a</a>',
function(rootNode) {
- mockFeedback.expectSpeech(/menu opened/)
- .call(function() {
- // When shown, the context menu pushes a new message loop so test
- // messages sent to the browser do not get processed. Ensure we
- // exit the context menu here.
- go.showContextMenu();
- });
- mockFeedback.replay();
-
var go = rootNode.find({ role: RoleType.link });
- this.listenOnce(go, 'focus', function(e) {
- doCmd('contextMenu')();
- }.bind(this), true);
- go.focus();
+ // Menus no longer nest a message loop, so we can launch menu and confirm
+ // expected speech. The menu will not block test shutdown.
+ mockFeedback.call(go.focus.bind(go))
+ .expectSpeech('a', 'Link')
+ .call(doCmd('contextMenu'))
+ .expectSpeech(/menu opened/);
+ mockFeedback.replay();
}.bind(this));
});
« no previous file with comments | « no previous file | components/renderer_context_menu/views/toolkit_delegate_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698