Changeset 106898 in webkit
- Timestamp:
- Feb 6, 2012 8:05:21 PM (12 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 deleted
- 49 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r106897 r106898 1 2012-02-06 David Grogan <dgrogan@chromium.org> 2 3 js-test-pre.js: relay calls to testPassed, testFailed, debug, etc from 4 worker to document. 5 https://bugs.webkit.org/show_bug.cgi?id=76762 6 7 Reviewed by Ojan Vafai. 8 9 * fast/filesystem/resources/async-operations.js: 10 * fast/filesystem/resources/directory-entry-to-uri.js: 11 * fast/filesystem/resources/file-entry-to-uri-sync.js: 12 * fast/filesystem/resources/file-entry-to-uri.js: 13 * fast/filesystem/resources/file-from-file-entry-sync.js: 14 * fast/filesystem/resources/file-from-file-entry.js: 15 * fast/filesystem/resources/file-writer-abort-continue.js: 16 * fast/filesystem/resources/file-writer-abort-depth.js: 17 * fast/filesystem/resources/file-writer-abort.js: 18 * fast/filesystem/resources/file-writer-events.js: 19 * fast/filesystem/resources/file-writer-gc-blob.js: 20 * fast/filesystem/resources/file-writer-sync-truncate-extend.js: 21 * fast/filesystem/resources/file-writer-sync-write-overlapped.js: 22 * fast/filesystem/resources/file-writer-truncate-extend.js: 23 * fast/filesystem/resources/file-writer-write-overlapped.js: 24 * fast/filesystem/resources/fs-worker-common.js: 25 * fast/filesystem/resources/fs-worker-test-util.js: Removed. 26 * fast/filesystem/resources/simple-persistent-sync.js: 27 * fast/filesystem/resources/simple-persistent.js: 28 * fast/filesystem/resources/simple-readonly.js: 29 * fast/filesystem/resources/simple-required-arguments-getdirectory.js: 30 * fast/filesystem/resources/simple-required-arguments-getfile.js: 31 * fast/filesystem/resources/simple-required-arguments-getmetadata.js: 32 * fast/filesystem/resources/simple-required-arguments-remove.js: 33 * fast/filesystem/resources/simple-temporary-sync.js: 34 * fast/filesystem/resources/simple-temporary.js: 35 * fast/filesystem/resources/sync-operations.js: 36 * fast/filesystem/workers/async-operations.html: 37 * fast/filesystem/workers/file-entry-to-uri-sync.html: 38 * fast/filesystem/workers/file-from-file-entry-sync.html: 39 * fast/filesystem/workers/file-from-file-entry.html: 40 * fast/filesystem/workers/file-writer-events.html: 41 * fast/filesystem/workers/file-writer-gc-blob.html: 42 * fast/filesystem/workers/file-writer-sync-truncate-extend.html: 43 * fast/filesystem/workers/file-writer-sync-write-overlapped.html: 44 * fast/filesystem/workers/file-writer-truncate-extend.html: 45 * fast/filesystem/workers/file-writer-write-overlapped.html: 46 * fast/filesystem/workers/simple-persistent-sync.html: 47 * fast/filesystem/workers/simple-persistent.html: 48 * fast/filesystem/workers/simple-temporary-sync.html: 49 * fast/filesystem/workers/simple-temporary.html: 50 * fast/filesystem/workers/sync-operations.html: 51 * fast/js/resources/js-test-pre.js: 52 (testPassed): 53 (testFailed): 54 (finishJSTest): 55 (startWorker.worker.onmessage): 56 (startWorker.worker.onerror): 57 (startWorker): 58 * storage/indexeddb/basics-workers.html: 59 * storage/indexeddb/resources/basics.js: 60 1 61 2012-02-06 Julien Chaffraix <jchaffraix@webkit.org> 2 62 -
trunk/LayoutTests/fast/filesystem/resources/async-operations.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../resources/fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('../resources/fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/directory-entry-to-uri.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/file-entry-to-uri-sync.js
r98407 r106898 1 1 importScripts('fs-worker-common.js'); 2 importScripts('../../js/resources/js-test-pre.js'); 2 3 3 4 description("Obtaining URL from FileEntry."); -
trunk/LayoutTests/fast/filesystem/resources/file-entry-to-uri.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/file-from-file-entry-sync.js
r98407 r106898 1 1 // FIXME: move this under workers/resources 2 2 importScripts('fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 4 5 description("Obtaining File from FileEntrySync."); -
trunk/LayoutTests/fast/filesystem/resources/file-from-file-entry.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/file-writer-abort-continue.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('file-writer-utils.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/file-writer-abort-depth.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('file-writer-utils.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/file-writer-abort.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('file-writer-utils.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/file-writer-events.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('file-writer-utils.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/file-writer-gc-blob.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('file-writer-utils.js'); 4 5 function gc() { -
trunk/LayoutTests/fast/filesystem/resources/file-writer-sync-truncate-extend.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../resources/fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('../resources/fs-test-util.js'); 4 5 importScripts('../resources/file-writer-utils.js'); -
trunk/LayoutTests/fast/filesystem/resources/file-writer-sync-write-overlapped.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../resources/fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('../resources/fs-test-util.js'); 4 5 importScripts('../resources/file-writer-utils.js'); -
trunk/LayoutTests/fast/filesystem/resources/file-writer-truncate-extend.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('file-writer-utils.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/file-writer-write-overlapped.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('file-writer-utils.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/fs-worker-common.js
r84224 r106898 1 function debug(message)2 {3 postMessage("MESG:" + message);4 }5 6 function finishJSTest()7 {8 postMessage("DONE:");9 }10 11 function description(message)12 {13 postMessage('DESC:' + message);14 }15 16 function testPassed(msg) {17 postMessage("PASS:" + msg);18 }19 20 function testFailed(msg) {21 postMessage("FAIL:" + msg);22 }23 24 function shouldBe(_a, _b)25 {26 if (typeof _a != "string" || typeof _b != "string")27 debug("WARN: shouldBe() expects string arguments");28 var _av = eval(_a);29 var _bv = eval(_b);30 if (_av === _bv)31 testPassed(_a + " is " + _b);32 else33 testFailed(_a + " should be " + _bv + " (of type " + typeof _bv + "). Was " + _av + " (of type " + typeof _av + ").");34 }35 36 function shouldBeTrue(_a) { shouldBe(_a, "true"); }37 38 1 function removeAllInDirectorySync(directory) { 39 2 if (!directory) -
trunk/LayoutTests/fast/filesystem/resources/simple-persistent-sync.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../resources/fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('../resources/fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/simple-persistent.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../resources/fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('../resources/fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/simple-readonly.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../resources/fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('../resources/fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/simple-required-arguments-getdirectory.js
r101717 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../resources/fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('../resources/fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/simple-required-arguments-getfile.js
r101606 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../resources/fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('../resources/fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/simple-required-arguments-getmetadata.js
r103501 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../resources/fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('../resources/fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/simple-required-arguments-remove.js
r102501 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../resources/fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('../resources/fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/simple-temporary-sync.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../resources/fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('../resources/fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/simple-temporary.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../resources/fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('../resources/fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/resources/sync-operations.js
r98407 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../resources/fs-worker-common.js'); 3 importScripts('../../js/resources/js-test-pre.js'); 3 4 importScripts('../resources/fs-test-util.js'); 4 5 } -
trunk/LayoutTests/fast/filesystem/workers/async-operations.html
r98407 r106898 2 2 <head> 3 3 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../resources/fs-worker-test-util.js"></script>5 4 </head> 6 5 <body> -
trunk/LayoutTests/fast/filesystem/workers/file-entry-to-uri-sync.html
r98407 r106898 2 2 <head> 3 3 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../resources/fs-worker-test-util.js"></script>5 4 </head> 6 5 <body> -
trunk/LayoutTests/fast/filesystem/workers/file-from-file-entry-sync.html
r98407 r106898 2 2 <head> 3 3 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../resources/fs-worker-test-util.js"></script>5 4 </head> 6 5 <body> -
trunk/LayoutTests/fast/filesystem/workers/file-from-file-entry.html
r98407 r106898 2 2 <head> 3 3 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../resources/fs-worker-test-util.js"></script>5 4 </head> 6 5 <body> -
trunk/LayoutTests/fast/filesystem/workers/file-writer-events.html
r98407 r106898 4 4 <title>File Writer Events Worker</title> 5 5 <script src="../../js/resources/js-test-pre.js"></script> 6 <script src="../resources/fs-worker-test-util.js"></script>7 6 </head> 8 7 <body> -
trunk/LayoutTests/fast/filesystem/workers/file-writer-gc-blob.html
r98407 r106898 4 4 <title>File Writer GC Blob Worker</title> 5 5 <script src="../../js/resources/js-test-pre.js"></script> 6 <script src="../resources/fs-worker-test-util.js"></script>7 6 </head> 8 7 <body> -
trunk/LayoutTests/fast/filesystem/workers/file-writer-sync-truncate-extend.html
r98407 r106898 4 4 <title>File Writer Sync Truncate-To-Extend</title> 5 5 <script src="../../js/resources/js-test-pre.js"></script> 6 <script src="../resources/fs-worker-test-util.js"></script>7 6 </head> 8 7 <body> -
trunk/LayoutTests/fast/filesystem/workers/file-writer-sync-write-overlapped.html
r98407 r106898 4 4 <title>File Writer Sync Truncate-To-Extend</title> 5 5 <script src="../../js/resources/js-test-pre.js"></script> 6 <script src="../resources/fs-worker-test-util.js"></script>7 6 </head> 8 7 <body> -
trunk/LayoutTests/fast/filesystem/workers/file-writer-truncate-extend.html
r98407 r106898 4 4 <title>File Writer Truncate-To-Extend Worker</title> 5 5 <script src="../../js/resources/js-test-pre.js"></script> 6 <script src="../resources/fs-worker-test-util.js"></script>7 6 </head> 8 7 <body> -
trunk/LayoutTests/fast/filesystem/workers/file-writer-write-overlapped.html
r98407 r106898 4 4 <title>File Writer Write Overlapped Worker</title> 5 5 <script src="../../js/resources/js-test-pre.js"></script> 6 <script src="../resources/fs-worker-test-util.js"></script>7 6 </head> 8 7 <body> -
trunk/LayoutTests/fast/filesystem/workers/simple-persistent-sync.html
r98407 r106898 2 2 <head> 3 3 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../resources/fs-worker-test-util.js"></script>5 4 </head> 6 5 <body> -
trunk/LayoutTests/fast/filesystem/workers/simple-persistent.html
r98407 r106898 2 2 <head> 3 3 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../resources/fs-worker-test-util.js"></script>5 4 </head> 6 5 <body> -
trunk/LayoutTests/fast/filesystem/workers/simple-temporary-sync.html
r98407 r106898 2 2 <head> 3 3 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../resources/fs-worker-test-util.js"></script>5 4 </head> 6 5 <body> -
trunk/LayoutTests/fast/filesystem/workers/simple-temporary.html
r98407 r106898 2 2 <head> 3 3 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../resources/fs-worker-test-util.js"></script>5 4 </head> 6 5 <body> -
trunk/LayoutTests/fast/filesystem/workers/sync-operations.html
r98407 r106898 2 2 <head> 3 3 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../resources/fs-worker-test-util.js"></script>5 4 </head> 6 5 <body> -
trunk/LayoutTests/fast/js/resources/js-test-pre.js
r106684 r106898 48 48 span.innerHTML = msg + '<br />'; 49 49 }; 50 51 function isWorker()52 {53 return typeof document === 'undefined';54 }55 50 56 51 var css = … … 84 79 85 80 })(); 81 82 function isWorker() 83 { 84 // It's conceivable that someone would stub out 'document' in a worker so 85 // also check for childNodes, an arbitrary DOM-related object that is 86 // meaningless in a WorkerContext. 87 return (typeof document === 'undefined' || typeof document.childNodes === 'undefined') && !!self.importScripts; 88 } 86 89 87 90 function descriptionQuiet(msg) { description(msg, true); } … … 425 428 layoutTestController.notifyDone(); 426 429 } 430 431 function startWorker(testScriptURL) 432 { 433 self.jsTestIsAsync = true; 434 debug('Starting worker: ' + testScriptURL); 435 var worker = new Worker(testScriptURL); 436 worker.onmessage = function(event) 437 { 438 var workerPrefix = "[Worker] "; 439 if (event.data.length < 5 || event.data.charAt(4) != ':') { 440 debug(workerPrefix + event.data); 441 return; 442 } 443 var code = event.data.substring(0, 4); 444 var payload = workerPrefix + event.data.substring(5); 445 if (code == "PASS") 446 testPassed(payload); 447 else if (code == "FAIL") 448 testFailed(payload); 449 else if (code == "DESC") 450 description(payload); 451 else if (code == "DONE") 452 finishJSTest(); 453 else 454 debug(workerPrefix + event.data); 455 }; 456 457 worker.onerror = function(event) 458 { 459 debug('Got error from worker: ' + event.message); 460 finishJSTest(); 461 } 462 } 463 464 if (isWorker()) { 465 description = function(msg, quiet) { 466 postMessage('DESC:' + msg); 467 } 468 testFailed = function(msg) { 469 postMessage('FAIL:' + msg); 470 } 471 testPassed = function(msg) { 472 postMessage('PASS:' + msg); 473 } 474 finishJSTest = function() { 475 postMessage('DONE:'); 476 } 477 debug = function(msg) { 478 postMessage(msg); 479 } 480 } -
trunk/LayoutTests/storage/indexeddb/basics-workers.html
r106392 r106898 3 3 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 4 <script src="resources/shared.js"></script> 5 <script src="../../fast/filesystem/resources/fs-worker-test-util.js"></script>6 5 </head> 7 6 <body> -
trunk/LayoutTests/storage/indexeddb/index-basics-workers.html
r106886 r106898 3 3 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 4 <script src="resources/shared.js"></script> 5 <script src="../../fast/filesystem/resources/fs-worker-test-util.js"></script>6 5 </head> 7 6 <body> -
trunk/LayoutTests/storage/indexeddb/objectstore-basics-workers.html
r106886 r106898 3 3 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 4 <script src="resources/shared.js"></script> 5 <script src="../../fast/filesystem/resources/fs-worker-test-util.js"></script>6 5 </head> 7 6 <body> -
trunk/LayoutTests/storage/indexeddb/resources/basics.js
r106684 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../../../fast/js/resources/js-test-pre.js'); 3 importScripts('idb-worker-common.js');4 3 importScripts('shared.js'); 5 4 } -
trunk/LayoutTests/storage/indexeddb/resources/index-basics.js
r106886 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../../../fast/js/resources/js-test-pre.js'); 3 importScripts('idb-worker-common.js');4 3 importScripts('shared.js'); 5 4 } -
trunk/LayoutTests/storage/indexeddb/resources/objectstore-basics.js
r106886 r106898 1 1 if (this.importScripts) { 2 2 importScripts('../../../fast/js/resources/js-test-pre.js'); 3 importScripts('idb-worker-common.js');4 3 importScripts('shared.js'); 5 4 }
Note: See TracChangeset
for help on using the changeset viewer.