Upstream version 5.34.92.0
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / file_system_provider / mount / test.js
1 // Copyright 2013 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 chrome.test.runTests([
6   function goodDisplayName() {
7     chrome.fileSystemProvider.mount(
8       'test file system',
9       function(fileSystemId) {
10         chrome.test.assertEq('string', typeof(fileSystemId));
11         chrome.test.assertTrue(fileSystemId != '');
12         chrome.test.succeed();
13       },
14       function(error) {
15         chrome.test.fail();
16       }
17     );
18   },
19   function emptyDisplayName() {
20     chrome.fileSystemProvider.mount(
21       '',
22       function(fileSystemId) {
23         chrome.test.fail();
24       },
25       function(error) {
26         chrome.test.assertEq('SecurityError', error.name);
27         chrome.test.succeed();
28       }
29     );
30   },
31 ]);