Changeset 81297 in webkit


Ignore:
Timestamp:
Mar 16, 2011 5:15:33 PM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-03-16 Adam Klein <adamk@chromium.org>

Reviewed by Adam Barth.

LayoutTests exercising filesystem: URIs should run over HTTP to avoid weirdness related to file: URLs
https://bugs.webkit.org/show_bug.cgi?id=56328

Moves the test for resolveLocalFileSystemURI into new "filesystem"
directory under http/tests/, and adjusts file paths appropriately.

  • fast/filesystem/resolve-uri-expected.txt: Removed.
  • fast/filesystem/resolve-uri.html: Removed.
  • fast/filesystem/script-tests/resolve-uri.js: Removed.
  • http/tests/filesystem: Added.
  • http/tests/filesystem/resolve-uri-expected.txt: Copied from LayoutTests/fast/filesystem/resolve-uri-expected.txt.
  • http/tests/filesystem/resolve-uri.html: Copied from LayoutTests/fast/filesystem/resolve-uri.html.
  • http/tests/filesystem/resources: Added.
  • http/tests/filesystem/resources/fs-test-util.js: Copied from LayoutTests/fast/filesystem/resources/fs-test-util.js.
  • http/tests/filesystem/script-tests: Added.
  • http/tests/filesystem/script-tests/TEMPLATE.html: Copied from LayoutTests/fast/filesystem/script-tests/TEMPLATE.html.
  • http/tests/filesystem/script-tests/resolve-uri.js: Copied from LayoutTests/fast/filesystem/script-tests/resolve-uri.js.
  • platform/gtk/Skipped:
  • platform/mac/Skipped:
  • platform/qt/Skipped:
  • platform/win/Skipped: Added new http/tests/filesystem directory to skip lists since they don't suppor the filesystem API.
Location:
trunk/LayoutTests
Files:
3 added
1 edited
2 copied
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r81295 r81297  
     12011-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
    1292011-03-16  Ryosuke Niwa  <rniwa@webkit.org>
    230
  • trunk/LayoutTests/http/tests/filesystem/resolve-uri.html

    r81292 r81297  
    11<html>
    22<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>
    55<script src="resources/fs-test-util.js"></script>
    66</head>
     
    99<div id="console"></div>
    1010<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>
    1212</body>
    1313</html>
  • trunk/LayoutTests/http/tests/filesystem/resources/fs-test-util.js

    r81292 r81297  
    88    };
    99}
    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         else
    45             this.joinCallback = joinCallback;
    46     };
    47 };
    4810
    4911// Remove everything in the given directory.
  • trunk/LayoutTests/http/tests/filesystem/script-tests/TEMPLATE.html

    r81292 r81297  
    11<html>
    22<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>
    55<script src="resources/fs-test-util.js"></script>
    66</head>
     
    99<div id="console"></div>
    1010<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>
    1212</body>
    1313</html>
  • trunk/LayoutTests/http/tests/filesystem/script-tests/resolve-uri.js

    r81292 r81297  
    5353    debug("* Resolving test file by hand");
    5454    createTestFile(function(entry) {
    55         resolveLocalFileSystemURI("filesystem:file:///temporary/testFile", function(e) {
     55        resolveLocalFileSystemURI("filesystem:http://127.0.0.1:8000/temporary/testFile", function(e) {
    5656            assertPathsMatch(testFileName, e.fullPath);
    5757            assertIsFile(e);
     
    6868function runWrongProtocol() {
    6969    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);
    7171}
    7272
     
    7474    debug("* Resolving a URI with no slash between type and file");
    7575    createTestFile(function(entry) {
    76         resolveLocalFileSystemURI("filesystem:file:///temporarytestFile", errorCallback, expectedAndRunNext);
     76        resolveLocalFileSystemURI("filesystem:http://127.0.0.1:8000/temporarytestFile", errorCallback, expectedAndRunNext);
    7777    });
    7878}
     
    8181    debug("* Resolving a URI with no slash between protocol and type");
    8282    createTestFile(function(entry) {
    83         resolveLocalFileSystemURI("filesystem:file://temporary/testFile", errorCallback, expectedAndRunNext);
     83        resolveLocalFileSystemURI("filesystem:http://127.0.0.1:8000temporary/testFile", errorCallback, expectedAndRunNext);
    8484    });
    8585}
     
    8989    fileSystem.root.getDirectory("foo", {create:true}, function(entry) {
    9090        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) {
    9292                assertPathsMatch("/foo/testFile", e.fullPath);
    9393                assertIsFile(e);
     
    101101    debug("* Resolve a directory");
    102102    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) {
    104104            assertPathsMatch("/foo", e.fullPath);
    105105            assertIsDirectory(e);
     
    112112    debug("* Resolve a path using a trailing slash");
    113113    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) {
    115115            assertPathsMatch("/foo", e.fullPath);
    116116            assertIsDirectory(e);
Note: See TracChangeset for help on using the changeset viewer.