Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Side by Side Diff: chrome/test/data/extensions/api_test/file_system/retain_entry/test.js

Issue 14607023: Add support for persistent file access in apps. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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 retainEntryWorks() {
7 chrome.app.window.create('test_other_window.html', chrome.test.callbackPass(
8 function(otherWindow) {
9 otherWindow.contentWindow.callback = chrome.test.callbackPass(
10 function(id, entry) {
11 otherWindow.close();
12 chrome.fileSystem.isRestorable(id, chrome.test.callbackPass(
13 function(isRestorable) {
14 chrome.test.assertTrue(isRestorable);
15 }));
16 chrome.test.assertEq(chrome.fileSystem.retainEntry(entry), id);
17 chrome.fileSystem.restoreEntry(id, chrome.test.callbackPass(
18 function(restoredEntry) {
19 chrome.test.assertEq(restoredEntry, entry);
20 chrome.test.assertEq(
21 chrome.fileSystem.retainEntry(restoredEntry), id);
22 checkEntry(restoredEntry, 'writable.txt', false /* isNew */,
23 false /*shouldBeWritable */);
24 }));
25 });
26 }));
27 }
28 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698