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

Side by Side Diff: chrome/test/data/fileapi/common.js

Issue 10831023: Move over a bunch of tests from browser_tests to content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | 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 function debug(message)
6 {
7 document.getElementById('status').innerHTML += '<br/>' + message;
8 }
9
10 function done(message)
11 {
12 if (document.location.hash == '#fail')
13 return;
14 if (message)
15 debug('PASS: ' + message);
16 else
17 debug('PASS');
18 document.location.hash = '#pass';
19 }
20
21 function fail(message)
22 {
23 debug('FAILED: ' + message);
24 document.location.hash = '#fail';
25 }
26
27 function getLog()
28 {
29 return '' + document.getElementById('status').innerHTML;
30 }
31
32 function fileErrorToString(e)
33 {
34 switch (e.code) {
35 case FileError.QUOTA_EXCEEDED_ERR:
36 return 'QUOTA_EXCEEDED_ERR';
37 case FileError.NOT_FOUND_ERR:
38 return 'NOT_FOUND_ERR';
39 case FileError.SECURITY_ERR:
40 return 'SECURITY_ERR';
41 case FileError.INVALID_MODIFICATION_ERR:
42 return 'INVALID_MODIFICATION_ERR';
43 case FileError.INVALID_STATE_ERR:
44 return 'INVALID_STATE_ERR';
45 default:
46 return 'Unknown Error';
47 }
48 }
49
50 function unexpectedErrorCallback(e)
51 {
52 fail('unexpectedErrorCallback:' + fileErrorToString(e));
53 }
OLDNEW
« no previous file with comments | « chrome/test/data/device_orientation/device_orientation_test.html ('k') | chrome/test/data/fileapi/create_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698