Changeset 72704 in webkit


Ignore:
Timestamp:
Nov 24, 2010 3:59:32 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-11-24 Eric Uhrhane <ericu@chromium.org>

Reviewed by David Levin.

Add FileWriter test utilities.
https://bugs.webkit.org/show_bug.cgi?id=47680

Cleaning up shared test utility files caused the includes and output of
a bunch of existing tests change slightly, so I've rebuilt the
expectation files.

This is the first test [in DOM and worker versions] to use the new utilities.

  • fast/filesystem/file-writer-truncate-extend-expected.txt: Added.
  • fast/filesystem/file-writer-truncate-extend.html: Added.
  • fast/filesystem/resources/file-writer-truncate-extend.js: Added.
  • fast/filesystem/workers/file-writer-truncate-extend-expected.txt: Added.
  • fast/filesystem/workers/file-writer-truncate-extend.html: Added.

This is a new utility file for FileWriter tests.

  • fast/filesystem/resources/file-writer-utils.js: Added.

Touched up a bit

  • fast/filesystem/resources/fs-worker-common.js:

Removed

  • fast/filesystem/resources/fs-worker-test-post.js:
  • fast/filesystem/resources/fs-worker-test-pre.js: renamed to
  • fast/filesystem/resources/fs-worker-test-util.js:

These tests and their expectations were tweaked slightly to use the new code more cleanly.

  • fast/filesystem/workers/async-operations-expected.txt:
  • fast/filesystem/workers/async-operations.html:
  • fast/filesystem/workers/file-from-file-entry-expected.txt:
  • fast/filesystem/workers/file-from-file-entry-sync-expected.txt:
  • fast/filesystem/workers/file-from-file-entry-sync.html:
  • fast/filesystem/workers/file-from-file-entry.html:
  • fast/filesystem/workers/simple-persistent-expected.txt:
  • fast/filesystem/workers/simple-persistent-sync-expected.txt:
  • fast/filesystem/workers/simple-persistent-sync.html:
  • fast/filesystem/workers/simple-persistent.html:
  • fast/filesystem/workers/simple-temporary-expected.txt:
  • fast/filesystem/workers/simple-temporary-sync-expected.txt:
  • fast/filesystem/workers/simple-temporary-sync.html:
  • fast/filesystem/workers/simple-temporary.html:
  • fast/filesystem/workers/sync-operations-expected.txt:
  • fast/filesystem/workers/sync-operations.html:

Removed suppression of FileWriter tests, as we now have support in TestShell.

  • platform/chromium/test_expectations.txt:
