Changeset 46498 in webkit
- Timestamp:
- Jul 28, 2009 1:28:40 PM (15 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 1 added
- 8 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r46487 r46498 1 2009-07-28 Jeremy Orlow <jorlow@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Add some checks to existing DOM Storage LayoutTests. 6 https://bugs.webkit.org/show_bug.cgi?id=27695 7 8 This is really a mixed bag of tweaks to existing tests. 9 10 * storage/domstorage/localstorage/delete-removal-expected.txt: 11 * storage/domstorage/localstorage/delete-removal.html: 12 Made output more readable, added redundant deletes, added deletes to 13 keys with the same name in different case. 14 * storage/domstorage/localstorage/enumerate-storage.html: 15 Removed dead code. 16 * storage/domstorage/localstorage/enumerate-with-length-and-key-expected.txt: Added. 17 * storage/domstorage/localstorage/enumerate-with-length-and-key.html: Copied from LayoutTests/storage/domstorage/localstorage/enumerate-storage.html. 18 Test enumerating by hand (with length+key). 19 * storage/domstorage/localstorage/iframe-events-expected.txt: 20 * storage/domstorage/localstorage/iframe-events.html: 21 Test removeItem and clear in addition to setItem. 22 * storage/domstorage/localstorage/onstorage-attribute-setwindow-expected.txt: Copied from LayoutTests/storage/domstorage/localstorage/onstorage-attribute-setattribute-expected.txt. 23 * storage/domstorage/localstorage/onstorage-attribute-setwindow.html: Copied from LayoutTests/storage/domstorage/localstorage/onstorage-attribute-setattribute.html. 24 Test using window.onstorage. 25 * storage/domstorage/window-attributes-exist-expected.txt: 26 * storage/domstorage/window-attributes-exist.html: 27 Verify that two consecutive calls to window.____Storage will equal each other. 28 1 29 2009-07-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> 2 30 -
trunk/LayoutTests/storage/domstorage/localstorage/delete-removal-expected.txt
r33565 r46498 1 1 This test makes sure that using the syntax `delete localStorage.keyName` works as an alias to `localStorage.removeItem(keyName).` 2 foo is: undefined 3 foo is: bar 4 foo is: undefined 5 foo is: bar 6 foo is: undefined 7 foo is: bar 8 foo is: undefined 2 foo (before anything) is: undefined 3 foo (after a named property settter set) is: bar 4 foo (after a delete) is: undefined 5 foo (after an indexed setter set) is: bar 6 foo (after deleting FOO (not foo)) is: bar 7 foo (after a delete) is: undefined 8 foo (after calling setItem) is: bar 9 foo (after a delete) is: undefined 10 foo (after a redundant delete) is: undefined 11 foo (after an implicit settter set) is: bar 12 foo (after an indexed delete) is: undefined 9 13 -
trunk/LayoutTests/storage/domstorage/localstorage/delete-removal.html
r46314 r46498 20 20 } 21 21 22 log("foo is: " + localStorage.foo);22 log("foo (before anything) is: " + localStorage.foo); 23 23 localStorage.foo = "bar"; 24 log("foo is: " + localStorage.foo);24 log("foo (after a named property settter set) is: " + localStorage.foo); 25 25 delete localStorage.foo; 26 log("foo is: " + localStorage.foo);26 log("foo (after a delete) is: " + localStorage.foo); 27 27 localStorage["foo"] = "bar"; 28 log("foo is: " + localStorage.foo); 28 log("foo (after an indexed setter set) is: " + localStorage.foo); 29 delete localStorage.FOO; 30 log("foo (after deleting FOO (not foo)) is: " + localStorage.foo); 29 31 delete localStorage.foo; 30 log("foo is: " + localStorage.foo);32 log("foo (after a delete) is: " + localStorage.foo); 31 33 localStorage.setItem("foo", "bar"); 32 log("foo is: " + localStorage.foo);34 log("foo (after calling setItem) is: " + localStorage.foo); 33 35 delete localStorage.foo; 34 log("foo is: " + localStorage.foo); 36 log("foo (after a delete) is: " + localStorage.foo); 37 delete localStorage.foo; 38 log("foo (after a redundant delete) is: " + localStorage.foo); 39 localStorage.foo = "bar"; 40 log("foo (after an implicit settter set) is: " + localStorage.foo); 41 delete localStorage["foo"]; 42 log("foo (after an indexed delete) is: " + localStorage.foo); 35 43 } 36 44 -
trunk/LayoutTests/storage/domstorage/localstorage/enumerate-storage.html
r46314 r46498 10 10 { 11 11 document.getElementById("logger").innerHTML += a + "<br>"; 12 }13 14 function finish()15 {16 if (window.layoutTestController)17 layoutTestController.notifyDone()18 12 } 19 13 -
trunk/LayoutTests/storage/domstorage/localstorage/enumerate-with-length-and-key.html
r46402 r46498 10 10 { 11 11 document.getElementById("logger").innerHTML += a + "<br>"; 12 }13 14 function finish()15 {16 if (window.layoutTestController)17 layoutTestController.notifyDone()18 12 } 19 13 … … 35 29 // Enumerate localStorage, appending each key onto an array 36 30 var enumeratedArray = new Array(); 37 for (var n in localStorage)38 enumeratedArray.push( n);31 for (var i=0; i<localStorage.length; ++i) 32 enumeratedArray.push(localStorage.key(i)); 39 33 40 34 // Sort the array, since the storage order isn't guaranteed … … 48 42 </head> 49 43 <body onload="startTest();"> 50 This test checks to see that you can enumerate a Storage object and get only the keys as a result. The built-in properties of the Storage object should be ignored. The test operates on the localStorage object.<br>44 This test attempts to enumerate all the keys in localStorage with .length + .key(). The built-in properties of the Storage object should be ignored. The test operates on the localStorage object.<br> 51 45 <div id="logger"></div> 52 46 </body> -
trunk/LayoutTests/storage/domstorage/localstorage/iframe-events-expected.txt
r44481 r46498 1 1 This is the main frame of a 2-frame document. Each frame is in the same security origin and therefore shares the same localStorage object. As a result, each frame should receive a StorageEvent when either frame changes the localStorage object. 2 2 3 Main frame about to changelocalStorage...3 Main frame about to run setItem on localStorage... 4 4 Main Frame received StorageEvent: 5 5 Key - Main Frame … … 35 35 Storage Area - This window's window.localStorage 36 36 37 Main frame about to run removeItem on localStorage... 38 Main Frame received StorageEvent: 39 Key - Main Frame 40 New Value - null 41 Old Value - SET 42 URI - LayoutTests/storage/domstorage/localstorage/iframe-events.html 43 Source - LayoutTests/storage/domstorage/localstorage/iframe-events.html 44 Storage Area - This window's window.localStorage 37 45 46 Subframe received storage event: 47 Key - Main Frame 48 New Value - null 49 Old Value - SET 50 URI - LayoutTests/storage/domstorage/localstorage/iframe-events.html 51 Source - LayoutTests/storage/domstorage/localstorage/iframe-events.html 52 Storage Area - This window's window.localStorage 53 54 Subframe about to change localStorage... 55 Main frame about to clear localStorage... 56 Main Frame received StorageEvent: 57 Key - 58 New Value - null 59 Old Value - null 60 URI - LayoutTests/storage/domstorage/localstorage/iframe-events.html 61 Source - LayoutTests/storage/domstorage/localstorage/iframe-events.html 62 Storage Area - This window's window.localStorage 63 64 Subframe received storage event: 65 Key - 66 New Value - null 67 Old Value - null 68 URI - LayoutTests/storage/domstorage/localstorage/iframe-events.html 69 Source - LayoutTests/storage/domstorage/localstorage/iframe-events.html 70 Storage Area - This window's window.localStorage 71 72 Subframe about to change localStorage... 73 Main Frame received StorageEvent: 74 Key - Subframe 75 New Value - SET 76 Old Value - null 77 URI - LayoutTests/storage/domstorage/localstorage/resources/iframe-events-second.html 78 Source - LayoutTests/storage/domstorage/localstorage/resources/iframe-events-second.html 79 Storage Area - This window's window.localStorage 80 81 Subframe received storage event: 82 Key - Subframe 83 New Value - SET 84 Old Value - null 85 URI - LayoutTests/storage/domstorage/localstorage/resources/iframe-events-second.html 86 Source - LayoutTests/storage/domstorage/localstorage/resources/iframe-events-second.html 87 Storage Area - This window's window.localStorage 88 89 -
trunk/LayoutTests/storage/domstorage/localstorage/iframe-events.html
r44481 r46498 49 49 50 50 window.addEventListener("storage", handleStorageEvent, false); 51 log("Main frame about to changelocalStorage...");51 log("Main frame about to run setItem on localStorage..."); 52 52 localStorage.setItem("Main Frame", "SET"); 53 log("Main frame about to run removeItem on localStorage..."); 54 localStorage.removeItem("Main Frame"); 55 log("Main frame about to clear localStorage..."); 56 localStorage.clear(); 53 57 } 54 58 -
trunk/LayoutTests/storage/domstorage/localstorage/onstorage-attribute-setwindow-expected.txt
r46402 r46498 1 This is a test to make sure LocalStorage mutations fire StorageEvents that are caught by the event listener corresponding to body.onstorage. The event listener is setup via body.setAttribute().1 This is a test to make sure LocalStorage mutations fire StorageEvents that are caught by the event listener corresponding to window.onstorage. 2 2 Storage event fired: 3 3 Key - FOO -
trunk/LayoutTests/storage/domstorage/localstorage/onstorage-attribute-setwindow.html
r46402 r46498 32 32 return; 33 33 } 34 35 document.body.setAttribute("onstorage", "handleStorageEvent();");34 35 window.onstorage = handleStorageEvent; 36 36 37 37 window.localStorage.setItem("FOO", "BAR"); … … 44 44 </head> 45 45 <body onload="runTest();"> 46 This is a test to make sure LocalStorage mutations fire StorageEvents that are caught by the event listener corresponding to body.onstorage. The event listener is setup via body.setAttribute().<br>46 This is a test to make sure LocalStorage mutations fire StorageEvents that are caught by the event listener corresponding to window.onstorage.<br> 47 47 <div id="logger"></div> 48 48 </body> -
trunk/LayoutTests/storage/domstorage/window-attributes-exist-expected.txt
r44301 r46498 6 6 Storage object sessionStorage has setItem 7 7 Storage object sessionStorage has removeItem 8 Storage object sessionStorage has clear 9 window.sessionStorage == window.sessionStorage: true 10 window.sessionStorage === window.sessionStorage: true 8 11 window.localStorage exists 9 12 Storage object localStorage has length … … 12 15 Storage object localStorage has setItem 13 16 Storage object localStorage has removeItem 17 Storage object localStorage has clear 18 window.localStorage == window.localStorage: true 19 window.localStorage === window.localStorage: true 14 20 window.onstorage exists 15 21 The onstorage property works when a storage event is fired. -
trunk/LayoutTests/storage/domstorage/window-attributes-exist.html
r46314 r46498 23 23 if ("removeItem" in storage) 24 24 log("Storage object " + name + " has removeItem"); 25 if ("clear" in storage) 26 log("Storage object " + name + " has clear"); 25 27 } 26 28 … … 40 42 log("window.sessionStorage exists"); 41 43 testStorage("sessionStorage", window.sessionStorage); 44 log("window.sessionStorage == window.sessionStorage: " + (window.sessionStorage == window.sessionStorage)); 45 log("window.sessionStorage === window.sessionStorage: " + (window.sessionStorage === window.sessionStorage)); 42 46 } else 43 47 log("window.sessionStorage DOES NOT exist"); … … 46 50 log("window.localStorage exists"); 47 51 testStorage("localStorage", window.localStorage); 52 log("window.localStorage == window.localStorage: " + (window.localStorage == window.localStorage)); 53 log("window.localStorage === window.localStorage: " + (window.localStorage === window.localStorage)); 48 54 } else 49 55 log("window.localStorage DOES NOT exist");
Note: See TracChangeset
for help on using the changeset viewer.