Changeset 81297 in webkit
- Timestamp:
- Mar 16, 2011 5:15:33 PM (13 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 added
- 1 edited
- 2 copied
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r81295 r81297 1 2011-03-16 Adam Klein <adamk@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 LayoutTests exercising filesystem: URIs should run over HTTP to avoid weirdness related to file: URLs 6 https://bugs.webkit.org/show_bug.cgi?id=56328 7 8 Moves the test for resolveLocalFileSystemURI into new "filesystem" 9 directory under http/tests/, and adjusts file paths appropriately. 10 11 * fast/filesystem/resolve-uri-expected.txt: Removed. 12 * fast/filesystem/resolve-uri.html: Removed. 13 * fast/filesystem/script-tests/resolve-uri.js: Removed. 14 * http/tests/filesystem: Added. 15 * http/tests/filesystem/resolve-uri-expected.txt: Copied from LayoutTests/fast/filesystem/resolve-uri-expected.txt. 16 * http/tests/filesystem/resolve-uri.html: Copied from LayoutTests/fast/filesystem/resolve-uri.html. 17 * http/tests/filesystem/resources: Added. 18 * http/tests/filesystem/resources/fs-test-util.js: Copied from LayoutTests/fast/filesystem/resources/fs-test-util.js. 19 * http/tests/filesystem/script-tests: Added. 20 * http/tests/filesystem/script-tests/TEMPLATE.html: Copied from LayoutTests/fast/filesystem/script-tests/TEMPLATE.html. 21 * http/tests/filesystem/script-tests/resolve-uri.js: Copied from LayoutTests/fast/filesystem/script-tests/resolve-uri.js. 22 * platform/gtk/Skipped: 23 * platform/mac/Skipped: 24 * platform/qt/Skipped: 25 * platform/win/Skipped: 26 Added new http/tests/filesystem directory to skip lists since 27 they don't suppor the filesystem API. 28 1 29 2011-03-16 Ryosuke Niwa <rniwa@webkit.org> 2 30 -
trunk/LayoutTests/http/tests/filesystem/resolve-uri.html
r81292 r81297 1 1 <html> 2 2 <head> 3 <link rel="stylesheet" href=" ../js/resources/js-test-style.css">4 <script src=" ../js/resources/js-test-pre.js"></script>3 <link rel="stylesheet" href="/js-test-resources/js-test-style.css"> 4 <script src="/js-test-resources/js-test-pre.js"></script> 5 5 <script src="resources/fs-test-util.js"></script> 6 6 </head> … … 9 9 <div id="console"></div> 10 10 <script src="script-tests/resolve-uri.js"></script> 11 <script src=" ../js/resources/js-test-post.js"></script>11 <script src="/js-test-resources/js-test-post.js"></script> 12 12 </body> 13 13 </html> -
trunk/LayoutTests/http/tests/filesystem/resources/fs-test-util.js
r81292 r81297 8 8 }; 9 9 } 10 11 // Usage:12 // var helper = new JoinHelper;13 //14 // helper.run(function() { /* do something that eventually calls helper.done(); */ });15 // helper.run(function() { /* do something that eventually calls helper.done(); */ });16 // ...17 // helper.join(joinCallback);18 //19 var JoinHelper = function()20 {21 this.pendingOperations = [];22 this.pendingOperationCount = 0;23 this.joinCallback = null;24 25 this.run = function(operation)26 {27 this.pendingOperationCount++;28 operation();29 };30 31 // Call this when an operation is done.32 this.done = function()33 {34 this.pendingOperationCount--;35 if (this.pendingOperationCount == 0 && this.joinCallback)36 this.joinCallback();37 };38 39 // This eventually calls the joinCallback when helper.done() is called as many times as helper.run() is called.40 this.join = function(joinCallback)41 {42 if (this.pendingOperationCount == 0)43 joinCallback();44 else45 this.joinCallback = joinCallback;46 };47 };48 10 49 11 // Remove everything in the given directory. -
trunk/LayoutTests/http/tests/filesystem/script-tests/TEMPLATE.html
r81292 r81297 1 1 <html> 2 2 <head> 3 <link rel="stylesheet" href=" ../js/resources/js-test-style.css">4 <script src=" ../js/resources/js-test-pre.js"></script>3 <link rel="stylesheet" href="/js-test-resources/js-test-style.css"> 4 <script src="/js-test-resources/js-test-pre.js"></script> 5 5 <script src="resources/fs-test-util.js"></script> 6 6 </head> … … 9 9 <div id="console"></div> 10 10 <script src="YOUR_JS_FILE_HERE"></script> 11 <script src=" ../js/resources/js-test-post.js"></script>11 <script src="/js-test-resources/js-test-post.js"></script> 12 12 </body> 13 13 </html> -
trunk/LayoutTests/http/tests/filesystem/script-tests/resolve-uri.js
r81292 r81297 53 53 debug("* Resolving test file by hand"); 54 54 createTestFile(function(entry) { 55 resolveLocalFileSystemURI("filesystem: file:///temporary/testFile", function(e) {55 resolveLocalFileSystemURI("filesystem:http://127.0.0.1:8000/temporary/testFile", function(e) { 56 56 assertPathsMatch(testFileName, e.fullPath); 57 57 assertIsFile(e); … … 68 68 function runWrongProtocol() { 69 69 debug("* Resolving a URI with the wrong protocol"); 70 resolveLocalFileSystemURI(" file:///foo/bar/baz", errorCallback, expectedAndRunNext);70 resolveLocalFileSystemURI("http://127.0.0.1:8000/foo/bar/baz", errorCallback, expectedAndRunNext); 71 71 } 72 72 … … 74 74 debug("* Resolving a URI with no slash between type and file"); 75 75 createTestFile(function(entry) { 76 resolveLocalFileSystemURI("filesystem: file:///temporarytestFile", errorCallback, expectedAndRunNext);76 resolveLocalFileSystemURI("filesystem:http://127.0.0.1:8000/temporarytestFile", errorCallback, expectedAndRunNext); 77 77 }); 78 78 } … … 81 81 debug("* Resolving a URI with no slash between protocol and type"); 82 82 createTestFile(function(entry) { 83 resolveLocalFileSystemURI("filesystem: file://temporary/testFile", errorCallback, expectedAndRunNext);83 resolveLocalFileSystemURI("filesystem:http://127.0.0.1:8000temporary/testFile", errorCallback, expectedAndRunNext); 84 84 }); 85 85 } … … 89 89 fileSystem.root.getDirectory("foo", {create:true}, function(entry) { 90 90 entry.getFile("testFile", {create:true}, function(f) { 91 resolveLocalFileSystemURI("filesystem: file:///temporary/foo\\testFile", function(e) {91 resolveLocalFileSystemURI("filesystem:http://127.0.0.1:8000/temporary/foo\\testFile", function(e) { 92 92 assertPathsMatch("/foo/testFile", e.fullPath); 93 93 assertIsFile(e); … … 101 101 debug("* Resolve a directory"); 102 102 fileSystem.root.getDirectory("foo", {create:true}, function(entry) { 103 resolveLocalFileSystemURI("filesystem: file:///temporary/foo", function(e) {103 resolveLocalFileSystemURI("filesystem:http://127.0.0.1:8000/temporary/foo", function(e) { 104 104 assertPathsMatch("/foo", e.fullPath); 105 105 assertIsDirectory(e); … … 112 112 debug("* Resolve a path using a trailing slash"); 113 113 fileSystem.root.getDirectory("foo", {create:true}, function(entry) { 114 resolveLocalFileSystemURI("filesystem: file:///temporary/foo/", function(e) {114 resolveLocalFileSystemURI("filesystem:http://127.0.0.1:8000/temporary/foo/", function(e) { 115 115 assertPathsMatch("/foo", e.fullPath); 116 116 assertIsDirectory(e);
Note: See TracChangeset
for help on using the changeset viewer.