Changeset 117806 in webkit
- Timestamp:
- May 21, 2012, 12:20:14 PM (14 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 9 edited
-
ChangeLog (modified) (1 diff)
-
fast/dom/HTMLElement/class-list-expected.txt (modified) (1 diff)
-
fast/dom/HTMLElement/class-list-quirks-expected.txt (modified) (1 diff)
-
fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt (modified) (1 diff)
-
fast/js/resources/js-test-pre.js (modified) (2 diffs)
-
fast/js/resources/standalone-pre.js (modified) (1 diff)
-
storage/domstorage/complex-values-expected.txt (modified) (2 diffs)
-
storage/indexeddb/cursor-advance-expected.txt (modified) (10 diffs)
-
storage/indexeddb/resources/cursor-advance.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r117804 r117806 1 2012-05-21 Joshua Bell <jsbell@chromium.org> 2 3 LayoutTests: fast/js/resources/js-test-pre.js - shouldBeEqualToString fails on " 4 https://bugs.webkit.org/show_bug.cgi?id=86931 5 6 Implementations of shouldBeEqualToString() function were not correctly escaping 7 double quote ('"') characters. Switch to using JSON.stringify() which does 8 correct escaping, and updated one test that couldn't previously use the function. 9 10 Reviewed by Ojan Vafai. 11 12 * fast/js/resources/js-test-pre.js: 13 (shouldBeEqualToString): 14 * fast/js/resources/standalone-pre.js: 15 (shouldBeEqualToString): 16 * storage/indexeddb/cursor-advance-expected.txt: 17 * storage/indexeddb/resources/cursor-advance.js: 18 (runTest): 19 1 20 2012-05-21 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> 2 21 -
trunk/LayoutTests/fast/dom/HTMLElement/class-list-expected.txt
r96827 r117806 25 25 Testing add in presence of trailing white spaces. 26 26 PASS element.className is "x y" 27 PASS element.className is "x y"27 PASS element.className is "x\t y" 28 28 PASS element.className is " y" 29 29 Test invalid tokens -
trunk/LayoutTests/fast/dom/HTMLElement/class-list-quirks-expected.txt
r96827 r117806 25 25 Testing add in presence of trailing white spaces. 26 26 PASS element.className is "x y" 27 PASS element.className is "x y"27 PASS element.className is "x\t y" 28 28 PASS element.className is " y" 29 29 Test invalid tokens -
trunk/LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt
r71373 r117806 27 27 - Testing add in presence of trailing white spaces. 28 28 PASS element.htmlFor.toString() is "x y" 29 PASS element.htmlFor.toString() is "x y"29 PASS element.htmlFor.toString() is "x\t y" 30 30 PASS element.htmlFor.toString() is " y" 31 31 - Test invalid tokens -
trunk/LayoutTests/fast/js/resources/js-test-pre.js
r116511 r117806 69 69 (document.head || document.documentElement).appendChild(styleElement); 70 70 } 71 71 72 72 if (!isWorker()) 73 73 insertStyleSheet(); … … 259 259 function shouldBeEqualToString(a, b) 260 260 { 261 var unevaledString = '"' + b.replace(/\\/g, "\\\\").replace(/"/g, "\"").replace(/\n/g, "\\n").replace(/\r/g, "\\r") + '"'; 261 if (typeof a !== "string" || typeof b !== "string") 262 debug("WARN: shouldBeEqualToString() expects string arguments"); 263 var unevaledString = JSON.stringify(b); 262 264 shouldBe(a, unevaledString); 263 265 } -
trunk/LayoutTests/fast/js/resources/standalone-pre.js
r107997 r117806 99 99 function shouldBeEqualToString(a, b) 100 100 { 101 var unevaledString = '"' + b.replace(/\\/g, "\\\\").replace(/"/g, "\"").replace(/\n/g, "\\n").replace(/\r/g, "\\r") + '"'; 101 if (typeof a !== "string" || typeof b !== "string") 102 debug("WARN: shouldBeEqualToString() expects string arguments"); 103 var unevaledString = JSON.stringify(b); 102 104 shouldBe(a, unevaledString); 103 105 } -
trunk/LayoutTests/storage/domstorage/complex-values-expected.txt
r64796 r117806 83 83 storage.foo10 = k 84 84 PASS typeof storage['foo10'] is "string" 85 PASS storage['foo10'] is "ÿ찡\ 0hello"85 PASS storage['foo10'] is "ÿ찡\u0000hello" 86 86 PASS typeof storage.foo10 is "string" 87 PASS storage.foo10 is "ÿ찡\ 0hello"87 PASS storage.foo10 is "ÿ찡\u0000hello" 88 88 PASS typeof storage.getItem('foo10') is "string" 89 PASS storage.getItem('foo10') is "ÿ찡\ 0hello"89 PASS storage.getItem('foo10') is "ÿ찡\u0000hello" 90 90 storage['foo11'] = k 91 91 PASS typeof storage['foo11'] is "string" 92 PASS storage['foo11'] is "ÿ찡\ 0hello"92 PASS storage['foo11'] is "ÿ찡\u0000hello" 93 93 PASS typeof storage.foo11 is "string" 94 PASS storage.foo11 is "ÿ찡\ 0hello"94 PASS storage.foo11 is "ÿ찡\u0000hello" 95 95 PASS typeof storage.getItem('foo11') is "string" 96 PASS storage.getItem('foo11') is "ÿ찡\ 0hello"96 PASS storage.getItem('foo11') is "ÿ찡\u0000hello" 97 97 storage.setItem('foo12', k) 98 98 PASS typeof storage['foo12'] is "string" 99 PASS storage['foo12'] is "ÿ찡\ 0hello"99 PASS storage['foo12'] is "ÿ찡\u0000hello" 100 100 PASS typeof storage.foo12 is "string" 101 PASS storage.foo12 is "ÿ찡\ 0hello"101 PASS storage.foo12 is "ÿ찡\u0000hello" 102 102 PASS typeof storage.getItem('foo12') is "string" 103 PASS storage.getItem('foo12') is "ÿ찡\ 0hello"103 PASS storage.getItem('foo12') is "ÿ찡\u0000hello" 104 104 105 105 … … 183 183 storage.foo10 = k 184 184 PASS typeof storage['foo10'] is "string" 185 PASS storage['foo10'] is "ÿ찡\ 0hello"185 PASS storage['foo10'] is "ÿ찡\u0000hello" 186 186 PASS typeof storage.foo10 is "string" 187 PASS storage.foo10 is "ÿ찡\ 0hello"187 PASS storage.foo10 is "ÿ찡\u0000hello" 188 188 PASS typeof storage.getItem('foo10') is "string" 189 PASS storage.getItem('foo10') is "ÿ찡\ 0hello"189 PASS storage.getItem('foo10') is "ÿ찡\u0000hello" 190 190 storage['foo11'] = k 191 191 PASS typeof storage['foo11'] is "string" 192 PASS storage['foo11'] is "ÿ찡\ 0hello"192 PASS storage['foo11'] is "ÿ찡\u0000hello" 193 193 PASS typeof storage.foo11 is "string" 194 PASS storage.foo11 is "ÿ찡\ 0hello"194 PASS storage.foo11 is "ÿ찡\u0000hello" 195 195 PASS typeof storage.getItem('foo11') is "string" 196 PASS storage.getItem('foo11') is "ÿ찡\ 0hello"196 PASS storage.getItem('foo11') is "ÿ찡\u0000hello" 197 197 storage.setItem('foo12', k) 198 198 PASS typeof storage['foo12'] is "string" 199 PASS storage['foo12'] is "ÿ찡\ 0hello"199 PASS storage['foo12'] is "ÿ찡\u0000hello" 200 200 PASS typeof storage.foo12 is "string" 201 PASS storage.foo12 is "ÿ찡\ 0hello"201 PASS storage.foo12 is "ÿ찡\u0000hello" 202 202 PASS typeof storage.getItem('foo12') is "string" 203 PASS storage.getItem('foo12') is "ÿ찡\ 0hello"203 PASS storage.getItem('foo12') is "ÿ찡\u0000hello" 204 204 PASS successfullyParsed is true 205 205 -
trunk/LayoutTests/storage/indexeddb/cursor-advance-expected.txt
r116337 r117806 36 36 request = store.openCursor() 37 37 cursor.advance(1) 38 PASS expected is '{"key":"237-23-7733","value":{"name":"Ann","height":52,"weight":110},"primaryKey":"237-23-7733"}'38 PASS expected is "{\"key\":\"237-23-7733\",\"value\":{\"name\":\"Ann\",\"height\":52,\"weight\":110},\"primaryKey\":\"237-23-7733\"}" 39 39 testContinueThenAdvance() 40 40 trans = db.transaction(objectStoreName) … … 45 45 cursor.continue(); 46 46 cursor.advance(1) 47 PASS expected is '{"key":"237-23-7736","value":{"name":"Joe","height":65,"weight":150},"primaryKey":"237-23-7736"}'47 PASS expected is "{\"key\":\"237-23-7736\",\"value\":{\"name\":\"Joe\",\"height\":65,\"weight\":150},\"primaryKey\":\"237-23-7736\"}" 48 48 testAdvanceMultiple() 49 49 trans = db.transaction(objectStoreName) … … 51 51 request = store.openCursor() 52 52 cursor.advance(3) 53 PASS expected is '{"key":"237-23-7735","value":{"name":"Sue","height":58,"weight":130},"primaryKey":"237-23-7735"}'53 PASS expected is "{\"key\":\"237-23-7735\",\"value\":{\"name\":\"Sue\",\"height\":58,\"weight\":130},\"primaryKey\":\"237-23-7735\"}" 54 54 testAdvanceIndex() 55 55 trans = db.transaction(objectStoreName) … … 57 57 request = store.openCursor() 58 58 cursor.advance(3) 59 PASS expected is '{"key":"Jef","value":{"name":"Jef","height":65,"weight":120},"primaryKey":"237-23-7739"}'59 PASS expected is "{\"key\":\"Jef\",\"value\":{\"name\":\"Jef\",\"height\":65,\"weight\":120},\"primaryKey\":\"237-23-7739\"}" 60 60 testAdvanceIndexNoDupe() 61 61 trans = db.transaction(objectStoreName) … … 63 63 request = store.openCursor(null, 'nextunique') 64 64 cursor.advance(3) 65 PASS expected is '{"key":130,"value":{"name":"Sue","height":58,"weight":130},"primaryKey":"237-23-7735"}'65 PASS expected is "{\"key\":130,\"value\":{\"name\":\"Sue\",\"height\":58,\"weight\":130},\"primaryKey\":\"237-23-7735\"}" 66 66 testAdvanceIndexPrev() 67 67 trans = db.transaction(objectStoreName) … … 69 69 request = store.openCursor(null, 'prev') 70 70 cursor.advance(3) 71 PASS expected is '{"key":150,"value":{"name":"Joe","height":65,"weight":150},"primaryKey":"237-23-7736"}'71 PASS expected is "{\"key\":150,\"value\":{\"name\":\"Joe\",\"height\":65,\"weight\":150},\"primaryKey\":\"237-23-7736\"}" 72 72 testAdvanceIndexPrevNoDupe() 73 73 trans = db.transaction(objectStoreName) … … 75 75 request = store.openCursor(null, 'prevunique') 76 76 cursor.advance(3) 77 PASS expected is '{"key":120,"value":{"name":"Bob","height":60,"weight":120},"primaryKey":"237-23-7732"}'77 PASS expected is "{\"key\":120,\"value\":{\"name\":\"Bob\",\"height\":60,\"weight\":120},\"primaryKey\":\"237-23-7732\"}" 78 78 testAdvanceToEnd() 79 79 trans = db.transaction(objectStoreName) … … 81 81 request = store.openCursor() 82 82 cursor.advance(100) 83 PASS expected is 'null'83 PASS expected is "null" 84 84 testPrefetchInRange() 85 85 trans = db.transaction(objectStoreName) 86 86 objectStore = trans.objectStore(objectStoreName) 87 87 request = objectStore.openCursor() 88 PASS expected is '{"key":"237-23-7732","value":{"name":"Bob","height":60,"weight":120},"primaryKey":"237-23-7732"}'88 PASS expected is "{\"key\":\"237-23-7732\",\"value\":{\"name\":\"Bob\",\"height\":60,\"weight\":120},\"primaryKey\":\"237-23-7732\"}" 89 89 cursor.continue() 90 PASS expected is '{"key":"237-23-7733","value":{"name":"Ann","height":52,"weight":110},"primaryKey":"237-23-7733"}'90 PASS expected is "{\"key\":\"237-23-7733\",\"value\":{\"name\":\"Ann\",\"height\":52,\"weight\":110},\"primaryKey\":\"237-23-7733\"}" 91 91 cursor.continue() 92 PASS expected is '{"key":"237-23-7734","value":{"name":"Ron","height":73,"weight":180},"primaryKey":"237-23-7734"}'92 PASS expected is "{\"key\":\"237-23-7734\",\"value\":{\"name\":\"Ron\",\"height\":73,\"weight\":180},\"primaryKey\":\"237-23-7734\"}" 93 93 cursor.continue() 94 PASS expected is '{"key":"237-23-7735","value":{"name":"Sue","height":58,"weight":130},"primaryKey":"237-23-7735"}'94 PASS expected is "{\"key\":\"237-23-7735\",\"value\":{\"name\":\"Sue\",\"height\":58,\"weight\":130},\"primaryKey\":\"237-23-7735\"}" 95 95 cursor.advance(2) 96 PASS expected is '{"key":"237-23-7737","value":{"name":"Pat","height":65,"weight":100},"primaryKey":"237-23-7737"}'96 PASS expected is "{\"key\":\"237-23-7737\",\"value\":{\"name\":\"Pat\",\"height\":65,\"weight\":100},\"primaryKey\":\"237-23-7737\"}" 97 97 cursor.continue() 98 PASS expected is '{"key":"237-23-7738","value":{"name":"Leo","height":65,"weight":180},"primaryKey":"237-23-7738"}'98 PASS expected is "{\"key\":\"237-23-7738\",\"value\":{\"name\":\"Leo\",\"height\":65,\"weight\":180},\"primaryKey\":\"237-23-7738\"}" 99 99 cursor.continue() 100 PASS expected is '{"key":"237-23-7739","value":{"name":"Jef","height":65,"weight":120},"primaryKey":"237-23-7739"}'100 PASS expected is "{\"key\":\"237-23-7739\",\"value\":{\"name\":\"Jef\",\"height\":65,\"weight\":120},\"primaryKey\":\"237-23-7739\"}" 101 101 cursor.continue() 102 PASS expected is '{"key":"237-23-7740","value":{"name":"Sam","height":71,"weight":110},"primaryKey":"237-23-7740"}'102 PASS expected is "{\"key\":\"237-23-7740\",\"value\":{\"name\":\"Sam\",\"height\":71,\"weight\":110},\"primaryKey\":\"237-23-7740\"}" 103 103 cursor.continue() 104 PASS expected is '{"key":"237-23-7741","value":{"name":"Bug","height":63,"weight":100},"primaryKey":"237-23-7741"}'104 PASS expected is "{\"key\":\"237-23-7741\",\"value\":{\"name\":\"Bug\",\"height\":63,\"weight\":100},\"primaryKey\":\"237-23-7741\"}" 105 105 cursor.continue() 106 PASS expected is '{"key":"237-23-7742","value":{"name":"Tub","height":69,"weight":180},"primaryKey":"237-23-7742"}'106 PASS expected is "{\"key\":\"237-23-7742\",\"value\":{\"name\":\"Tub\",\"height\":69,\"weight\":180},\"primaryKey\":\"237-23-7742\"}" 107 107 cursor.continue() 108 PASS expected is '{"key":"237-23-7743","value":{"name":"Rug","height":77,"weight":120},"primaryKey":"237-23-7743"}'108 PASS expected is "{\"key\":\"237-23-7743\",\"value\":{\"name\":\"Rug\",\"height\":77,\"weight\":120},\"primaryKey\":\"237-23-7743\"}" 109 109 cursor.continue() 110 PASS expected is '{"key":"237-23-7744","value":{"name":"Pug","height":66,"weight":110},"primaryKey":"237-23-7744"}'110 PASS expected is "{\"key\":\"237-23-7744\",\"value\":{\"name\":\"Pug\",\"height\":66,\"weight\":110},\"primaryKey\":\"237-23-7744\"}" 111 111 cursor.continue() 112 112 testPrefetchOutOfRange() … … 114 114 objectStore = trans.objectStore(objectStoreName) 115 115 request = objectStore.openCursor() 116 PASS expected is '{"key":"237-23-7732","value":{"name":"Bob","height":60,"weight":120},"primaryKey":"237-23-7732"}'116 PASS expected is "{\"key\":\"237-23-7732\",\"value\":{\"name\":\"Bob\",\"height\":60,\"weight\":120},\"primaryKey\":\"237-23-7732\"}" 117 117 cursor.continue() 118 PASS expected is '{"key":"237-23-7733","value":{"name":"Ann","height":52,"weight":110},"primaryKey":"237-23-7733"}'118 PASS expected is "{\"key\":\"237-23-7733\",\"value\":{\"name\":\"Ann\",\"height\":52,\"weight\":110},\"primaryKey\":\"237-23-7733\"}" 119 119 cursor.continue() 120 PASS expected is '{"key":"237-23-7734","value":{"name":"Ron","height":73,"weight":180},"primaryKey":"237-23-7734"}'120 PASS expected is "{\"key\":\"237-23-7734\",\"value\":{\"name\":\"Ron\",\"height\":73,\"weight\":180},\"primaryKey\":\"237-23-7734\"}" 121 121 cursor.continue() 122 PASS expected is '{"key":"237-23-7735","value":{"name":"Sue","height":58,"weight":130},"primaryKey":"237-23-7735"}'122 PASS expected is "{\"key\":\"237-23-7735\",\"value\":{\"name\":\"Sue\",\"height\":58,\"weight\":130},\"primaryKey\":\"237-23-7735\"}" 123 123 cursor.advance(7) 124 PASS expected is '{"key":"237-23-7742","value":{"name":"Tub","height":69,"weight":180},"primaryKey":"237-23-7742"}'124 PASS expected is "{\"key\":\"237-23-7742\",\"value\":{\"name\":\"Tub\",\"height\":69,\"weight\":180},\"primaryKey\":\"237-23-7742\"}" 125 125 cursor.continue() 126 PASS expected is '{"key":"237-23-7743","value":{"name":"Rug","height":77,"weight":120},"primaryKey":"237-23-7743"}'126 PASS expected is "{\"key\":\"237-23-7743\",\"value\":{\"name\":\"Rug\",\"height\":77,\"weight\":120},\"primaryKey\":\"237-23-7743\"}" 127 127 cursor.continue() 128 PASS expected is '{"key":"237-23-7744","value":{"name":"Pug","height":66,"weight":110},"primaryKey":"237-23-7744"}'128 PASS expected is "{\"key\":\"237-23-7744\",\"value\":{\"name\":\"Pug\",\"height\":66,\"weight\":110},\"primaryKey\":\"237-23-7744\"}" 129 129 cursor.continue() 130 130 testBadAdvance() … … 139 139 objectStore = trans.objectStore(objectStoreName) 140 140 request = objectStore.openCursor() 141 PASS expected is '{"key":"237-23-7732","value":{"name":"Bob","height":60,"weight":120},"primaryKey":"237-23-7732"}'141 PASS expected is "{\"key\":\"237-23-7732\",\"value\":{\"name\":\"Bob\",\"height\":60,\"weight\":120},\"primaryKey\":\"237-23-7732\"}" 142 142 cursor.advance(1) 143 PASS expected is '{"key":"237-23-7733","value":{"name":"Ann","height":52,"weight":110},"primaryKey":"237-23-7733"}'143 PASS expected is "{\"key\":\"237-23-7733\",\"value\":{\"name\":\"Ann\",\"height\":52,\"weight\":110},\"primaryKey\":\"237-23-7733\"}" 144 144 cursor.advance(1) 145 PASS expected is '{"key":"237-23-7734","value":{"name":"Ron","height":73,"weight":180},"primaryKey":"237-23-7734"}'145 PASS expected is "{\"key\":\"237-23-7734\",\"value\":{\"name\":\"Ron\",\"height\":73,\"weight\":180},\"primaryKey\":\"237-23-7734\"}" 146 146 cursor.delete() 147 PASS expected is '{"key":"237-23-7738","value":{"name":"Leo","height":65,"weight":180},"primaryKey":"237-23-7738"}'147 PASS expected is "{\"key\":\"237-23-7738\",\"value\":{\"name\":\"Leo\",\"height\":65,\"weight\":180},\"primaryKey\":\"237-23-7738\"}" 148 148 cursor.advance(1) 149 PASS expected is '{"key":"237-23-7739","value":{"name":"Jef","height":65,"weight":120},"primaryKey":"237-23-7739"}'149 PASS expected is "{\"key\":\"237-23-7739\",\"value\":{\"name\":\"Jef\",\"height\":65,\"weight\":120},\"primaryKey\":\"237-23-7739\"}" 150 150 cursor.advance(1) 151 PASS expected is '{"key":"237-23-7740","value":{"name":"Sam","height":71,"weight":110},"primaryKey":"237-23-7740"}'151 PASS expected is "{\"key\":\"237-23-7740\",\"value\":{\"name\":\"Sam\",\"height\":71,\"weight\":110},\"primaryKey\":\"237-23-7740\"}" 152 152 cursor.advance(1) 153 PASS expected is '{"key":"237-23-7741","value":{"name":"Bug","height":63,"weight":100},"primaryKey":"237-23-7741"}'153 PASS expected is "{\"key\":\"237-23-7741\",\"value\":{\"name\":\"Bug\",\"height\":63,\"weight\":100},\"primaryKey\":\"237-23-7741\"}" 154 154 cursor.advance(1) 155 PASS expected is '{"key":"237-23-7742","value":{"name":"Tub","height":69,"weight":180},"primaryKey":"237-23-7742"}'155 PASS expected is "{\"key\":\"237-23-7742\",\"value\":{\"name\":\"Tub\",\"height\":69,\"weight\":180},\"primaryKey\":\"237-23-7742\"}" 156 156 cursor.advance(1) 157 PASS expected is '{"key":"237-23-7743","value":{"name":"Rug","height":77,"weight":120},"primaryKey":"237-23-7743"}'157 PASS expected is "{\"key\":\"237-23-7743\",\"value\":{\"name\":\"Rug\",\"height\":77,\"weight\":120},\"primaryKey\":\"237-23-7743\"}" 158 158 cursor.advance(1) 159 PASS expected is '{"key":"237-23-7744","value":{"name":"Pug","height":66,"weight":110},"primaryKey":"237-23-7744"}'159 PASS expected is "{\"key\":\"237-23-7744\",\"value\":{\"name\":\"Pug\",\"height\":66,\"weight\":110},\"primaryKey\":\"237-23-7744\"}" 160 160 cursor.advance(1) 161 161 PASS successfullyParsed is true -
trunk/LayoutTests/storage/indexeddb/resources/cursor-advance.js
r116337 r117806 138 138 { 139 139 expected = JSON.stringify(expectedValue); 140 shouldBe ("expected", "'" + JSON.stringify(simplifyCursor(cursor)) + "'");140 shouldBeEqualToString("expected", JSON.stringify(simplifyCursor(cursor))); 141 141 } 142 142
Note:
See TracChangeset
for help on using the changeset viewer.