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

Unified Diff: chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/file_display.js

Issue 309263002: Add browser test for VOLUME_TYPE_MTP volumes on Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/background.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/file_display.js
diff --git a/chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/file_display.js b/chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/file_display.js
index 01ebd6b142c78bf5ec67fe0d069a51de7ba4724d..dacdc7d9429fbda4cccad5fabfb81ec2ac13d511 100644
--- a/chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/file_display.js
+++ b/chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/file_display.js
@@ -50,3 +50,39 @@ testcase.fileDisplayDownloads = function() {
testcase.fileDisplayDrive = function() {
fileDisplay(RootPath.DRIVE);
};
+
+testcase.fileDisplayMtp = function() {
+ var appId;
+ var MTP_VOLUME_QUERY = '#navigation-list > .root-item > ' +
+ '.volume-icon[volume-type-icon="mtp"]';
+
+ StepsRunner.run([
+ function() {
+ setupAndWaitUntilReady(null, RootPath.DOWNLOADS, this.next);
+ },
+ // Mount a fake MTP volume.
+ function(inAppId, files) {
+ appId = inAppId;
+ chrome.test.sendMessage(JSON.stringify({name: 'mountFakeMtp'}),
+ this.next);
+ },
+ // Wait for the mount.
+ function(result) {
+ chrome.test.assertTrue(JSON.parse(result));
+ waitForElement(appId, MTP_VOLUME_QUERY).then(this.next);
+ },
+ // Click the MTP volume.
+ function() {
+ callRemoteTestUtil(
+ 'fakeMouseClick', appId, [MTP_VOLUME_QUERY], this.next);
+ },
+ // Wait for the file list to change.
+ function(appIds) {
+ waitForFiles(appId, TestEntryInfo.getExpectedRows(BASIC_FAKE_ENTRY_SET),
+ {ignoreLastModifiedTime: true}).then(this.next);
+ },
+ function() {
+ checkIfNoErrorsOccured(this.next);
+ }
+ ]);
+};
« no previous file with comments | « chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698