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

Side by Side Diff: LayoutTests/http/tests/local/fileapi/resources/temp-file-utils.js

Issue 919973002: Emit debug info on failed deletion of temp file. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function createTempFile(fileName, fileData) 1 function createTempFile(fileName, fileData)
2 { 2 {
3 var xhr = new XMLHttpRequest(); 3 var xhr = new XMLHttpRequest();
4 xhr.open("POST", "http://127.0.0.1:8000/resources/write-temp-file.php?filena me=" + fileName + "&data=" + fileData, false); 4 xhr.open("POST", "http://127.0.0.1:8000/resources/write-temp-file.php?filena me=" + fileName + "&data=" + fileData, false);
5 xhr.send(); 5 xhr.send();
6 if (xhr.status != 200) { 6 if (xhr.status != 200) {
7 testFailed("Unexpected response status received: " + xhr.status); 7 testFailed("Unexpected response status received: " + xhr.status);
8 return; 8 return;
9 } 9 }
10 10
11 var values = xhr.responseText.split('\n'); 11 var values = xhr.responseText.split('\n');
12 if (xhr.responseText.indexOf("FAIL") == 0) { 12 if (xhr.responseText.indexOf("FAIL") == 0) {
13 testFailed("Unexpected response text received: " + xhr.responseText); 13 testFailed("Unexpected response text received: " + xhr.responseText);
14 return; 14 return;
15 } 15 }
16 16
17 return xhr.responseText; 17 return xhr.responseText;
18 } 18 }
19 19
20 function touchTempFile(fileName) 20 function touchTempFile(fileName)
21 { 21 {
22 var xhr = new XMLHttpRequest(); 22 var xhr = new XMLHttpRequest();
23 xhr.open("POST", "http://127.0.0.1:8000/resources/touch-temp-file.php?filena me=" + fileName, false); 23 xhr.open("POST", "http://127.0.0.1:8000/resources/touch-temp-file.php?filena me=" + fileName, false);
24 xhr.send(); 24 xhr.send();
25 } 25 }
26 26
27 function removeTempFile(fileName) 27 function removeTempFile(fileName)
28 { 28 {
29 var xhr = new XMLHttpRequest(); 29 var xhr = new XMLHttpRequest();
30 xhr.open("POST", "http://127.0.0.1:8000/resources/reset-temp-file.php?filena me=" + fileName, false); 30 xhr.open("GET", "http://127.0.0.1:8000/resources/reset-temp-file.php?filenam e=" + fileName, false);
31 xhr.send(); 31 xhr.send();
32 // Echo any errors that the script emits.
33 if (xhr.responseText > 0)
34 console.log("removeTempFile('" + fileName + "'): " + xhr.responseText);
32 } 35 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698