- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / file_system / retain_entry / test_other_window.js
1 // Copyright (c) 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.fileSystem.chooseEntry({type: 'openFile'},
6     chrome.test.callbackPass(function(entry) {
7   var id = chrome.fileSystem.retainEntry(entry);
8   chrome.test.assertTrue(id != null);
9   chrome.fileSystem.isRestorable(id, chrome.test.callbackPass(
10       function(isRestorable) {
11     chrome.test.assertTrue(isRestorable);
12   }));
13   chrome.fileSystem.restoreEntry(id, chrome.test.callbackPass(
14       function(restoredEntry) {
15     chrome.test.assertEq(restoredEntry, entry);
16   }));
17   callback(id, entry);
18 }));