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

Side by Side Diff: ui/file_manager/integration_tests/testing_provider/background.js

Issue 1145893002: Add a test for requesting mount via a context menu in Files app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 'use strict';
6
7 var dialogSettings = {};
8
9 chrome.fileSystemProvider.onGetMetadataRequested.addListener(
10 function(options, onSuccess, onError) {
11 onSuccess({
12 isDirectory: true,
13 name: '',
14 size: 0,
15 modificationTime: new Date()
16 });
17 });
18
19 chrome.fileSystemProvider.onReadDirectoryRequested.addListener(
20 function(options, onSuccess, onError) {
21 onSuccess([], false /* hasMore */);
22 });
23
24 chrome.fileSystemProvider.onMountRequested.addListener(
25 function(onSuccess, onError) {
26 chrome.fileSystemProvider.getAll(function(mounted) {
27 var index = mounted.length + 1;
28 chrome.fileSystemProvider.mount({
29 fileSystemId: 'test-fs-' + index,
30 displayName: 'Test (' + index + ')'
31 });
32 });
33 });
34
35 chrome.fileSystemProvider.onUnmountRequested.addListener(
36 function(options, onSuccess, onError) {
37 chrome.fileSystemProvider.unmount(
38 {
39 fileSystemId: options.fileSystemId
40 },
41 function() {
42 if (chrome.runtime.lastError)
43 onError(chrome.runtime.lastError.message);
44 else
45 onSuccess();
46 });
47 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698