| 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 * Tests if the files initially added by the C++ side are displayed, and | 8 * Tests if the files initially added by the C++ side are displayed, and |
| 9 * that a subsequently added file shows up. | 9 * that a subsequently added file shows up. |
| 10 * | 10 * |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 fileDisplay(RootPath.DOWNLOADS); | 48 fileDisplay(RootPath.DOWNLOADS); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 testcase.fileDisplayDrive = function() { | 51 testcase.fileDisplayDrive = function() { |
| 52 fileDisplay(RootPath.DRIVE); | 52 fileDisplay(RootPath.DRIVE); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 testcase.fileDisplayMtp = function() { | 55 testcase.fileDisplayMtp = function() { |
| 56 var appId; | 56 var appId; |
| 57 var MTP_VOLUME_QUERY = '#directory-tree > .tree-item > .tree-row > ' + | 57 var MTP_VOLUME_QUERY = '#directory-tree > .tree-item > .tree-row > ' + |
| 58 '.volume-icon[volume-type-icon="mtp"]'; | 58 '.item-icon[volume-type-icon="mtp"]'; |
| 59 | 59 |
| 60 StepsRunner.run([ | 60 StepsRunner.run([ |
| 61 function() { | 61 function() { |
| 62 setupAndWaitUntilReady(null, RootPath.DOWNLOADS, this.next); | 62 setupAndWaitUntilReady(null, RootPath.DOWNLOADS, this.next); |
| 63 }, | 63 }, |
| 64 // Mount a fake MTP volume. | 64 // Mount a fake MTP volume. |
| 65 function(inAppId, files) { | 65 function(inAppId, files) { |
| 66 appId = inAppId; | 66 appId = inAppId; |
| 67 chrome.test.sendMessage(JSON.stringify({name: 'mountFakeMtp'}), | 67 chrome.test.sendMessage(JSON.stringify({name: 'mountFakeMtp'}), |
| 68 this.next); | 68 this.next); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 81 remoteCall.waitForFiles( | 81 remoteCall.waitForFiles( |
| 82 appId, | 82 appId, |
| 83 TestEntryInfo.getExpectedRows(BASIC_FAKE_ENTRY_SET), | 83 TestEntryInfo.getExpectedRows(BASIC_FAKE_ENTRY_SET), |
| 84 {ignoreLastModifiedTime: true}).then(this.next); | 84 {ignoreLastModifiedTime: true}).then(this.next); |
| 85 }, | 85 }, |
| 86 function() { | 86 function() { |
| 87 checkIfNoErrorsOccured(this.next); | 87 checkIfNoErrorsOccured(this.next); |
| 88 } | 88 } |
| 89 ]); | 89 ]); |
| 90 }; | 90 }; |
| OLD | NEW |