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.
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);
13 chrome.fileSystem.restoreEntry(id, chrome.test.callbackPass(
14 function(restoredEntry) {
15 chrome.test.assertEq(restoredEntry, entry);