Changeset 106392 in webkit
- Timestamp:
- Jan 31, 2012 2:05:31 PM (12 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 added
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r106390 r106392 1 2012-01-31 David Grogan <dgrogan@chromium.org> 2 3 IndexedDB: refactor basics layout test so that it can be run on workers. 4 https://bugs.webkit.org/show_bug.cgi?id=76683 5 6 Reviewed by Tony Chang. 7 8 * storage/indexeddb/basics-workers-expected.txt: Added. 9 * storage/indexeddb/basics-workers.html: Added. 10 * storage/indexeddb/basics.html: 11 * storage/indexeddb/resources/basics.js: Copied from LayoutTests/storage/indexeddb/basics.html. 12 (test): 13 (openCallback): 14 * storage/indexeddb/resources/idb-worker-common.js: Added. 15 (debug): 16 (finishJSTest): 17 (description): 18 (testPassed): 19 (testFailed): 20 1 21 2012-01-31 Eric Seidel <eric@webkit.org> 2 22 -
trunk/LayoutTests/storage/indexeddb/basics-expected.txt
r79458 r106392 4 4 5 5 6 PASS 'webkitIndexedDB' in windowis true6 PASS 'webkitIndexedDB' in self is true 7 7 PASS webkitIndexedDB == null is false 8 PASS 'webkitIDBCursor' in windowis true8 PASS 'webkitIDBCursor' in self is true 9 9 PASS webkitIDBCursor == null is false 10 10 webkitIndexedDB.open('basics') -
trunk/LayoutTests/storage/indexeddb/basics.html
r99258 r106392 7 7 <p id="description"></p> 8 8 <div id="console"></div> 9 <script> 10 11 description("Test IndexedDB's basics."); 12 if (window.layoutTestController) 13 layoutTestController.waitUntilDone(); 14 15 function test() 16 { 17 shouldBeTrue("'webkitIndexedDB' in window"); 18 shouldBeFalse("webkitIndexedDB == null"); 19 20 shouldBeTrue("'webkitIDBCursor' in window"); 21 shouldBeFalse("webkitIDBCursor == null"); 22 23 request = evalAndLog("webkitIndexedDB.open('basics')"); 24 shouldBeTrue("'result' in request"); 25 evalAndExpectException("request.result", "webkitIDBDatabaseException.NOT_ALLOWED_ERR"); 26 shouldBeTrue("'errorCode' in request"); 27 evalAndExpectException("request.errorCode", "webkitIDBDatabaseException.NOT_ALLOWED_ERR"); 28 shouldBeTrue("'webkitErrorMessage' in request"); 29 evalAndExpectException("request.webkitErrorMessage", "webkitIDBDatabaseException.NOT_ALLOWED_ERR"); 30 shouldBeTrue("'source' in request"); 31 shouldBe("request.source", "webkitIndexedDB"); 32 shouldBeTrue("'transaction' in request"); 33 shouldBeNull("request.transaction"); 34 shouldBeTrue("'readyState' in request"); 35 shouldBe("request.readyState", "webkitIDBRequest.LOADING"); 36 shouldBeTrue("'onsuccess' in request"); 37 shouldBeNull("request.onsuccess"); 38 shouldBeTrue("'onerror' in request"); 39 shouldBeNull("request.onerror"); 40 shouldBe("request.LOADING", "1"); 41 shouldBe("request.DONE", "2"); 42 request.onsuccess = openCallback; 43 request.onerror = unexpectedErrorCallback; 44 } 45 46 function openCallback() 47 { 48 shouldBeTrue("'result' in event.target"); 49 shouldBeTrue("!!event.target.result"); 50 shouldBeTrue("'errorCode' in event.target"); 51 shouldBe("event.target.errorCode", "0"); 52 shouldBeTrue("'webkitErrorMessage' in event.target"); 53 shouldBeUndefined("event.target.webkitErrorMessage"); 54 shouldBeTrue("'source' in event.target"); 55 shouldBe("request.source", "webkitIndexedDB"); 56 shouldBeTrue("'transaction' in event.target"); 57 shouldBeNull("event.target.transaction"); 58 shouldBeTrue("'readyState' in request"); 59 shouldBe("event.target.readyState", "webkitIDBRequest.DONE"); 60 shouldBeTrue("'onsuccess' in event.target"); 61 shouldBeTrue("'onerror' in event.target"); 62 shouldBe("event.target.LOADING", "1"); 63 shouldBe("event.target.DONE", "2"); 64 65 done(); 66 } 67 68 test(); 69 70 71 </script> 9 <script src="resources/basics.js"></script> 10 <script src="../../fast/js/resources/js-test-post.js"></script> 72 11 </body> 73 12 </html> -
trunk/LayoutTests/storage/indexeddb/resources/basics.js
r106391 r106392 1 <html> 2 <head> 3 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 <script src="resources/shared.js"></script> 5 </head> 6 <body> 7 <p id="description"></p> 8 <div id="console"></div> 9 <script> 1 if (this.importScripts) { 2 // FIXME: Change js-test-pre.js to use self in place of window where 3 // possible, so we can remove the next line. http://webkit.org/b/76762 4 window = self; 5 importScripts('../../../fast/js/resources/js-test-pre.js'); 6 importScripts('idb-worker-common.js'); 7 importScripts('shared.js'); 8 } 10 9 11 10 description("Test IndexedDB's basics."); 12 if (window.layoutTestController)13 layoutTestController.waitUntilDone();14 11 15 12 function test() 16 13 { 17 shouldBeTrue("'webkitIndexedDB' in window");14 shouldBeTrue("'webkitIndexedDB' in self"); 18 15 shouldBeFalse("webkitIndexedDB == null"); 19 16 20 shouldBeTrue("'webkitIDBCursor' in window");17 shouldBeTrue("'webkitIDBCursor' in self"); 21 18 shouldBeFalse("webkitIDBCursor == null"); 22 19 … … 44 41 } 45 42 46 function openCallback( )43 function openCallback(evt) 47 44 { 45 event = evt; 48 46 shouldBeTrue("'result' in event.target"); 49 47 shouldBeTrue("!!event.target.result"); … … 63 61 shouldBe("event.target.DONE", "2"); 64 62 65 done();63 finishJSTest(); 66 64 } 67 65 68 66 test(); 69 70 71 </script>72 </body>73 </html> -
trunk/LayoutTests/storage/indexeddb/resources/shared.js
r85153 r106392 1 var jsTestIsAsync = true; 2 1 3 function done() 2 4 {
Note: See TracChangeset
for help on using the changeset viewer.