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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/filesystem/cross-filesystem-op.html

Issue 2537193003: Make fast/filesystem/cross-filesystem-op.html insensitive to test order (Closed)
Patch Set: Make a few more tests clean up when done Created 4 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
OLDNEW
1 <html> 1 <html>
2 <body> 2 <body>
3 <script src="resources/fs-test-util.js"></script>
3 <div>This tests basic cross-filesystem operations.</div> 4 <div>This tests basic cross-filesystem operations.</div>
4 5
5 <div id="destination" style="min-height:100px; border: solid 1px black">Drop fil es here if you test this manually</div> 6 <div id="destination" style="min-height:100px; border: solid 1px black">Drop fil es here if you test this manually</div>
6 7
7 <div id="console"></div> 8 <div id="console"></div>
8 9
9 <script> 10 <script>
10 var methods = [ 'copyTo', 'moveTo' ]; 11 var methods = [ 'copyTo', 'moveTo' ];
11 var sourceTestDirectory, destTestDirectory; 12 var sourceTestDirectory, destTestDirectory;
12 13
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 return function(e) { 52 return function(e) {
52 console.log(e); 53 console.log(e);
53 log('ERROR:' + msg + ': ' + e.name); 54 log('ERROR:' + msg + ': ' + e.name);
54 if (window.testRunner) 55 if (window.testRunner)
55 testRunner.notifyDone(); 56 testRunner.notifyDone();
56 }; 57 };
57 } 58 }
58 59
59 function setupDestFileSystem(successCallback) { 60 function setupDestFileSystem(successCallback) {
60 webkitRequestFileSystem(window.TEMPORARY, 1024, function (fs) { 61 webkitRequestFileSystem(window.TEMPORARY, 1024, function (fs) {
61 fs.root.getDirectory( 62 removeAllInDirectory(fs.root, function() {
62 destDirectoryPath, 63 fs.root.getDirectory(
63 {create:true}, 64 destDirectoryPath,
64 function (entry) { 65 {create:true},
65 destTestDirectory = entry; 66 function (entry) {
66 successCallback(); 67 destTestDirectory = entry;
67 }, 68 successCallback();
68 errorCallback('dest: createDirectory(' + destDirectoryPath + ')')); 69 },
70 errorCallback('dest: createDirectory(' + destDirectoryPath + ')')) ;
jeffcarp 2016/11/29 21:38:28 Just curious, are ES2015 template strings OK for l
jsbell 2016/11/29 21:41:15 Sure.
71 }, errorCallback('dest: removeAllInDirectory'));
69 }, errorCallback('dest: requestFileSystem for PERSISTENT')); 72 }, errorCallback('dest: requestFileSystem for PERSISTENT'));
70 } 73 }
71 74
72 function runTests(index, successCallback) { 75 function runTests(index, successCallback) {
73 if (index >= tests.length) { 76 if (index >= tests.length) {
74 successCallback(); 77 successCallback();
75 return; 78 return;
76 } 79 }
77 var next = function() { runTests(index + 1, successCallback); }; 80 var next = function() { runTests(index + 1, successCallback); };
78 resetDirectory(destTestDirectory, function() { tests[index](next); }); 81 resetDirectory(destTestDirectory, function() { tests[index](next); });
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 258
256 eventSender.beginDragWithFiles([sourceDirectoryPath]); 259 eventSender.beginDragWithFiles([sourceDirectoryPath]);
257 eventSender.leapForward(100); 260 eventSender.leapForward(100);
258 eventSender.mouseMoveTo(destination.offsetLeft + 10, destination.offsetTop + destination.offsetHeight / 2); 261 eventSender.mouseMoveTo(destination.offsetLeft + 10, destination.offsetTop + destination.offsetHeight / 2);
259 eventSender.mouseUp(); 262 eventSender.mouseUp();
260 } 263 }
261 264
262 </script> 265 </script>
263 </body> 266 </body>
264 </html> 267 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698