| 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 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Expected autocomplete results for 'hello'. | 8 * Expected autocomplete results for 'hello'. |
| 9 * @type {Array<string>} | 9 * @type {Array<string>} |
| 10 * @const | 10 * @const |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 * the results for that query. | 202 * the results for that query. |
| 203 */ | 203 */ |
| 204 testcase.clickFirstSearchResult = function() { | 204 testcase.clickFirstSearchResult = function() { |
| 205 var appId; | 205 var appId; |
| 206 var steps = getStepsForSearchResultsAutoComplete(); | 206 var steps = getStepsForSearchResultsAutoComplete(); |
| 207 steps.push( | 207 steps.push( |
| 208 function(id) { | 208 function(id) { |
| 209 appId = id; | 209 appId = id; |
| 210 remoteCall.callRemoteTestUtil( | 210 remoteCall.callRemoteTestUtil( |
| 211 'fakeKeyDown', appId, | 211 'fakeKeyDown', appId, |
| 212 ['#autocomplete-list', 'Down', false, false, false], | 212 ['#autocomplete-list', 'ArrowDown', 'Down', false, false, false], |
| 213 this.next); | 213 this.next); |
| 214 }, | 214 }, |
| 215 function(result) { | 215 function(result) { |
| 216 chrome.test.assertTrue(result); | 216 chrome.test.assertTrue(result); |
| 217 remoteCall.waitForElement( | 217 remoteCall.waitForElement( |
| 218 appId, | 218 appId, |
| 219 ['#autocomplete-list li[selected]']). | 219 ['#autocomplete-list li[selected]']). |
| 220 then(this.next); | 220 then(this.next); |
| 221 }, | 221 }, |
| 222 function(result) { | 222 function(result) { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 253 function(id) { | 253 function(id) { |
| 254 appId = id; | 254 appId = id; |
| 255 remoteCall.callRemoteTestUtil( | 255 remoteCall.callRemoteTestUtil( |
| 256 'fakeEvent', appId, | 256 'fakeEvent', appId, |
| 257 ['#search-box input', 'focus'], | 257 ['#search-box input', 'focus'], |
| 258 this.next); | 258 this.next); |
| 259 }, | 259 }, |
| 260 function(result) { | 260 function(result) { |
| 261 remoteCall.callRemoteTestUtil( | 261 remoteCall.callRemoteTestUtil( |
| 262 'fakeKeyDown', appId, | 262 'fakeKeyDown', appId, |
| 263 ['#search-box input', 'Enter', false, false, false], | 263 ['#search-box input', 'Enter', 'Enter', false, false, false], |
| 264 this.next); | 264 this.next); |
| 265 }, | 265 }, |
| 266 function(result) { | 266 function(result) { |
| 267 remoteCall.waitForFileListChange(appId, BASIC_DRIVE_ENTRY_SET.length). | 267 remoteCall.waitForFileListChange(appId, BASIC_DRIVE_ENTRY_SET.length). |
| 268 then(this.next); | 268 then(this.next); |
| 269 }, | 269 }, |
| 270 function(actualFilesAfter) { | 270 function(actualFilesAfter) { |
| 271 chrome.test.assertEq( | 271 chrome.test.assertEq( |
| 272 TestEntryInfo.getExpectedRows(SEARCH_RESULTS_ENTRY_SET).sort(), | 272 TestEntryInfo.getExpectedRows(SEARCH_RESULTS_ENTRY_SET).sort(), |
| 273 actualFilesAfter); | 273 actualFilesAfter); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 return repeatUntil(function() { | 338 return repeatUntil(function() { |
| 339 return remoteCall.callRemoteTestUtil( | 339 return remoteCall.callRemoteTestUtil( |
| 340 'getPreferences', null, []).then(function(preferences) { | 340 'getPreferences', null, []).then(function(preferences) { |
| 341 return preferences.cellularDisabled ? | 341 return preferences.cellularDisabled ? |
| 342 pending('Drive sync is still disabled.') : null; | 342 pending('Drive sync is still disabled.') : null; |
| 343 }); | 343 }); |
| 344 }); | 344 }); |
| 345 }); | 345 }); |
| 346 })); | 346 })); |
| 347 }; | 347 }; |
| OLD | NEW |