Location:
trunk/LayoutTests
Files:
7 added
2 deleted
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r72702 r72704  
     12010-11-24  Eric Uhrhane  <ericu@chromium.org>
     2
     3        Reviewed by David Levin.
     4
     5        Add FileWriter test utilities.
     6        https://bugs.webkit.org/show_bug.cgi?id=47680
     7
     8        Cleaning up shared test utility files caused the includes and output of
     9        a bunch of existing tests change slightly, so I've rebuilt the
     10        expectation files.
     11
     12        This is the first test [in DOM and worker versions] to use the new utilities.
     13        * fast/filesystem/file-writer-truncate-extend-expected.txt: Added.
     14        * fast/filesystem/file-writer-truncate-extend.html: Added.
     15        * fast/filesystem/resources/file-writer-truncate-extend.js: Added.
     16        * fast/filesystem/workers/file-writer-truncate-extend-expected.txt: Added.
     17        * fast/filesystem/workers/file-writer-truncate-extend.html: Added.
     18       
     19        This is a new utility file for FileWriter tests.
     20        * fast/filesystem/resources/file-writer-utils.js: Added.
     21
     22        Touched up a bit
     23        * fast/filesystem/resources/fs-worker-common.js:
     24
     25        Removed
     26        * fast/filesystem/resources/fs-worker-test-post.js:
     27
     28        * fast/filesystem/resources/fs-worker-test-pre.js:
     29        renamed to
     30        * fast/filesystem/resources/fs-worker-test-util.js:
     31
     32        These tests and their expectations were tweaked slightly to use the new code more cleanly.
     33        * fast/filesystem/workers/async-operations-expected.txt:
     34        * fast/filesystem/workers/async-operations.html:
     35        * fast/filesystem/workers/file-from-file-entry-expected.txt:
     36        * fast/filesystem/workers/file-from-file-entry-sync-expected.txt:
     37        * fast/filesystem/workers/file-from-file-entry-sync.html:
     38        * fast/filesystem/workers/file-from-file-entry.html:
     39        * fast/filesystem/workers/simple-persistent-expected.txt:
     40        * fast/filesystem/workers/simple-persistent-sync-expected.txt:
     41        * fast/filesystem/workers/simple-persistent-sync.html:
     42        * fast/filesystem/workers/simple-persistent.html:
     43        * fast/filesystem/workers/simple-temporary-expected.txt:
     44        * fast/filesystem/workers/simple-temporary-sync-expected.txt:
     45        * fast/filesystem/workers/simple-temporary-sync.html:
     46        * fast/filesystem/workers/simple-temporary.html:
     47        * fast/filesystem/workers/sync-operations-expected.txt:
     48        * fast/filesystem/workers/sync-operations.html:
     49
     50        Removed suppression of FileWriter tests, as we now have support in TestShell.
     51        * platform/chromium/test_expectations.txt:
     52
    1532010-11-24  Nico Weber  <thakis@chromium.org>
    254
  • trunk/LayoutTests/fast/filesystem/resources/fs-worker-common.js

    r69485 r72704  
    11function debug(message)
    22{
    3     postMessage(message);
     3    postMessage("MESG:" + message);
    44}
    55
    66function finishJSTest()
    77{
    8     postMessage("DONE");
     8    postMessage("DONE:");
    99}
    1010
    1111function description(message)
    1212{
    13     postMessage('Description: ' + message);
     13    postMessage('DESC:' + message);
     14}
     15
     16function testPassed(msg) {
     17    postMessage("PASS:" + msg);
     18}
     19
     20function testFailed(msg) {
     21    postMessage("FAIL:" + msg);
    1422}
    1523
     
    2129  var _bv = eval(_b);
    2230  if (_av === _bv)
    23     debug("PASS: " + _a + " is " + _b);
     31    testPassed(_a + " is " + _b);
    2432  else
    25     debug("FAIL: " + _a + " should be " + _bv + " (of type " + typeof _bv + "). Was " + _av + " (of type " + typeof _av + ").");
     33    testFailed(_a + " should be " + _bv + " (of type " + typeof _bv + "). Was " + _av + " (of type " + typeof _av + ").");
    2634}
    2735
  • trunk/LayoutTests/fast/filesystem/workers/async-operations-expected.txt

    r69249 r72704  
    1 This tests running multiple async filesystem operations in Worker.
     1[Worker] Test making multiple async FileSystem operations.
     2
     3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     4
    25
    36Starting worker: ../resources/async-operations.js
    4 Description: Test making multiple async FileSystem operations.
    5 requested FileSystem.
    6 Got FileSystem:file__0:Temporary
    7 Starting async test stage 1.
    8 Starting async test stage 2.
    9 Verifying the FileSystem status.
    10 PASS: "/a,/b,/c,/d2,/e,/f" is "/a,/b,/c,/d2,/e,/f"
    11 PASS: dirsCount is 3
    12 DONE
     7[Worker] requested FileSystem.
     8[Worker] Got FileSystem:file__0:Temporary
     9[Worker] Starting async test stage 1.
     10[Worker] Starting async test stage 2.
     11[Worker] Verifying the FileSystem status.
     12PASS [Worker] "/a,/b,/c,/d2,/e,/f" is "/a,/b,/c,/d2,/e,/f"
     13PASS [Worker] dirsCount is 3
     14PASS successfullyParsed is true
    1315
    1416TEST COMPLETE
  • trunk/LayoutTests/fast/filesystem/workers/async-operations.html

    r69249 r72704  
    11<html>
    22<head>
    3 <script src="../resources/fs-worker-common.js"></script>
    4 <script src="../resources/fs-worker-test-pre.js"></script>
     3<link rel="stylesheet" href="../../js/resources/js-test-style.css">
     4<script src="../../js/resources/js-test-pre.js"></script>
     5<script src="../resources/fs-worker-test-util.js"></script>
    56</head>
    67<body>
    7 <p id="description">This tests running multiple async filesystem operations in Worker.</p>
     8<p id="description"></p>
    89<div id="console"></div>
    910<script>
    1011startWorker('../resources/async-operations.js');
     12window.successfullyParsed = true;
    1113</script>
    12 <script src="../resources/fs-worker-test-post.js"></script>
     14<script src="../../js/resources/js-test-post.js"></script>
    1315</body>
    1416</html>
  • trunk/LayoutTests/fast/filesystem/workers/file-from-file-entry-expected.txt

    r69907 r72704  
    1 This tests returning File from FileEntry in workers.
     1[Worker] Obtaining File from FileEntry.
     2
     3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     4
    25
    36Starting worker: ../resources/file-from-file-entry.js
    4 Description: Obtaining File from FileEntry.
    5 PASS: testFile.name is testFileEntry.name
    6 PASS: testFile.type is 'text/plain'
    7 PASS: testFile.size is 0
    8 DONE
     7PASS [Worker] testFile.name is testFileEntry.name
     8PASS [Worker] testFile.type is 'text/plain'
     9PASS [Worker] testFile.size is 0
     10PASS successfullyParsed is true
    911
    1012TEST COMPLETE
  • trunk/LayoutTests/fast/filesystem/workers/file-from-file-entry-sync-expected.txt

    r69907 r72704  
    1 This tests returning File from FileEntrySync in workers.
     1[Worker] Obtaining File from FileEntrySync.
     2
     3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     4
    25
    36Starting worker: ../resources/file-from-file-entry-sync.js
    4 Description: Obtaining File from FileEntrySync.
    5 PASS: testFile.name is testFileEntry.name
    6 PASS: testFile.type is 'text/plain'
    7 PASS: testFile.size is 0
    8 DONE
     7PASS [Worker] testFile.name is testFileEntry.name
     8PASS [Worker] testFile.type is 'text/plain'
     9PASS [Worker] testFile.size is 0
     10PASS successfullyParsed is true
    911
    1012TEST COMPLETE
  • trunk/LayoutTests/fast/filesystem/workers/file-from-file-entry-sync.html

    r69907 r72704  
    11<html>
    22<head>
    3 <script src="../resources/fs-worker-common.js"></script>
    4 <script src="../resources/fs-worker-test-pre.js"></script>
     3<link rel="stylesheet" href="../../js/resources/js-test-style.css">
     4<script src="../../js/resources/js-test-pre.js"></script>
     5<script src="../resources/fs-worker-test-util.js"></script>
    56</head>
    67<body>
    7 <p id="description">This tests returning File from FileEntrySync in workers.</p>
     8<p id="description"></p>
    89<div id="console"></div>
    910<script>
    1011startWorker('../resources/file-from-file-entry-sync.js');
     12window.successfullyParsed = true;
    1113</script>
    12 <script src="../resources/fs-worker-test-post.js"></script>
     14<script src="../../js/resources/js-test-post.js"></script>
    1315</body>
    1416</html>
  • trunk/LayoutTests/fast/filesystem/workers/file-from-file-entry.html

    r69907 r72704  
    11<html>
    22<head>
    3 <script src="../resources/fs-worker-common.js"></script>
    4 <script src="../resources/fs-worker-test-pre.js"></script>
     3<link rel="stylesheet" href="../../js/resources/js-test-style.css">
     4<script src="../../js/resources/js-test-pre.js"></script>
     5<script src="../resources/fs-worker-test-util.js"></script>
    56</head>
    67<body>
    7 <p id="description">This tests returning File from FileEntry in workers.</p>
     8<p id="description"></p>
    89<div id="console"></div>
    910<script>
    1011startWorker('../resources/file-from-file-entry.js');
     12window.successfullyParsed = true;
    1113</script>
    12 <script src="../resources/fs-worker-test-post.js"></script>
     14<script src="../../js/resources/js-test-post.js"></script>
    1315</body>
    1416</html>
  • trunk/LayoutTests/fast/filesystem/workers/simple-persistent-expected.txt

    r69249 r72704  
    1 This tests requesting PERSISTENT FileSystem in Worker.
     1[Worker] requestFileSystem PERSISTENT test.
     2
     3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     4
    25
    36Starting worker: ../resources/simple-persistent.js
    4 Description: requestFileSystem PERSISTENT test.
    5 Successfully obtained PERSISTENT FileSystem:file__0:Persistent
    6 PASS: fileSystem.name.length > 0 is true
    7 PASS: fileSystem.root.fullPath is "/"
    8 DONE
     7[Worker] Successfully obtained PERSISTENT FileSystem:file__0:Persistent
     8PASS [Worker] fileSystem.name.length > 0 is true
     9PASS [Worker] fileSystem.root.fullPath is "/"
     10PASS successfullyParsed is true
    911
    1012TEST COMPLETE
  • trunk/LayoutTests/fast/filesystem/workers/simple-persistent-sync-expected.txt

    r69249 r72704  
    1 This tests requesting PERSISTENT FileSystemSync in Worker.
     1[Worker] requestFileSystemSync PERSISTENT test.
     2
     3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     4
    25
    36Starting worker: ../resources/simple-persistent-sync.js
    4 Description: requestFileSystemSync PERSISTENT test.
    5 Successfully obtained PERSISTENT FileSystem:file__0:Persistent
    6 PASS: fileSystem.name.length > 0 is true
    7 PASS: fileSystem.root.fullPath is "/"
    8 DONE
     7[Worker] Successfully obtained PERSISTENT FileSystem:file__0:Persistent
     8PASS [Worker] fileSystem.name.length > 0 is true
     9PASS [Worker] fileSystem.root.fullPath is "/"
     10PASS successfullyParsed is true
    911
    1012TEST COMPLETE
  • trunk/LayoutTests/fast/filesystem/workers/simple-persistent-sync.html

    r69178 r72704  
    11<html>
    22<head>
    3 <script src="../resources/fs-worker-common.js"></script>
    4 <script src="../resources/fs-worker-test-pre.js"></script>
     3<link rel="stylesheet" href="../../js/resources/js-test-style.css">
     4<script src="../../js/resources/js-test-pre.js"></script>
     5<script src="../resources/fs-worker-test-util.js"></script>
    56</head>
    67<body>
    7 <p id="description">This tests requesting PERSISTENT FileSystemSync in Worker.</p>
     8<p id="description"></p>
    89<div id="console"></div>
    910<script>
    1011startWorker('../resources/simple-persistent-sync.js');
     12window.successfullyParsed = true;
    1113</script>
    12 <script src="../resources/fs-worker-test-post.js"></script>
     14<script src="../../js/resources/js-test-post.js"></script>
    1315</body>
    1416</html>
  • trunk/LayoutTests/fast/filesystem/workers/simple-persistent.html

    r69178 r72704  
    11<html>
    22<head>
    3 <script src="../resources/fs-worker-common.js"></script>
    4 <script src="../resources/fs-worker-test-pre.js"></script>
     3<link rel="stylesheet" href="../../js/resources/js-test-style.css">
     4<script src="../../js/resources/js-test-pre.js"></script>
     5<script src="../resources/fs-worker-test-util.js"></script>
    56</head>
    67<body>
    7 <p id="description">This tests requesting PERSISTENT FileSystem in Worker.</p>
     8<p id="description"></p>
    89<div id="console"></div>
    910<script>
    1011startWorker('../resources/simple-persistent.js');
     12window.successfullyParsed = true;
    1113</script>
    12 <script src="../resources/fs-worker-test-post.js"></script>
     14<script src="../../js/resources/js-test-post.js"></script>
    1315</body>
    1416</html>
  • trunk/LayoutTests/fast/filesystem/workers/simple-temporary-expected.txt

    r69178 r72704  
    1 This tests requesting TEMPORARY FileSystem in Worker.
     1[Worker] requestFileSystem TEMPORARY test.
     2
     3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     4
    25
    36Starting worker: ../resources/simple-temporary.js
    4 Description: requestFileSystem TEMPORARY test.
    5 Successfully obtained TEMPORARY FileSystem:file__0:Temporary
    6 PASS: fileSystem.name.length > 0 is true
    7 PASS: fileSystem.root.fullPath is "/"
    8 DONE
     7[Worker] Successfully obtained TEMPORARY FileSystem:file__0:Temporary
     8PASS [Worker] fileSystem.name.length > 0 is true
     9PASS [Worker] fileSystem.root.fullPath is "/"
     10PASS successfullyParsed is true
    911
    1012TEST COMPLETE
  • trunk/LayoutTests/fast/filesystem/workers/simple-temporary-sync-expected.txt

    r69249 r72704  
    1 This tests requesting TEMPORARY FileSystemSync in Worker.
     1[Worker] requestFileSystemSync TEMPORARY test.
     2
     3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     4
    25
    36Starting worker: ../resources/simple-temporary-sync.js
    4 Description: requestFileSystemSync TEMPORARY test.
    5 Successfully obtained TEMPORARY FileSystem:file__0:Temporary
    6 PASS: fileSystem.name.length > 0 is true
    7 PASS: fileSystem.root.fullPath is "/"
    8 DONE
     7[Worker] Successfully obtained TEMPORARY FileSystem:file__0:Temporary
     8PASS [Worker] fileSystem.name.length > 0 is true
     9PASS [Worker] fileSystem.root.fullPath is "/"
     10PASS successfullyParsed is true
    911
    1012TEST COMPLETE
  • trunk/LayoutTests/fast/filesystem/workers/simple-temporary-sync.html

    r69178 r72704  
    11<html>
    22<head>
    3 <script src="../resources/fs-worker-common.js"></script>
    4 <script src="../resources/fs-worker-test-pre.js"></script>
     3<link rel="stylesheet" href="../../js/resources/js-test-style.css">
     4<script src="../../js/resources/js-test-pre.js"></script>
     5<script src="../resources/fs-worker-test-util.js"></script>
    56</head>
    67<body>
    7 <p id="description">This tests requesting TEMPORARY FileSystemSync in Worker.</p>
     8<p id="description"></p>
    89<div id="console"></div>
    910<script>
    1011startWorker('../resources/simple-temporary-sync.js');
     12window.successfullyParsed = true;
    1113</script>
    12 <script src="../resources/fs-worker-test-post.js"></script>
     14<script src="../../js/resources/js-test-post.js"></script>
    1315</body>
    1416</html>
  • trunk/LayoutTests/fast/filesystem/workers/simple-temporary.html

    r69178 r72704  
    11<html>
    22<head>
    3 <script src="../resources/fs-worker-common.js"></script>
    4 <script src="../resources/fs-worker-test-pre.js"></script>
     3<link rel="stylesheet" href="../../js/resources/js-test-style.css">
     4<script src="../../js/resources/js-test-pre.js"></script>
     5<script src="../resources/fs-worker-test-util.js"></script>
    56</head>
    67<body>
    7 <p id="description">This tests requesting TEMPORARY FileSystem in Worker.</p>
     8<p id="description"></p>
    89<div id="console"></div>
    910<script>
    1011startWorker('../resources/simple-temporary.js');
     12window.successfullyParsed = true;
    1113</script>
    12 <script src="../resources/fs-worker-test-post.js"></script>
     14<script src="../../js/resources/js-test-post.js"></script>
    1315</body>
    1416</html>
  • trunk/LayoutTests/fast/filesystem/workers/sync-operations-expected.txt

    r69249 r72704  
    1 This tests running multiple sync filesystem operations in Worker.
     1[Worker] Test making multiple synchronous FileSystem operations.
     2
     3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     4
    25
    36Starting worker: ../resources/sync-operations.js
    4 Description: Test making multiple synchronous FileSystem operations.
    5 PASS: "/a,/b,/c,/d2,/e,/f" is "/a,/b,/c,/d2,/e,/f"
    6 PASS: dirsCount is 3
    7 DONE
     7PASS [Worker] "/a,/b,/c,/d2,/e,/f" is "/a,/b,/c,/d2,/e,/f"
     8PASS [Worker] dirsCount is 3
     9PASS successfullyParsed is true
    810
    911TEST COMPLETE
  • trunk/LayoutTests/fast/filesystem/workers/sync-operations.html

    r69249 r72704  
    11<html>
    22<head>
    3 <script src="../resources/fs-worker-common.js"></script>
    4 <script src="../resources/fs-worker-test-pre.js"></script>
     3<link rel="stylesheet" href="../../js/resources/js-test-style.css">
     4<script src="../../js/resources/js-test-pre.js"></script>
     5<script src="../resources/fs-worker-test-util.js"></script>
    56</head>
    67<body>
    7 <p id="description">This tests running multiple sync filesystem operations in Worker.</p>
     8<p id="description"></p>
    89<div id="console"></div>
    910<script>
    1011startWorker('../resources/sync-operations.js');
     12window.successfullyParsed = true;
    1113</script>
    12 <script src="../resources/fs-worker-test-post.js"></script>
     14<script src="../../js/resources/js-test-post.js"></script>
    1315</body>
    1416</html>
Note: See TracChangeset for help on using the changeset viewer.