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

Side by Side Diff: chrome/test/data/extensions/api_test/fileapi/background.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 console.log("Requesting a filesystem...");
8 webkitRequestFileSystem(window.TEMPORARY, 100, getFileSystem, errorCallback);
9
10 function getFileSystem(fs) {
11 fileSystem = fs;
12 console.log("DONE requesting filesystem: " + fileSystem.name);
13 fileSystem.root.getDirectory('dir', {create:true},
14 directoryCallback, errorCallback);
15 }
16
17 function directoryCallback(directory) {
18 console.log("DONE creating directory: " + directory.path);
19 directory.getFile('file', {create:true}, fileCallback, errorCallback);
20 }
21
22 function fileCallback(file) {
23 console.log("DONE creating file: " + file.path);
24
25 // See if we get the same filesystem space in the tab.
26 console.log("Opening tab...");
27 chrome.tabs.create({
28 url: "tab.html"
29 });
30 }
31
32 function errorCallback(error) {
33 chrome.test.fail("Got unexpected error: " + error.code);
34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698