OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 /** | 5 /** |
6 * Fixture for startup pages WebUI tests. | 6 * Fixture for startup pages WebUI tests. |
7 * @extends {testing.Test} | 7 * @extends {testing.Test} |
8 * @constructor | 8 * @constructor |
9 */ | 9 */ |
10 function StartupPageListWebUITest() {} | 10 function StartupPageListWebUITest() {} |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 (function() { | 67 (function() { |
68 | 68 |
69 /** | 69 /** |
70 * A mock data transfer object for drag/drop events. | 70 * A mock data transfer object for drag/drop events. |
71 * @constructor | 71 * @constructor |
72 */ | 72 */ |
73 function MockDataTransfer() { | 73 function MockDataTransfer() { |
74 /** | 74 /** |
75 * The data this dataTransfer object knows about. | 75 * The data this dataTransfer object knows about. |
76 * @type {!Object.<string, string>} | 76 * @type {!Object<string, string>} |
77 * @private | 77 * @private |
78 */ | 78 */ |
79 this.data_ = {}; | 79 this.data_ = {}; |
80 } | 80 } |
81 | 81 |
82 /** | 82 /** |
83 * Installs a lazily created MockDataTransfer on event#dataTransfer. | 83 * Installs a lazily created MockDataTransfer on event#dataTransfer. |
84 * @param {!Event} event An event to modify. | 84 * @param {!Event} event An event to modify. |
85 */ | 85 */ |
86 MockDataTransfer.install = function(event) { | 86 MockDataTransfer.install = function(event) { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // TODO(dbeam): mock4js doesn't handle complex arguments well. Fix this. | 142 // TODO(dbeam): mock4js doesn't handle complex arguments well. Fix this. |
143 this.mockHandler.expects(once()).dragDropStartupPage([0, [1].join()]); | 143 this.mockHandler.expects(once()).dragDropStartupPage([0, [1].join()]); |
144 | 144 |
145 this.getList().selectionModel.selectedIndex = 1; | 145 this.getList().selectionModel.selectedIndex = 1; |
146 expectEquals(1, this.getList().selectionModel.selectedIndexes.length); | 146 expectEquals(1, this.getList().selectionModel.selectedIndexes.length); |
147 | 147 |
148 this.getList().items[0].dispatchEvent(createMouseEvent('drop')); | 148 this.getList().items[0].dispatchEvent(createMouseEvent('drop')); |
149 }); | 149 }); |
150 | 150 |
151 }()); | 151 }()); |
OLD | NEW |