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

Side by Side Diff: chrome/test/data/extensions/api_test/fileapi/tab.js

Issue 8758008: Move another block of extension tests to manifest_version 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 var fileSystem = null;
6
7 function errorCallback(error) {
8 chrome.test.fail("Got unexpected error: " + error.code);
9 }
10
11 function successCallback(entry) {
12 chrome.test.succeed();
13 }
14
15 function successEntryCallback(entry) {
16 fileSystem.root.getDirectory('dir', {create:false},
17 function(directory) {
18 // Do clean-up. (Assume the tab won't be reloaded in testing.)
19 directory.removeRecursively(successCallback, errorCallback);
20 }, errorCallback);
21 }
22
23 chrome.test.runTests([function tab() {
24 console.log("Requesting a filesystem...");
25 webkitRequestFileSystem(window.TEMPORARY, 100, function(fs) {
26 fileSystem = fs;
27 // See if we get the same filesystem image.
28 console.log("DONE requesting filesystem: " + fileSystem.name);
29 fileSystem.root.getFile('dir/file', {create:false},
30 successEntryCallback, errorCallback);
31 }, errorCallback);
32 }]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698