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 test fixture. | 5 // Include test fixture. |
6 GEN_INCLUDE(['chromevox_e2e_test_base.js']); | 6 GEN_INCLUDE(['chromevox_e2e_test_base.js']); |
7 | 7 |
8 /** | 8 /** |
9 * Base test fixture for ChromeVox Next end to end tests. | 9 * Base test fixture for ChromeVox Next end to end tests. |
10 * | 10 * |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 chrome.tabs.create(createParams); | 73 chrome.tabs.create(createParams); |
74 }.bind(this)); | 74 }.bind(this)); |
75 }, | 75 }, |
76 | 76 |
77 listenOnce: function(node, eventType, callback, capture) { | 77 listenOnce: function(node, eventType, callback, capture) { |
78 var innerCallback = this.newCallback(function() { | 78 var innerCallback = this.newCallback(function() { |
79 node.removeEventListener(eventType, innerCallback, capture); | 79 node.removeEventListener(eventType, innerCallback, capture); |
80 callback.apply(this, arguments); | 80 callback.apply(this, arguments); |
81 }); | 81 }); |
82 node.addEventListener(eventType, innerCallback, capture); | 82 node.addEventListener(eventType, innerCallback, capture); |
| 83 }, |
| 84 |
| 85 /** |
| 86 * Forces output to place context utterances at the end of output. This eases |
| 87 * rebaselining when changing context ordering for a specific role. |
| 88 */ |
| 89 forceContextualLastOutput: function() { |
| 90 for (var role in Output.ROLE_INFO_) |
| 91 Output.ROLE_INFO_[role]['outputContextFirst'] = undefined; |
83 } | 92 } |
84 }; | 93 }; |
OLD | NEW |