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

Side by Side Diff: LayoutTests/fast/filesystem/resources/op-get-entry.js

Issue 22831019: Deprecate FileError in FileAPI (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: win test expectation fix (temporary) Created 7 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
1 var testCases = [ 1 var testCases = [
2 { 2 {
3 name: 'CreateSimple', 3 name: 'CreateSimple',
4 precondition: [ ], 4 precondition: [ ],
5 tests: [ 5 tests: [
6 function(helper) { helper.getDirectory('/', 'a', {create:true}); }, 6 function(helper) { helper.getDirectory('/', 'a', {create:true}); },
7 function(helper) { helper.getFile('/', 'b', {create:true}); } 7 function(helper) { helper.getFile('/', 'b', {create:true}); }
8 ], 8 ],
9 postcondition: [ 9 postcondition: [
10 {fullPath:'/a', isDirectory:true}, 10 {fullPath:'/a', isDirectory:true},
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 precondition: [ 47 precondition: [
48 {fullPath:'/a', isDirectory:true}, 48 {fullPath:'/a', isDirectory:true},
49 ], 49 ],
50 tests: [ 50 tests: [
51 function(helper) { helper.getDirectory('/a', './b', {create:true}); }, 51 function(helper) { helper.getDirectory('/a', './b', {create:true}); },
52 function(helper) { helper.getDirectory('/a', '../b', {create:true}); }, 52 function(helper) { helper.getDirectory('/a', '../b', {create:true}); },
53 function(helper) { helper.getDirectory('/a', '../../b/c', {create:tr ue}); }, 53 function(helper) { helper.getDirectory('/a', '../../b/c', {create:tr ue}); },
54 function(helper) { helper.getDirectory('/a', '/a/../../d', {create:t rue}); }, 54 function(helper) { helper.getDirectory('/a', '/a/../../d', {create:t rue}); },
55 function(helper) { helper.getDirectory('/a', '/a/../../b/./c/../../. ./../../e', {create:true}); }, 55 function(helper) { helper.getDirectory('/a', '/a/../../b/./c/../../. ./../../e', {create:true}); },
56 // TODO(jschuh): Re-enable after crbug.com/181617 is fixed. 56 // TODO(jschuh): Re-enable after crbug.com/181617 is fixed.
57 //function(helper) { helper.getDirectory('/a', '/a/../.../g', {creat e:true}, FileError.NOT_FOUND_ERR); }, 57 //function(helper) { helper.getDirectory('/a', '/a/../.../g', {creat e:true}, 'NotFoundError'); },
58 function(helper) { helper.getFile('/a', './b.txt', {create:true}); } , 58 function(helper) { helper.getFile('/a', './b.txt', {create:true}); } ,
59 function(helper) { helper.getFile('/a', '../b.txt', {create:true}); }, 59 function(helper) { helper.getFile('/a', '../b.txt', {create:true}); },
60 function(helper) { helper.getFile('/a', '../../b/c.txt', {create:tru e}); }, 60 function(helper) { helper.getFile('/a', '../../b/c.txt', {create:tru e}); },
61 function(helper) { helper.getFile('/a', '/a/../../d.txt', {create:tr ue}); }, 61 function(helper) { helper.getFile('/a', '/a/../../d.txt', {create:tr ue}); },
62 function(helper) { helper.getFile('/a', '/a/../../b/./c/../../../../ ../e.txt', {create:true}); }, 62 function(helper) { helper.getFile('/a', '/a/../../b/./c/../../../../ ../e.txt', {create:true}); },
63 // TODO(jschuh): Re-enable after crbug.com/181617 is fixed. 63 // TODO(jschuh): Re-enable after crbug.com/181617 is fixed.
64 //function(helper) { helper.getFile('/a', '/a/../.../g.txt', {create :true}, FileError.NOT_FOUND_ERR); }, 64 //function(helper) { helper.getFile('/a', '/a/../.../g.txt', {create :true}, 'NotFoundError'); },
65 ], 65 ],
66 postcondition: [ 66 postcondition: [
67 {fullPath:'/a', isDirectory:true}, 67 {fullPath:'/a', isDirectory:true},
68 {fullPath:'/a/b', isDirectory:true}, 68 {fullPath:'/a/b', isDirectory:true},
69 {fullPath:'/b', isDirectory:true}, 69 {fullPath:'/b', isDirectory:true},
70 {fullPath:'/b/c', isDirectory:true}, 70 {fullPath:'/b/c', isDirectory:true},
71 {fullPath:'/d', isDirectory:true}, 71 {fullPath:'/d', isDirectory:true},
72 {fullPath:'/e', isDirectory:true}, 72 {fullPath:'/e', isDirectory:true},
73 {fullPath:'/f', nonexistent:true}, 73 {fullPath:'/f', nonexistent:true},
74 {fullPath:'/a/f', nonexistent:true}, 74 {fullPath:'/a/f', nonexistent:true},
(...skipping 21 matching lines...) Expand all
96 ], 96 ],
97 postcondition: [ 97 postcondition: [
98 {fullPath:'/a', isDirectory:true}, 98 {fullPath:'/a', isDirectory:true},
99 {fullPath:'/b'}, 99 {fullPath:'/b'},
100 ], 100 ],
101 }, 101 },
102 { 102 {
103 name: 'GetNonExistent', 103 name: 'GetNonExistent',
104 precondition: [ ], 104 precondition: [ ],
105 tests: [ 105 tests: [
106 function(helper) { helper.getDirectory('/', 'a', {}, FileError.NOT_F OUND_ERR); }, 106 function(helper) { helper.getDirectory('/', 'a', {}, 'NotFoundError' ); },
107 function(helper) { helper.getFile('/', 'b', {}, FileError.NOT_FOUND_ ERR); }, 107 function(helper) { helper.getFile('/', 'b', {}, 'NotFoundError'); },
108 function(helper) { helper.getDirectory('/', '/nonexistent/a', {creat e:true}, FileError.NOT_FOUND_ERR); }, 108 function(helper) { helper.getDirectory('/', '/nonexistent/a', {creat e:true}, 'NotFoundError'); },
109 function(helper) { helper.getFile('/', '/nonexistent/b', {create:tru e}, FileError.NOT_FOUND_ERR); } 109 function(helper) { helper.getFile('/', '/nonexistent/b', {create:tru e}, 'NotFoundError'); }
110 ], 110 ],
111 postcondition: [ ], 111 postcondition: [ ],
112 }, 112 },
113 { 113 {
114 name: 'GetFileForDirectory', 114 name: 'GetFileForDirectory',
115 precondition: [ 115 precondition: [
116 {fullPath:'/a', isDirectory:true} 116 {fullPath:'/a', isDirectory:true}
117 ], 117 ],
118 tests: [ 118 tests: [
119 function(helper) { helper.getFile('/', 'a', {}, FileError.TYPE_MISMA TCH_ERR); }, 119 function(helper) { helper.getFile('/', 'a', {}, 'TypeMismatchError') ; },
120 function(helper) { helper.getFile('/', '/a', {}, FileError.TYPE_MISM ATCH_ERR); }, 120 function(helper) { helper.getFile('/', '/a', {}, 'TypeMismatchError' ); },
121 ], 121 ],
122 postcondition: [ 122 postcondition: [
123 {fullPath:'/a', isDirectory:true} 123 {fullPath:'/a', isDirectory:true}
124 ], 124 ],
125 }, 125 },
126 { 126 {
127 name: 'GetDirectoryForFile', 127 name: 'GetDirectoryForFile',
128 precondition: [ 128 precondition: [
129 {fullPath:'/a'} 129 {fullPath:'/a'}
130 ], 130 ],
131 tests: [ 131 tests: [
132 function(helper) { helper.getDirectory('/', 'a', {}, FileError.TYPE_ MISMATCH_ERR); }, 132 function(helper) { helper.getDirectory('/', 'a', {}, 'TypeMismatchEr ror'); },
133 function(helper) { helper.getDirectory('/', '/a', {}, FileError.TYPE _MISMATCH_ERR); }, 133 function(helper) { helper.getDirectory('/', '/a', {}, 'TypeMismatchE rror'); },
134 ], 134 ],
135 postcondition: [ 135 postcondition: [
136 {fullPath:'/a'} 136 {fullPath:'/a'}
137 ], 137 ],
138 }, 138 },
139 { 139 {
140 name: 'CreateWithExclusive', 140 name: 'CreateWithExclusive',
141 precondition: [ 141 precondition: [
142 {fullPath:'/a', isDirectory:true}, 142 {fullPath:'/a', isDirectory:true},
143 {fullPath:'/b'} 143 {fullPath:'/b'}
144 ], 144 ],
145 tests: [ 145 tests: [
146 function(helper) { helper.getDirectory('/', 'a', {create:true, exclu sive:true}, FileError.INVALID_MODIFICATION_ERR); }, 146 function(helper) { helper.getDirectory('/', 'a', {create:true, exclu sive:true}, 'InvalidModificationError'); },
147 function(helper) { helper.getFile('/', 'b', {create:true, exclusive: true}, FileError.INVALID_MODIFICATION_ERR); } 147 function(helper) { helper.getFile('/', 'b', {create:true, exclusive: true}, 'InvalidModificationError'); }
148 ], 148 ],
149 postcondition: [ 149 postcondition: [
150 {fullPath:'/a', isDirectory:true}, 150 {fullPath:'/a', isDirectory:true},
151 {fullPath:'/b'} 151 {fullPath:'/b'}
152 ], 152 ],
153 }, 153 },
154 ]; 154 ];
OLDNEW
« no previous file with comments | « LayoutTests/fast/filesystem/resources/op-copy.js ('k') | LayoutTests/fast/filesystem/resources/op-get-metadata.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698