Commit c171298e authored by mtomasz's avatar mtomasz Committed by Commit bot

[fsp] Enable the File System Provider API for extensions.

Previously, only apps were allowed to use this api, however most clients will
be actually written as extensions.

TEST=browser_tests: *FileSystemProvider*Extension*
BUG=409487

Review URL: https://codereview.chromium.org/527663002

Cr-Commit-Position: refs/heads/master@{#293100}
parent 03573630
...@@ -120,4 +120,10 @@ IN_PROC_BROWSER_TEST_F(FileSystemProviderApiTest, WriteFile) { ...@@ -120,4 +120,10 @@ IN_PROC_BROWSER_TEST_F(FileSystemProviderApiTest, WriteFile) {
<< message_; << message_;
} }
IN_PROC_BROWSER_TEST_F(FileSystemProviderApiTest, Extension) {
ASSERT_TRUE(RunPlatformAppTestWithFlags("file_system_provider/extension",
kFlagLoadAsComponent))
<< message_;
}
} // namespace extensions } // namespace extensions
...@@ -559,7 +559,7 @@ ...@@ -559,7 +559,7 @@
}], }],
"fileSystemProvider": { "fileSystemProvider": {
"channel": "dev", "channel": "dev",
"extension_types": ["platform_app"] "extension_types": ["extension", "platform_app"]
}, },
"firstRunPrivate": { "firstRunPrivate": {
"channel": "stable", "channel": "stable",
......
{{+partials.standard_extensions_api api:apis.extensions.fileSystemProvider intro:intros.fileSystemProvider/}}
{
"key": "MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDOuXEIuoK1kAkBe0SKiJn/N9oNn3oUxGa4dwj40MnJqPn+w0aR2vuyocm0R4Drp67aYwtLjOVPF4CICRq6ICP6eU07gGwQxGdZ7HJASXV8hm0tab5I70oJmRLfFJyVAMCeWlFaOGq05v2i6EbifZM0qO5xALKNGQt+yjXi5INM5wIBIw==",
"name": "chrome.fileSystemProvider.mount in extensions",
"version": "0.1",
"manifest_version": 2,
"description": "Test for chrome.fileSystemProvider.mount() in an extension.",
"permissions": ["fileSystemProvider", "fileBrowserPrivate"],
"background": {
"persistent": false,
"scripts": [
"chrome-extension://gfnblenhaahcnmfdbebgincjohfkbnch/test_util.js",
"test.js"
]
}
}
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
'use strict';
chrome.test.runTests([
// Tests if mounting succeeds when invoked from an extension. Note that all
// other tests are implemented as apps.
function mount() {
var onTestSuccess = chrome.test.callbackPass();
chrome.fileSystemProvider.mount(
{fileSystemId: 'file-system-id', displayName: 'file-system-name'},
function() {
onTestSuccess();
},
function(error) {
chrome.test.fail();
});
},
]);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment