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

[fsp] [reupload] 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.

This patch has been once reverted due to a bug. See:
https://codereview.chromium.org/527663002/

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

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

Cr-Commit-Position: refs/heads/master@{#293285}
parent 6dcf1db7
......@@ -120,4 +120,9 @@ IN_PROC_BROWSER_TEST_F(FileSystemProviderApiTest, WriteFile) {
<< message_;
}
IN_PROC_BROWSER_TEST_F(FileSystemProviderApiTest, Extension) {
ASSERT_TRUE(RunComponentExtensionTest("file_system_provider/extension"))
<< message_;
}
} // namespace extensions
......@@ -559,7 +559,7 @@
}],
"fileSystemProvider": {
"channel": "dev",
"extension_types": ["platform_app"]
"extension_types": ["extension", "platform_app"]
},
"firstRunPrivate": {
"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