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

Side by Side Diff: LayoutTests/fast/filesystem/script-tests/flags-passing.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 description("Passing Flags parameter tests. This test checks if passing Flags pa rameters to DirectoryEntry.getFile does not crash and works as expected."); 1 description("Passing Flags parameter tests. This test checks if passing Flags pa rameters to DirectoryEntry.getFile does not crash and works as expected.");
2 2
3 var testFileName = '/non_existent_file'; 3 var testFileName = '/non_existent_file';
4 var fileSystem = null; 4 var fileSystem = null;
5 var expectedCallbacksCount = 0; 5 var expectedCallbacksCount = 0;
6 var unexpectedCallbacksCount = 0; 6 var unexpectedCallbacksCount = 0;
7 var expected = function(e) { expectedCallbacksCount++; }; 7 var expected = function(e) { expectedCallbacksCount++; };
8 var unexpected = function(e) { unexpectedCallbacksCount++; }; 8 var unexpected = function(e) { unexpectedCallbacksCount++; };
9 9
10 var testsList = [ 10 var testsList = [
(...skipping 10 matching lines...) Expand all
21 if (testCounter == testsList.length) { 21 if (testCounter == testsList.length) {
22 debug("Finished running tests."); 22 debug("Finished running tests.");
23 shouldBe('expectedCallbacksCount', '1'); 23 shouldBe('expectedCallbacksCount', '1');
24 shouldBe('unexpectedCallbacksCount', '0'); 24 shouldBe('unexpectedCallbacksCount', '0');
25 finishJSTest(); 25 finishJSTest();
26 } else 26 } else
27 (testsList[testCounter++])(); 27 (testsList[testCounter++])();
28 } 28 }
29 29
30 function errorCallback(error) { 30 function errorCallback(error) {
31 debug("Error occured during requesting Temporary FileSystem:" + error.code); 31 debug("Error occured during requesting Temporary FileSystem:" + error.name);
32 finishJSTest(); 32 finishJSTest();
33 } 33 }
34 34
35 // Test body functions ---------------------------------------------------- 35 // Test body functions ----------------------------------------------------
36 function runNullTest(v) { 36 function runNullTest(v) {
37 debug("* Passing null as a flags parameter."); 37 debug("* Passing null as a flags parameter.");
38 38
39 // This should be ok and we treat it as {false, false} Flags. 39 // This should be ok and we treat it as {false, false} Flags.
40 fileSystem.root.getFile(testFileName, null, runNextTest, errorCallback); 40 fileSystem.root.getFile(testFileName, null, runNextTest, errorCallback);
41 } 41 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 function fileSystemCallback(fs) { 85 function fileSystemCallback(fs) {
86 fileSystem = fs; 86 fileSystem = fs;
87 cleanupAndRunNext(); 87 cleanupAndRunNext();
88 } 88 }
89 89
90 if (window.webkitRequestFileSystem) { 90 if (window.webkitRequestFileSystem) {
91 window.jsTestIsAsync = true; 91 window.jsTestIsAsync = true;
92 webkitRequestFileSystem(window.TEMPORARY, 100, fileSystemCallback, errorCall back); 92 webkitRequestFileSystem(window.TEMPORARY, 100, fileSystemCallback, errorCall back);
93 } else 93 } else
94 debug("This test requires FileSystem API support."); 94 debug("This test requires FileSystem API support.");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698