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

Unified 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, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/file_system/retain_entry/test.js
diff --git a/chrome/test/data/extensions/api_test/file_system/retain_entry/test.js b/chrome/test/data/extensions/api_test/file_system/retain_entry/test.js
new file mode 100644
index 0000000000000000000000000000000000000000..9555e8e52d33d28fb2a812c6d79c02c2fa24d139
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/file_system/retain_entry/test.js
@@ -0,0 +1,28 @@
+// Copyright 2013 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.
+
+chrome.test.runTests([
+ function retainEntryWorks() {
+ chrome.app.window.create('test_other_window.html', chrome.test.callbackPass(
+ function(otherWindow) {
+ otherWindow.contentWindow.callback = chrome.test.callbackPass(
+ function(id, entry) {
+ otherWindow.close();
+ chrome.fileSystem.isRestorable(id, chrome.test.callbackPass(
+ function(isRestorable) {
+ chrome.test.assertTrue(isRestorable);
+ }));
+ chrome.test.assertEq(chrome.fileSystem.retainEntry(entry), id);
+ chrome.fileSystem.restoreEntry(id, chrome.test.callbackPass(
+ function(restoredEntry) {
+ chrome.test.assertEq(restoredEntry, entry);
+ chrome.test.assertEq(
+ chrome.fileSystem.retainEntry(restoredEntry), id);
+ checkEntry(restoredEntry, 'writable.txt', false /* isNew */,
+ false /*shouldBeWritable */);
+ }));
+ });
+ }));
+ }
+]);

Powered by Google App Engine
This is Rietveld 408576698