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

Side by Side Diff: chrome/test/data/extensions/api_test/file_system_provider/unmount/test.js

Issue 703123003: [fsp] Pass more detailed errors to the providing extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a bug. Created 6 years, 1 month 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 | « chrome/test/data/extensions/api_test/file_system_provider/notify/test.js ('k') | 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 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 * @type {string} 8 * @type {string}
9 * @const 9 * @const
10 */ 10 */
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 chrome.fileSystemProvider.unmount( 63 chrome.fileSystemProvider.unmount(
64 {fileSystemId: FIRST_FILE_SYSTEM_ID}, 64 {fileSystemId: FIRST_FILE_SYSTEM_ID},
65 chrome.test.callbackPass()); 65 chrome.test.callbackPass());
66 }, 66 },
67 67
68 // Tests the fileSystemProvider.unmount() with a wrong id. Verifies that 68 // Tests the fileSystemProvider.unmount() with a wrong id. Verifies that
69 // it fails with a correct error code. 69 // it fails with a correct error code.
70 function unmountWrongId() { 70 function unmountWrongId() {
71 chrome.fileSystemProvider.unmount( 71 chrome.fileSystemProvider.unmount(
72 {fileSystemId: 'wrong-fs-id'}, 72 {fileSystemId: 'wrong-fs-id'},
73 chrome.test.callbackFail('SECURITY')); 73 chrome.test.callbackFail('NOT_FOUND'));
74 }, 74 },
75 75
76 // Tests if fileManagerPrivate.removeMount() for provided file systems emits 76 // Tests if fileManagerPrivate.removeMount() for provided file systems emits
77 // the onMountRequested() event with correct arguments. 77 // the onMountRequested() event with correct arguments.
78 function requestUnmountSuccess() { 78 function requestUnmountSuccess() {
79 var onUnmountRequested = chrome.test.callbackPass( 79 var onUnmountRequested = chrome.test.callbackPass(
80 function(options, onSuccess, onError) { 80 function(options, onSuccess, onError) {
81 chrome.test.assertEq(SECOND_FILE_SYSTEM_ID, options.fileSystemId); 81 chrome.test.assertEq(SECOND_FILE_SYSTEM_ID, options.fileSystemId);
82 // Not calling fileSystemProvider.unmount(), so the onMountCompleted 82 // Not calling fileSystemProvider.unmount(), so the onMountCompleted
83 // event will not be raised. 83 // event will not be raised.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 test_util.getVolumeInfo(SECOND_FILE_SYSTEM_ID, function(volumeInfo) { 133 test_util.getVolumeInfo(SECOND_FILE_SYSTEM_ID, function(volumeInfo) {
134 chrome.test.assertTrue(!!volumeInfo); 134 chrome.test.assertTrue(!!volumeInfo);
135 chrome.fileManagerPrivate.removeMount(volumeInfo.volumeId); 135 chrome.fileManagerPrivate.removeMount(volumeInfo.volumeId);
136 }); 136 });
137 } 137 }
138 ]); 138 ]);
139 } 139 }
140 140
141 // Setup and run all of the test cases. 141 // Setup and run all of the test cases.
142 setUp(runTests); 142 setUp(runTests);
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/file_system_provider/notify/test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698