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

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

Issue 1319093003: Use new earcons in ChromeVox Next. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@automation_node_id_fix_2
Patch Set: Address feedback, add test Created 5 years, 2 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 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 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 '../../testing/assert_additions.js']); 7 '../../testing/assert_additions.js']);
8 8
9 GEN_INCLUDE(['../../testing/mock_feedback.js']); 9 GEN_INCLUDE(['../../testing/mock_feedback.js']);
10 10
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 mockFeedback.call(quest.focus.bind(quest)) 361 mockFeedback.call(quest.focus.bind(quest))
362 .expectSpeech('Grail', 'Edit text') 362 .expectSpeech('Grail', 'Edit text')
363 .call(color.focus.bind(color)) 363 .call(color.focus.bind(color))
364 .expectSpeech('Blue', 'Edit text') 364 .expectSpeech('Blue', 'Edit text')
365 .call(name.focus.bind(name)) 365 .call(name.focus.bind(name))
366 .expectNextSpeechUtteranceIsNot('Blue') 366 .expectNextSpeechUtteranceIsNot('Blue')
367 .expectSpeech('Lancelot', 'Edit text'); 367 .expectSpeech('Lancelot', 'Edit text');
368 mockFeedback.replay(); 368 mockFeedback.replay();
369 }.bind(this)); 369 }.bind(this));
370 }); 370 });
371
372 TEST_F('BackgroundTest', 'EarconsForControls', function() {
373 var mockFeedback = this.createMockFeedback();
374 this.runWithLoadedTree(
375 function() {/*!
376 <p>Initial focus will be on something that's not a control.</p>
377 <a href="#">MyLink</a>
378 <button>MyButton</button>
379 <input type=checkbox>
380 <input type=checkbox checked>
381 <input>
382 <select multiple><option>1</option></select>
383 <select><option>2</option></select>
384 <input type=range value=5>
385 */},
386 function(rootNode) {
387 var doCmd = this.doCmd.bind(this);
388
389 mockFeedback.call(doCmd('nextElement'))
390 .expectSpeech('MyLink')
391 .expectEarcon(cvox.Earcon.LINK)
392 .call(doCmd('nextElement'))
393 .expectSpeech('MyButton')
394 .expectEarcon(cvox.Earcon.BUTTON)
395 .call(doCmd('nextElement'))
396 .expectSpeech('Check box')
397 .expectEarcon(cvox.Earcon.CHECK_OFF)
398 .call(doCmd('nextElement'))
399 .expectSpeech('Check box')
400 .expectEarcon(cvox.Earcon.CHECK_ON)
401 .call(doCmd('nextElement'))
402 .expectSpeech('Edit text')
403 .expectEarcon(cvox.Earcon.EDITABLE_TEXT)
404 .call(doCmd('nextElement'))
405 .expectSpeech('List box')
406 .expectEarcon(cvox.Earcon.LISTBOX)
407 .call(doCmd('nextElement'))
408 .expectSpeech('Button', 'has pop up')
409 .expectEarcon(cvox.Earcon.POP_UP_BUTTON)
410 .call(doCmd('nextElement'))
411 .expectSpeech(/slider/)
412 .expectEarcon(cvox.Earcon.SLIDER);
413
414 mockFeedback.replay();
415 }.bind(this));
416 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698