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

Side by Side Diff: chrome/browser/ui/webui/options/startup_page_list_browsertest.js

Issue 2174743002: Revert disabled test for crbug/419370 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 * installed. 115 * installed.
116 * @param {string} type A type of mouse event (e.g. 'drop'). 116 * @param {string} type A type of mouse event (e.g. 'drop').
117 * @return {!Event} A fake mouse event. 117 * @return {!Event} A fake mouse event.
118 */ 118 */
119 function createMouseEvent(type) { 119 function createMouseEvent(type) {
120 var event = new MouseEvent(type, {bubbles: true, cancelable: true}); 120 var event = new MouseEvent(type, {bubbles: true, cancelable: true});
121 MockDataTransfer.install(event); 121 MockDataTransfer.install(event);
122 return event; 122 return event;
123 } 123 }
124 124
125 // Disabled due to: crbug.com/419370 125 // Disabled due to: crbug.com/419370
Dan Beam 2016/07/23 00:44:06 nit: remove this or change it to "Disable if flaky
126 TEST_F('StartupPageListWebUITest', 'DISABLED_testDropFromOutsideSource', 126 TEST_F('StartupPageListWebUITest', 'testDropFromOutsideSource',
127 function() { 127 function() {
128 /** @const */ var NEW_PAGE = 'http://google.com'; 128 /** @const */ var NEW_PAGE = 'http://google.com';
129 129
130 var mockDropEvent = createMouseEvent('drop'); 130 var mockDropEvent = createMouseEvent('drop');
131 mockDropEvent.dataTransfer.setData('url', NEW_PAGE); 131 mockDropEvent.dataTransfer.setData('url', NEW_PAGE);
132 132
133 this.mockHandler.expects(once()).addStartupPage([NEW_PAGE, 0]); 133 this.mockHandler.expects(once()).addStartupPage([NEW_PAGE, 0]);
134 134
135 this.getList().items[0].dispatchEvent(mockDropEvent); 135 this.getList().items[0].dispatchEvent(mockDropEvent);
136 136
137 expectTrue(mockDropEvent.defaultPrevented); 137 expectTrue(mockDropEvent.defaultPrevented);
138 }); 138 });
139 139
140 // Disabled due to: crbug.com/419370 140 // Disabled due to: crbug.com/419370
Dan Beam 2016/07/23 00:44:06 same
141 TEST_F('StartupPageListWebUITest', 'DISABLED_testDropToReorder', function() { 141 TEST_F('StartupPageListWebUITest', 'testDropToReorder', function() {
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 }());
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698