| 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(['chrome/browser/resources/chromeos/chromevox/testing/' + | 6 GEN_INCLUDE(['chrome/browser/resources/chromeos/chromevox/testing/' + |
| 7 'chromevox_e2e_test_base.js']); | 7 'chromevox_e2e_test_base.js']); |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Base test fixture for ChromeVox Next end to end tests. | 10 * Base test fixture for ChromeVox Next end to end tests. |
| 11 * | 11 * |
| 12 * These tests are identical to ChromeVoxE2ETests except for performing the | 12 * These tests are identical to ChromeVoxE2ETests except for performing the |
| 13 * necessary setup to run ChromeVox Next. | 13 * necessary setup to run ChromeVox Next. |
| 14 * @constructor | 14 * @constructor |
| 15 * @extends {ChromeVoxE2ETest} | 15 * @extends {ChromeVoxE2ETest} |
| 16 */ | 16 */ |
| 17 function ChromeVoxNextE2ETest() {} | 17 function ChromeVoxNextE2ETest() {} |
| 18 | 18 |
| 19 ChromeVoxNextE2ETest.prototype = { | 19 ChromeVoxNextE2ETest.prototype = { |
| 20 __proto__: ChromeVoxE2ETest.prototype, | 20 __proto__: ChromeVoxE2ETest.prototype, |
| 21 | 21 |
| 22 /** | 22 /** |
| 23 * This method is called without |this| bound to an instance of | 23 * This method is called without |this| bound to an instance of |
| 24 * ChromeVoxNextE2ETest. | 24 * ChromeVoxNextE2ETest. |
| 25 * @override | 25 * @override |
| 26 */ | 26 */ |
| 27 testGenCppIncludes: function() { | 27 testGenCppIncludes: function() { |
| 28 ChromeVoxE2ETest.prototype.testGenCppIncludes.call(this); | 28 ChromeVoxE2ETest.prototype.testGenCppIncludes.call(this); |
| 29 GEN('#include "base/command_line.h"'); | 29 GEN('#include "base/command_line.h"'); |
| 30 GEN('#include "chromeos/chromeos_switches.h"'); |
| 31 }, |
| 32 |
| 33 /** |
| 34 * This method is called without |this| bound to an instance of |
| 35 * ChromeVoxNextE2ETest. |
| 36 * @override |
| 37 */ |
| 38 testGenPreamble: function() { |
| 39 GEN_BLOCK(function() {/*! |
| 40 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 41 command_line->AppendSwitch(chromeos::switches::kEnableChromeVoxNext); |
| 42 */}); |
| 43 ChromeVoxE2ETest.prototype.testGenPreamble.call(this); |
| 30 }, | 44 }, |
| 31 | 45 |
| 32 runWithAutomation: function(doc, callback) { | 46 runWithAutomation: function(doc, callback) { |
| 33 this.runWithDocument(doc, function() { | 47 this.runWithDocument(doc, function() { |
| 34 chrome.automation.getTree(function(root) { | 48 chrome.automation.getTree(function(root) { |
| 35 callback(root); | 49 callback(root); |
| 36 }.bind(this)); | 50 }.bind(this)); |
| 37 }.bind(this)); | 51 }.bind(this)); |
| 38 } | 52 } |
| 39 }; | 53 }; |
| OLD | NEW |