Changeset 232037 in webkit
- Timestamp:
- May 21, 2018 4:42:21 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 1 deleted
- 14 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r232033 r232037 1 2018-05-21 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r232030. 4 https://bugs.webkit.org/show_bug.cgi?id=185850 5 6 "Caused 7 TestWebKitAPI.IndexedDB.StructuredCloneBackwardCompatibility 8 API test to fail" (Requested by cdumez on #webkit). 9 10 Reverted changeset: 11 12 "File's structured serialization should serialize lastModified 13 attribute" 14 https://bugs.webkit.org/show_bug.cgi?id=185773 15 https://trac.webkit.org/changeset/232030 16 1 17 2018-05-11 Ryosuke Niwa <rniwa@webkit.org> 2 18 -
trunk/LayoutTests/TestExpectations
r232030 r232037 242 242 imported/w3c/web-platform-tests/workers/opaque-origin.html [ Skip ] 243 243 imported/w3c/web-platform-tests/workers/semantics/interface-objects/003.html [ Skip ] 244 imported/w3c/web-platform-tests/workers/semantics/structured-clone/shared.html [ Skip ] 245 imported/w3c/web-platform-tests/workers/semantics/structured-clone/dedicated.html [ Skip ] 244 246 imported/w3c/web-platform-tests/workers/semantics/multiple-workers/003.html [ Skip ] 245 247 imported/w3c/web-platform-tests/workers/semantics/multiple-workers/005.html [ Skip ] -
trunk/LayoutTests/fast/storage/serialized-script-value.html
r232030 r232037 6 6 <body> 7 7 <script> 8 9 const currentVersion = 0x07;10 8 11 9 // Here's a little Q&D helper for future adventurers needing to rebaseline this. … … 46 44 testSerialization({foo: 'zoo', bar: {baz: 'myNewKey'}}, 47 45 [ 48 currentVersion, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,46 0x06, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 49 47 0x80, 0x66, 0x6f, 0x6f, 0x10, 0x03, 0x00, 0x00, 50 48 0x80, 0x7a, 0x6f, 0x6f, 0x03, 0x00, 0x00, 0x80, … … 69 67 testSerialization({foo: 'zoo', bar: 'myNewKey'}, 70 68 [ 71 currentVersion, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,69 0x06, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 72 70 0x80, 0x66, 0x6f, 0x6f, 0x10, 0x03, 0x00, 0x00, 73 71 0x80, 0x7a, 0x6f, 0x6f, 0x03, 0x00, 0x00, 0x80, … … 77 75 ], 78 76 [ 79 currentVersion, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,77 0x03, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 80 78 0x00, 0x66, 0x00, 0x6f, 0x00, 0x6f, 0x00, 0x10, 81 79 0x03, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x6f, 0x00, … … 89 87 testSerialization([], 90 88 [ 91 currentVersion, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,89 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 92 90 0x00, 0xff, 0xff, 0xff, 0xff 93 91 ], … … 98 96 testSerialization({foo: "zoo"}, 99 97 [ 100 currentVersion, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,98 0x06, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 101 99 0x80, 0x66, 0x6f, 0x6f, 0x10, 0x03, 0x00, 0x00, 102 100 0x80, 0x7a, 0x6f, 0x6f, 0xff, 0xff, 0xff, 0xff … … 110 108 testSerialization({foo: null}, 111 109 [ 112 currentVersion, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,110 0x06, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 113 111 0x80, 0x66, 0x6f, 0x6f, 0x04, 0xff, 0xff, 0xff, 114 112 0xff … … 122 120 testSerialization({}, 123 121 [ 124 currentVersion, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff,122 0x06, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff, 125 123 0xff 126 124 ], … … 132 130 testSerialization(undefined, 133 131 [ 134 currentVersion, 0x00, 0x00, 0x00, 0x03132 0x06, 0x00, 0x00, 0x00, 0x03 135 133 ], 136 134 [ … … 139 137 testSerialization(true, 140 138 [ 141 currentVersion, 0x00, 0x00, 0x00, 0x09139 0x06, 0x00, 0x00, 0x00, 0x09 142 140 ], 143 141 [ … … 146 144 testSerialization(false, 147 145 [ 148 currentVersion, 0x00, 0x00, 0x00, 0x08146 0x06, 0x00, 0x00, 0x00, 0x08 149 147 ], 150 148 [ … … 153 151 testSerialization(new Array(100), 154 152 [ 155 currentVersion, 0x00, 0x00, 0x00, 0x01, 0x64, 0x00, 0x00,153 0x06, 0x00, 0x00, 0x00, 0x01, 0x64, 0x00, 0x00, 156 154 0x00, 0xff, 0xff, 0xff, 0xff 157 155 ], … … 162 160 testSerialization(10, 163 161 [ 164 currentVersion, 0x00, 0x00, 0x00, 0x05, 0x0a, 0x00, 0x00,162 0x06, 0x00, 0x00, 0x00, 0x05, 0x0a, 0x00, 0x00, 165 163 0x00 166 164 ], … … 171 169 testSerialization(-10, 172 170 [ 173 currentVersion, 0x00, 0x00, 0x00, 0x05, 0xf6, 0xff, 0xff,171 0x06, 0x00, 0x00, 0x00, 0x05, 0xf6, 0xff, 0xff, 174 172 0xff 175 173 ], … … 180 178 testSerialization(Math.pow(2,30), 181 179 [ 182 currentVersion, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,180 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 183 181 0x40 184 182 ], … … 189 187 testSerialization(Math.pow(2,55), 190 188 [ 191 currentVersion, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,189 0x06, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 192 190 0x00, 0x00, 0x00, 0x60, 0x43, 193 191 ], … … 198 196 testSerialization(1.23, 199 197 [ 200 currentVersion, 0x00, 0x00, 0x00, 0x0a, 0xae, 0x47, 0xe1,198 0x06, 0x00, 0x00, 0x00, 0x0a, 0xae, 0x47, 0xe1, 201 199 0x7a, 0x14, 0xae, 0xf3, 0x3f 202 200 ], … … 207 205 testSerialization("", 208 206 [ 209 currentVersion, 0x00, 0x00, 0x00, 0x11207 0x06, 0x00, 0x00, 0x00, 0x11 210 208 ], 211 209 [ … … 214 212 testSerialization("abc", 215 213 [ 216 currentVersion, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00,214 0x06, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00, 217 215 0x80, 0x61, 0x62, 0x63 218 216 ], … … 223 221 testSerialization({integer: 123}, 224 222 [ 225 currentVersion, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00,223 0x06, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, 226 224 0x80, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 227 225 0x05, 0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, … … 236 234 testSerialization({string: "str"}, 237 235 [ 238 currentVersion, 0x00, 0x00, 0x00, 0x02, 0x06, 0x00, 0x00,236 0x06, 0x00, 0x00, 0x00, 0x02, 0x06, 0x00, 0x00, 239 237 0x80, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x10, 240 238 0x03, 0x00, 0x00, 0x80, 0x73, 0x74, 0x72, 0xff, … … 250 248 testSerialization({list: [1,2,3]}, 251 249 [ 252 currentVersion, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00,250 0x06, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 253 251 0x80, 0x6c, 0x69, 0x73, 0x74, 0x01, 0x03, 0x00, 254 252 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x01, … … 269 267 testSerialization(null, 270 268 [ 271 currentVersion, 0x00, 0x00, 0x00, 0x04269 0x06, 0x00, 0x00, 0x00, 0x04 272 270 ], 273 271 [ … … 276 274 testSerialization(/abc/, 277 275 [ 278 currentVersion, 0x00, 0x00, 0x00, 0x12, 0x03, 0x00, 0x00,276 0x06, 0x00, 0x00, 0x00, 0x12, 0x03, 0x00, 0x00, 279 277 0x80, 0x61, 0x62, 0x63, 0x00, 0x00, 0x00, 0x80 280 278 ], … … 290 288 testSerialization(outerObject, 291 289 [ 292 currentVersion, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00,290 0x06, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 293 291 0x80, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x02, 0x05, 294 292 0x00, 0x00, 0x80, 0x68, 0x65, 0x6c, 0x6c, 0x6f, … … 312 310 testSerialization(innerObject, 313 311 [ 314 currentVersion, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00,312 0x06, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 315 313 0x80, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x10, 0x05, 316 314 0x00, 0x00, 0x80, 0x74, 0x68, 0x65, 0x72, 0x65, … … 328 326 testSerialization(unicodeObject, 329 327 [ 330 currentVersion, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,328 0x06, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 331 329 0x80, 0x61, 0x10, 0xfe, 0xff, 0xff, 0xff, 0x00, 332 330 0x01, 0x00, 0x00, 0x80, 0x75, 0x10, 0x02, 0x00, … … 346 344 testSerialization(unicodeObject, 347 345 [ 348 currentVersion, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,346 0x06, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 349 347 0x80, 0x61, 0x10, 0x02, 0x00, 0x00, 0x80, 0x61, 350 348 0x62, 0x01, 0x00, 0x00, 0x80, 0x75, 0x10, 0x02, … … 371 369 testSerialization(arrayObject, 372 370 [ 373 currentVersion, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,371 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 374 372 0x00, 0xfd, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 375 373 0x80, 0x61, 0x09, 0x01, 0x00, 0x00, 0x80, 0x62, … … 385 383 testSerialization(arrayObject, 386 384 [ 387 currentVersion, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,385 0x06, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 388 386 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00, 389 387 0x00, 0x80, 0x66, 0x6f, 0x6f, 0x01, 0x00, 0x00, … … 406 404 testSerialization(mapObject, 407 405 [ 408 currentVersion, 0x00, 0x00, 0x00, 0x1e, 0x07, 0x05, 0x02,406 0x06, 0x00, 0x00, 0x00, 0x1e, 0x07, 0x05, 0x02, 409 407 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 410 408 0x00, 0x00, 0xf8, 0x3f, 0x02, 0xff, 0xff, 0xff, … … 427 425 testSerialization(setObject, 428 426 [ 429 currentVersion, 0x00, 0x00, 0x00, 0x1d, 0x07, 0x0a, 0x00,427 0x06, 0x00, 0x00, 0x00, 0x1d, 0x07, 0x0a, 0x00, 430 428 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0x13, 431 429 0x00, 0x10, 0x03, 0x00, 0x00, 0x80, 0x62, 0x61, -
trunk/LayoutTests/imported/w3c/ChangeLog
r232030 r232037 1 2018-05-21 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r232030. 4 https://bugs.webkit.org/show_bug.cgi?id=185850 5 6 "Caused 7 TestWebKitAPI.IndexedDB.StructuredCloneBackwardCompatibility 8 API test to fail" (Requested by cdumez on #webkit). 9 10 Reverted changeset: 11 12 "File's structured serialization should serialize lastModified 13 attribute" 14 https://bugs.webkit.org/show_bug.cgi?id=185773 15 https://trac.webkit.org/changeset/232030 16 1 17 2018-05-21 Chris Dumez <cdumez@apple.com> 2 18 -
trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/keypath-special-identifiers-expected.txt
r232030 r232037 5 5 PASS Type: Blob, identifier: type 6 6 PASS Type: File, identifier: name 7 PASS Type: File, identifier: lastModified 7 FAIL Type: File, identifier: lastModified assert_equals: Property should be used as key expected 0 but got 1 8 8 FAIL Type: File, identifier: lastModifiedDate Provided data is inadequate. 9 9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/common.js
r232033 r232037 1 /* This file is mostly a remix of @zcorpan’s web worker test suite */ 2 3 structuredCloneBatteryOfTests = []; 4 5 function check(description, input, callback) { 6 testObjMock = { 7 done() {}, 8 step_func(f) {return _ => f()}, 9 }; 10 11 structuredCloneBatteryOfTests.push({ 12 description, 13 async f(runner) { 14 let newInput = input; 15 if (typeof input === 'function') { 16 newInput = input(); 17 } 18 const copy = await runner.structuredClone(newInput); 19 await callback(copy, newInput, testObjMock); 20 } 1 function createWorker(msg) { 2 // `type` is defined in the test case itself 3 if (type == 'dedicated') 4 return new Worker('dedicated.js#'+encodeURIComponent(msg)); 5 else if (type == 'shared') 6 return (new SharedWorker('shared.js#'+encodeURIComponent(msg))).port; 7 else 8 assert_unreached('invalid or missing `type`'); 9 } 10 11 function check(msg, input, callback, test_obj) { 12 if (!test_obj) 13 test_obj = async_test(msg); 14 test_obj.step(function() { 15 var w = createWorker(msg); 16 if (typeof input === 'function') 17 input = this.step(input); 18 w.postMessage(input); 19 w.onmessage = this.step_func(function(ev) { callback(ev.data, input, this); }); 21 20 }); 22 21 } … … 263 262 check('Object RegExp object, RegExp new line', {'x':new RegExp('\n')}, compare_Object(enumerate_props(compare_RegExp('\\n')))); 264 263 265 asyncfunction compare_Blob(actual, input, test_obj, expect_File) {264 function compare_Blob(actual, input, test_obj, expect_File) { 266 265 if (typeof actual === 'string') 267 266 assert_unreached(actual); … … 272 271 assert_equals(actual.type, input.type, 'type'); 273 272 assert_not_equals(actual, input); 274 const ab1 = new Response(actual).arrayBuffer(); 275 const ab2 = new Response(input).arrayBuffer(); 276 assert_equals(ab1.btyeLength, ab2.byteLength, 'byteLength'); 277 const ta1 = new Uint8Array(ab1); 278 const ta2 = new Uint8Array(ab2); 279 for(let i = 0; i < ta1.size; i++) { 280 assert_equals(ta1[i], ta2[i]); 281 } 273 var ev_reader = new FileReader(); 274 var input_reader = new FileReader(); 275 var read_count = 0; 276 var read_done = test_obj.step_func(function() { 277 read_count++; 278 if (read_count == 2) { 279 var ev_result = ev_reader.result; 280 var input_result = input_reader.result; 281 assert_equals(ev_result.byteLength, input_result.byteLength, 'byteLength'); 282 var ev_view = new DataView(ev_result); 283 var input_view = new DataView(input_result); 284 for (var i = 0; i < ev_result.byteLength; ++i) { 285 assert_equals(ev_view.getUint8(i), input_view.getUint8(i), 'getUint8('+i+')'); 286 } 287 if (test_obj) 288 test_obj.done(); 289 } 290 }); 291 var read_error = test_obj.step_func(function() { assert_unreached('FileReader error'); }); 292 ev_reader.readAsArrayBuffer(actual); 293 ev_reader.onload = read_done; 294 ev_reader.onabort = ev_reader.onerror = read_error; 295 input_reader.readAsArrayBuffer(input); 296 input_reader.onload = read_done; 297 input_reader.onabort = input_reader.onerror = read_error; 282 298 } 283 299 function func_Blob_basic() { … … 323 339 check('Blob NUL', func_Blob_NUL, compare_Blob); 324 340 325 check('Array Blob object, Blob basic', [func_Blob_basic()], compare_Array(enumerate_props(compare_Blob), true)); 326 check('Array Blob object, Blob unpaired high surrogate (invalid utf-8)', [func_Blob_bytes([0xD800])()], compare_Array(enumerate_props(compare_Blob), true)); 327 check('Array Blob object, Blob unpaired low surrogate (invalid utf-8)', [func_Blob_bytes([0xDC00])()], compare_Array(enumerate_props(compare_Blob), true)); 328 check('Array Blob object, Blob paired surrogates (invalid utf-8)', [func_Blob_bytes([0xD800, 0xDC00])()], compare_Array(enumerate_props(compare_Blob), true)); 329 check('Array Blob object, Blob empty', [func_Blob_empty()], compare_Array(enumerate_props(compare_Blob), true)); 330 check('Array Blob object, Blob NUL', [func_Blob_NUL()], compare_Array(enumerate_props(compare_Blob), true)); 331 332 check('Object Blob object, Blob basic', {'x':func_Blob_basic()}, compare_Object(enumerate_props(compare_Blob), true)); 333 check('Object Blob object, Blob unpaired high surrogate (invalid utf-8)', {'x':func_Blob_bytes([0xD800])()}, compare_Object(enumerate_props(compare_Blob), true)); 334 check('Object Blob object, Blob unpaired low surrogate (invalid utf-8)', {'x':func_Blob_bytes([0xDC00])()}, compare_Object(enumerate_props(compare_Blob), true)); 335 check('Object Blob object, Blob paired surrogates (invalid utf-8)', {'x':func_Blob_bytes([0xD800, 0xDC00])() }, compare_Object(enumerate_props(compare_Blob), true)); 336 check('Object Blob object, Blob empty', {'x':func_Blob_empty()}, compare_Object(enumerate_props(compare_Blob), true)); 337 check('Object Blob object, Blob NUL', {'x':func_Blob_NUL()}, compare_Object(enumerate_props(compare_Blob), true)); 341 async_test(function(test_obj) { 342 check(test_obj.name, [test_obj.step(func_Blob_basic)], compare_Array(enumerate_props(compare_Blob, test_obj), true), test_obj); 343 }, 'Array Blob object, Blob basic'); 344 async_test(function(test_obj) { 345 check(test_obj.name, [test_obj.step(func_Blob_bytes([0xD800]))], compare_Array(enumerate_props(compare_Blob, test_obj), true), test_obj); 346 }, 'Array Blob object, Blob unpaired high surrogate (invalid utf-8)'); 347 async_test(function(test_obj) { 348 check(test_obj.name, [test_obj.step(func_Blob_bytes([0xDC00]))], compare_Array(enumerate_props(compare_Blob, test_obj), true), test_obj); 349 }, 'Array Blob object, Blob unpaired low surrogate (invalid utf-8)'); 350 async_test(function(test_obj) { 351 check(test_obj.name, [test_obj.step(func_Blob_bytes([0xD800, 0xDC00]))], compare_Array(enumerate_props(compare_Blob, test_obj), true), test_obj); 352 }, 'Array Blob object, Blob paired surrogates (invalid utf-8)'); 353 async_test(function(test_obj) { 354 check(test_obj.name, [test_obj.step(func_Blob_empty)], compare_Array(enumerate_props(compare_Blob, test_obj), true), test_obj); 355 }, 'Array Blob object, Blob empty'); 356 async_test(function(test_obj) { 357 check(test_obj.name, [test_obj.step(func_Blob_NUL)], compare_Array(enumerate_props(compare_Blob, test_obj), true), test_obj); 358 }, 'Array Blob object, Blob NUL'); 359 360 async_test(function(test_obj) { 361 check(test_obj.name, {'x':test_obj.step(func_Blob_basic)}, compare_Object(enumerate_props(compare_Blob, test_obj), true), test_obj); 362 }, 'Object Blob object, Blob basic'); 363 async_test(function(test_obj) { 364 check(test_obj.name, {'x':test_obj.step(func_Blob_bytes([0xD800]))}, compare_Object(enumerate_props(compare_Blob, test_obj), true), test_obj); 365 }, 'Object Blob object, Blob unpaired high surrogate (invalid utf-8)'); 366 async_test(function(test_obj) { 367 check(test_obj.name, {'x':test_obj.step(func_Blob_bytes([0xDC00]))}, compare_Object(enumerate_props(compare_Blob, test_obj), true), test_obj); 368 }, 'Object Blob object, Blob unpaired low surrogate (invalid utf-8)'); 369 async_test(function(test_obj) { 370 check(test_obj.name, {'x':test_obj.step(func_Blob_bytes([0xD800, 0xDC00]))}, compare_Object(enumerate_props(compare_Blob, test_obj), true), test_obj); 371 }, 'Object Blob object, Blob paired surrogates (invalid utf-8)'); 372 async_test(function(test_obj) { 373 check(test_obj.name, {'x':test_obj.step(func_Blob_empty)}, compare_Object(enumerate_props(compare_Blob, test_obj), true), test_obj); 374 }, 'Object Blob object, Blob empty'); 375 async_test(function(test_obj) { 376 check(test_obj.name, {'x':test_obj.step(func_Blob_NUL)}, compare_Object(enumerate_props(compare_Blob, test_obj), true), test_obj); 377 }, 'Object Blob object, Blob NUL'); 338 378 339 379 function compare_File(actual, input, test_obj) { … … 365 405 } 366 406 check('FileList empty', func_FileList_empty, compare_FileList); 367 check('Array FileList object, FileList empty', [func_FileList_empty ()], compare_Array(enumerate_props(compare_FileList)));368 check('Object FileList object, FileList empty', {'x':func_FileList_empty ()}, compare_Object(enumerate_props(compare_FileList)));407 check('Array FileList object, FileList empty', [func_FileList_empty], compare_Array(enumerate_props(compare_FileList))); 408 check('Object FileList object, FileList empty', {'x':func_FileList_empty}, compare_Object(enumerate_props(compare_FileList))); 369 409 370 410 function compare_ArrayBufferView(view) { … … 410 450 } 411 451 check('ImageData 1x1 non-transparent non-black', func_ImageData_1x1_non_transparent_non_black, compare_ImageData); 412 check('Array ImageData object, ImageData 1x1 transparent black', [func_ImageData_1x1_transparent_black()], compare_Array(enumerate_props(compare_ImageData))); 413 check('Array ImageData object, ImageData 1x1 non-transparent non-black', [func_ImageData_1x1_non_transparent_non_black()], compare_Array(enumerate_props(compare_ImageData))); 414 check('Object ImageData object, ImageData 1x1 transparent black', {'x':func_ImageData_1x1_transparent_black()}, compare_Object(enumerate_props(compare_ImageData))); 415 check('Object ImageData object, ImageData 1x1 non-transparent non-black', {'x':func_ImageData_1x1_non_transparent_non_black()}, compare_Object(enumerate_props(compare_ImageData))); 416 417 418 check('Array sparse', new Array(10), compare_Array(enumerate_props(compare_primitive))); 419 check('Array with non-index property', function() { 420 var rv = []; 421 rv.foo = 'bar'; 422 return rv; 423 }, compare_Array(enumerate_props(compare_primitive))); 424 check('Object with index property and length', {'0':'foo', 'length':1}, compare_Object(enumerate_props(compare_primitive))); 425 function check_circular_property(prop) { 426 return function(actual) { 427 assert_equals(actual[prop], actual); 428 }; 429 } 430 check('Array with circular reference', function() { 431 var rv = []; 432 rv[0] = rv; 433 return rv; 434 }, compare_Array(check_circular_property('0'))); 435 check('Object with circular reference', function() { 436 var rv = {}; 437 rv['x'] = rv; 438 return rv; 439 }, compare_Object(check_circular_property('x'))); 440 function check_identical_property_values(prop1, prop2) { 441 return function(actual) { 442 assert_equals(actual[prop1], actual[prop2]); 443 }; 444 } 445 check('Array with identical property values', function() { 446 var obj = {} 447 return [obj, obj]; 448 }, compare_Array(check_identical_property_values('0', '1'))); 449 check('Object with identical property values', function() { 450 var obj = {} 451 return {'x':obj, 'y':obj}; 452 }, compare_Object(check_identical_property_values('x', 'y'))); 453 454 function check_absent_property(prop) { 455 return function(actual) { 456 assert_false(prop in actual); 457 }; 458 } 459 check('Object with property on prototype', function() { 460 var Foo = function() {}; 461 Foo.prototype = {'foo':'bar'}; 462 return new Foo(); 463 }, compare_Object(check_absent_property('foo'))); 464 465 check('Object with non-enumerable property', function() { 466 var rv = {}; 467 Object.defineProperty(rv, 'foo', {value:'bar', enumerable:false, writable:true, configurable:true}); 468 return rv; 469 }, compare_Object(check_absent_property('foo'))); 470 471 function check_writable_property(prop) { 472 return function(actual, input) { 473 assert_equals(actual[prop], input[prop]); 474 actual[prop] += ' baz'; 475 assert_equals(actual[prop], input[prop] + ' baz'); 476 }; 477 } 478 check('Object with non-writable property', function() { 479 var rv = {}; 480 Object.defineProperty(rv, 'foo', {value:'bar', enumerable:true, writable:false, configurable:true}); 481 return rv; 482 }, compare_Object(check_writable_property('foo'))); 483 484 function check_configurable_property(prop) { 485 return function(actual, input) { 486 assert_equals(actual[prop], input[prop]); 487 delete actual[prop]; 488 assert_false('prop' in actual); 489 }; 490 } 491 check('Object with non-configurable property', function() { 492 var rv = {}; 493 Object.defineProperty(rv, 'foo', {value:'bar', enumerable:true, writable:true, configurable:false}); 494 return rv; 495 }, compare_Object(check_configurable_property('foo'))); 496 497 /* The tests below are inspired by @zcorpan’s work but got some 498 more substantial changed due to their previous async setup */ 499 452 async_test(function(test_obj) { 453 check(test_obj.name, [test_obj.step(func_ImageData_1x1_transparent_black)], compare_Array(enumerate_props(compare_ImageData)), test_obj); 454 }, 'Array ImageData object, ImageData 1x1 transparent black'); 455 async_test(function(test_obj) { 456 check(test_obj.name, [test_obj.step(func_ImageData_1x1_non_transparent_non_black)], compare_Array(enumerate_props(compare_ImageData)), test_obj); 457 }, 'Array ImageData object, ImageData 1x1 non-transparent non-black'); 458 async_test(function(test_obj) { 459 check(test_obj.name, {'x':test_obj.step(func_ImageData_1x1_transparent_black)}, compare_Object(enumerate_props(compare_ImageData)), test_obj); 460 }, 'Object ImageData object, ImageData 1x1 transparent black'); 461 async_test(function(test_obj) { 462 check(test_obj.name, {'x':test_obj.step(func_ImageData_1x1_non_transparent_non_black)}, compare_Object(enumerate_props(compare_ImageData)), test_obj); 463 }, 'Object ImageData object, ImageData 1x1 non-transparent non-black'); 464 465 function compare_ImageBitmap(actual, input, test_obj) { 466 if (typeof actual === 'string') 467 assert_unreached(actual); 468 assert_equals(actual instanceof ImageBitmap, 'instanceof ImageBitmap'); 469 assert_not_equals(actual, input); 470 // XXX paint the ImageBitmap on a canvas and check the data 471 if (test_obj) 472 test_obj.done(); 473 } 500 474 function get_canvas_1x1_transparent_black() { 501 475 var canvas = document.createElement('canvas'); … … 504 478 return canvas; 505 479 } 506 480 async_test(function(test_obj) { 481 var canvas = get_canvas_1x1_transparent_black(); 482 createImageBitmap(canvas, function(image) { check(test_obj.name, image, compare_ImageBitmap, test_obj); }); 483 }, 'ImageBitmap 1x1 transparent black'); 507 484 function get_canvas_1x1_non_transparent_non_black() { 508 485 var canvas = document.createElement('canvas'); … … 517 494 return canvas; 518 495 } 519 520 function compare_ImageBitmap(actual, input) { 521 if (typeof actual === 'string') 522 assert_unreached(actual); 523 assert_true(actual instanceof ImageBitmap, 'instanceof ImageBitmap'); 524 assert_not_equals(actual, input); 525 // XXX paint the ImageBitmap on a canvas and check the data 526 } 527 528 structuredCloneBatteryOfTests.push({ 529 description: 'ImageBitmap 1x1 transparent black', 530 async f(runner) { 531 var canvas = get_canvas_1x1_transparent_black(); 532 const bm = await createImageBitmap(canvas); 533 const copy = await runner.structuredClone(bm); 534 compare_ImageBitmap(bm, copy); 535 } 536 }); 537 538 structuredCloneBatteryOfTests.push({ 539 description: 'ImageBitmap 1x1 non-transparent non-black', 540 async f(runner) { 541 var canvas = get_canvas_1x1_non_transparent_non_black(); 542 const bm = await createImageBitmap(canvas); 543 const copy = await runner.structuredClone(bm); 544 compare_ImageBitmap(bm, copy); 545 } 546 }); 547 548 structuredCloneBatteryOfTests.push({ 549 description: 'Array ImageBitmap object, ImageBitmap 1x1 transparent black', 550 async f(runner) { 551 var canvas = get_canvas_1x1_transparent_black(); 552 const bm = [await createImageBitmap(canvas)]; 553 const copy = await runner.structuredClone(bm); 554 compare_Array(enumerate_props(compare_ImageBitmap))(bm, copy); 555 } 556 }); 557 558 structuredCloneBatteryOfTests.push({ 559 description: 'Array ImageBitmap object, ImageBitmap 1x1 transparent non-black', 560 async f(runner) { 561 var canvas = get_canvas_1x1_non_transparent_non_black(); 562 const bm = [await createImageBitmap(canvas)]; 563 const copy = await runner.structuredClone(bm); 564 compare_Array(enumerate_props(compare_ImageBitmap))(bm, copy); 565 } 566 }); 567 568 structuredCloneBatteryOfTests.push({ 569 description: 'Object ImageBitmap object, ImageBitmap 1x1 transparent black', 570 async f(runner) { 571 var canvas = get_canvas_1x1_transparent_black(); 572 const bm = {x: await createImageBitmap(canvas)}; 573 const copy = await runner.structuredClone(bm); 574 compare_Object(enumerate_props(compare_ImageBitmap))(bm, copy); 575 } 576 }); 577 578 structuredCloneBatteryOfTests.push({ 579 description: 'Object ImageBitmap object, ImageBitmap 1x1 transparent non-black', 580 async f(runner) { 581 var canvas = get_canvas_1x1_non_transparent_non_black(); 582 const bm = {x: await createImageBitmap(canvas)}; 583 const copy = await runner.structuredClone(bm); 584 compare_Object(enumerate_props(compare_ImageBitmap))(bm, copy); 585 } 586 }); 496 async_test(function(test_obj) { 497 var canvas = get_canvas_1x1_non_transparent_non_black(); 498 createImageBitmap(canvas, function(image) { check(test_obj.name, image, compare_ImageBitmap, test_obj); }); 499 }, 'ImageBitmap 1x1 non-transparent non-black'); 500 501 async_test(function(test_obj) { 502 var canvas = get_canvas_1x1_transparent_black(); 503 createImageBitmap(canvas, function(image) { check(test_obj.name, [image], compare_Array(enumerate_props(compare_ImageBitmap)), test_obj); }); 504 }, 'Array ImageBitmap object, ImageBitmap 1x1 transparent black'); 505 async_test(function(test_obj) { 506 var canvas = get_canvas_1x1_non_transparent_non_black(); 507 createImageBitmap(canvas, function(image) { check(test_obj.name, [image], compare_Array(enumerate_props(compare_ImageBitmap)), test_obj); }); 508 }, 'Array ImageBitmap object, ImageBitmap 1x1 non-transparent non-black'); 509 510 async_test(function(test_obj) { 511 var canvas = get_canvas_1x1_transparent_black(); 512 createImageBitmap(canvas, function(image) { check(test_obj.name, {'x':image}, compare_Object(enumerate_props(compare_ImageBitmap)), test_obj); }); 513 }, 'Object ImageBitmap object, ImageBitmap 1x1 transparent black'); 514 async_test(function(test_obj) { 515 var canvas = get_canvas_1x1_non_transparent_non_black(); 516 createImageBitmap(canvas, function(image) { check(test_obj.name, {'x':image}, compare_Object(enumerate_props(compare_ImageBitmap)), test_obj); }); 517 }, 'Object ImageBitmap object, ImageBitmap 1x1 non-transparent non-black'); 518 519 check('Array sparse', new Array(10), compare_Array(enumerate_props(compare_primitive))); 520 check('Array with non-index property', function() { 521 var rv = []; 522 rv.foo = 'bar'; 523 return rv; 524 }, compare_Array(enumerate_props(compare_primitive))); 525 check('Object with index property and length', {'0':'foo', 'length':1}, compare_Object(enumerate_props(compare_primitive))); 526 function check_circular_property(prop) { 527 return function(actual) { 528 assert_equals(actual[prop], actual); 529 }; 530 } 531 check('Array with circular reference', function() { 532 var rv = []; 533 rv[0] = rv; 534 return rv; 535 }, compare_Array(check_circular_property('0'))); 536 check('Object with circular reference', function() { 537 var rv = {}; 538 rv['x'] = rv; 539 return rv; 540 }, compare_Object(check_circular_property('x'))); 541 function check_identical_property_values(prop1, prop2) { 542 return function(actual) { 543 assert_equals(actual[prop1], actual[prop2]); 544 }; 545 } 546 check('Array with identical property values', function() { 547 var obj = {} 548 return [obj, obj]; 549 }, compare_Array(check_identical_property_values('0', '1'))); 550 check('Object with identical property values', function() { 551 var obj = {} 552 return {'x':obj, 'y':obj}; 553 }, compare_Object(check_identical_property_values('x', 'y'))); 554 555 function check_absent_property(prop) { 556 return function(actual) { 557 assert_false(prop in actual); 558 }; 559 } 560 check('Object with property on prototype', function() { 561 var Foo = function() {}; 562 Foo.prototype = {'foo':'bar'}; 563 return new Foo(); 564 }, compare_Object(check_absent_property('foo'))); 565 566 check('Object with non-enumerable property', function() { 567 var rv = {}; 568 Object.defineProperty(rv, 'foo', {value:'bar', enumerable:false, writable:true, configurable:true}); 569 return rv; 570 }, compare_Object(check_absent_property('foo'))); 571 572 function check_writable_property(prop) { 573 return function(actual, input) { 574 assert_equals(actual[prop], input[prop]); 575 actual[prop] += ' baz'; 576 assert_equals(actual[prop], input[prop] + ' baz'); 577 }; 578 } 579 check('Object with non-writable property', function() { 580 var rv = {}; 581 Object.defineProperty(rv, 'foo', {value:'bar', enumerable:true, writable:false, configurable:true}); 582 return rv; 583 }, compare_Object(check_writable_property('foo'))); 584 585 function check_configurable_property(prop) { 586 return function(actual, input) { 587 assert_equals(actual[prop], input[prop]); 588 delete actual[prop]; 589 assert_false('prop' in actual); 590 }; 591 } 592 check('Object with non-configurable property', function() { 593 var rv = {}; 594 Object.defineProperty(rv, 'foo', {value:'bar', enumerable:true, writable:true, configurable:false}); 595 return rv; 596 }, compare_Object(check_configurable_property('foo'))); -
trunk/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/dedicated-expected.txt
r232030 r232037 1 2 Harness Error (TIMEOUT), message = null 1 3 2 4 PASS primitive undefined … … 51 53 PASS Object Date objects 52 54 PASS RegExp flags and lastIndex 53 FAIL RegExp sticky flag assert_ equals: sticky expected true but got false54 FAIL RegExp unicode flag assert_ equals: unicode expected true but got false55 FAIL RegExp sticky flag assert_unreached: FAIL: unknown test Reached unreachable code 56 FAIL RegExp unicode flag assert_unreached: FAIL: unknown test Reached unreachable code 55 57 PASS RegExp empty 56 58 PASS RegExp slash 57 59 PASS RegExp new line 58 60 PASS Array RegExp object, RegExp flags and lastIndex 59 FAIL Array RegExp object, RegExp sticky flag assert_ equals: sticky expected true but got false60 FAIL Array RegExp object, RegExp unicode flag assert_ equals: unicode expected true but got false61 FAIL Array RegExp object, RegExp sticky flag assert_unreached: FAIL: unknown test Reached unreachable code 62 FAIL Array RegExp object, RegExp unicode flag assert_unreached: FAIL: unknown test Reached unreachable code 61 63 PASS Array RegExp object, RegExp empty 62 64 PASS Array RegExp object, RegExp slash 63 65 PASS Array RegExp object, RegExp new line 64 66 PASS Object RegExp object, RegExp flags and lastIndex 65 FAIL Object RegExp object, RegExp sticky flag assert_ equals: sticky expected true but got false66 FAIL Object RegExp object, RegExp unicode flag assert_ equals: unicode expected true but got false67 FAIL Object RegExp object, RegExp sticky flag assert_unreached: FAIL: unknown test Reached unreachable code 68 FAIL Object RegExp object, RegExp unicode flag assert_unreached: FAIL: unknown test Reached unreachable code 67 69 PASS Object RegExp object, RegExp empty 68 70 PASS Object RegExp object, RegExp slash 69 71 PASS Object RegExp object, RegExp new line 70 PASS Blob basic 71 PASS Blob unpaired high surrogate (invalid utf-8) 72 PASS Blob unpaired low surrogate (invalid utf-8) 73 PASS Blob paired surrogates (invalid utf-8) 74 PASS Blob empty 75 PASS Blob NUL 76 PASS Array Blob object, Blob basic 77 PASS Array Blob object, Blob unpaired high surrogate (invalid utf-8) 78 PASS Array Blob object, Blob unpaired low surrogate (invalid utf-8) 79 PASS Array Blob object, Blob paired surrogates (invalid utf-8) 80 PASS Array Blob object, Blob empty 81 PASS Array Blob object, Blob NUL 82 PASS Object Blob object, Blob basic 83 PASS Object Blob object, Blob unpaired high surrogate (invalid utf-8) 84 PASS Object Blob object, Blob unpaired low surrogate (invalid utf-8) 85 PASS Object Blob object, Blob paired surrogates (invalid utf-8) 86 PASS Object Blob object, Blob empty 87 PASS Object Blob object, Blob NUL 88 PASS File basic 89 PASS FileList empty 90 PASS Array FileList object, FileList empty 91 PASS Object FileList object, FileList empty 72 FAIL Blob basic assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 73 FAIL Blob unpaired high surrogate (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 74 FAIL Blob unpaired low surrogate (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 75 FAIL Blob paired surrogates (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 76 FAIL Blob empty assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 77 FAIL Blob NUL assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 78 FAIL Array Blob object, Blob basic assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 79 FAIL Array Blob object, Blob unpaired high surrogate (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 80 FAIL Array Blob object, Blob unpaired low surrogate (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 81 FAIL Array Blob object, Blob paired surrogates (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 82 FAIL Array Blob object, Blob empty assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 83 FAIL Array Blob object, Blob NUL assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 84 FAIL Object Blob object, Blob basic assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 85 FAIL Object Blob object, Blob unpaired high surrogate (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 86 FAIL Object Blob object, Blob unpaired low surrogate (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 87 FAIL Object Blob object, Blob paired surrogates (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 88 FAIL Object Blob object, Blob empty assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 89 FAIL Object Blob object, Blob NUL assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code 90 FAIL File basic assert_true: instanceof File expected true got false 91 FAIL FileList empty assert_unreached: FAIL ReferenceError: Can't find variable: FileList Reached unreachable code 92 FAIL Array FileList object, FileList empty The object can not be cloned. 93 FAIL Object FileList object, FileList empty The object can not be cloned. 92 94 PASS ImageData 1x1 transparent black 93 95 PASS ImageData 1x1 non-transparent non-black … … 96 98 PASS Object ImageData object, ImageData 1x1 transparent black 97 99 PASS Object ImageData object, ImageData 1x1 non-transparent non-black 100 TIMEOUT ImageBitmap 1x1 transparent black Test timed out 101 TIMEOUT ImageBitmap 1x1 non-transparent non-black Test timed out 102 TIMEOUT Array ImageBitmap object, ImageBitmap 1x1 transparent black Test timed out 103 TIMEOUT Array ImageBitmap object, ImageBitmap 1x1 non-transparent non-black Test timed out 104 TIMEOUT Object ImageBitmap object, ImageBitmap 1x1 transparent black Test timed out 105 TIMEOUT Object ImageBitmap object, ImageBitmap 1x1 non-transparent non-black Test timed out 98 106 PASS Array sparse 99 107 PASS Array with non-index property … … 107 115 PASS Object with non-writable property 108 116 PASS Object with non-configurable property 109 FAIL ImageBitmap 1x1 transparent black promise_test: Unhandled rejection with value: object "TypeError: Type error"110 FAIL ImageBitmap 1x1 non-transparent non-black promise_test: Unhandled rejection with value: object "TypeError: Type error"111 FAIL Array ImageBitmap object, ImageBitmap 1x1 transparent black promise_test: Unhandled rejection with value: object "TypeError: Type error"112 FAIL Array ImageBitmap object, ImageBitmap 1x1 transparent non-black promise_test: Unhandled rejection with value: object "TypeError: Type error"113 FAIL Object ImageBitmap object, ImageBitmap 1x1 transparent black promise_test: Unhandled rejection with value: object "TypeError: Type error"114 FAIL Object ImageBitmap object, ImageBitmap 1x1 transparent non-black promise_test: Unhandled rejection with value: object "TypeError: Type error"115 PASS ArrayBuffer116 PASS MessagePort117 117 -
trunk/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/dedicated.html
r232030 r232037 3 3 <script src="/resources/testharness.js"></script> 4 4 <script src="/resources/testharnessreport.js"></script> 5 <script src=/html/webappapis/structured-clone/structured-clone-battery-of-tests.js></script>6 <script src=/html/webappapis/structured-clone/structured-clone-battery-of-tests-with-transferables.js></script>7 <script src=/html/webappapis/structured-clone/structured-clone-battery-of-tests-harness.js></script>8 5 <div id=log></div> 9 6 <script> 10 runStructuredCloneBatteryOfTests({ 11 setup() { 12 const blob = new Blob([` 13 onmessage = ev => postMessage(ev.data, ev.data.transfer); 14 `], {type: 'text/javascript'}); 15 this.blobURL = URL.createObjectURL(blob); 16 this.worker = new Worker(this.blobURL); 17 }, 18 structuredClone(data, transfer) { 19 return new Promise(resolve => { 20 this.worker.addEventListener('message', function f(ev) { 21 this.worker.removeEventListener('message', f); 22 resolve(ev.data.data); 23 }.bind(this)); 24 this.worker.postMessage({data, transfer}, transfer); 25 }); 26 }, 27 teardown() { 28 this.worker.terminate(); 29 URL.revokeObjectURL(this.blobURL); 30 } 31 }); 7 var type = 'dedicated'; 32 8 </script> 9 <script src="common.js"></script> -
trunk/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/shared-expected.txt
r232030 r232037 1 CONSOLE MESSAGE: line 19: ReferenceError: Can't find variable: SharedWorker2 1 3 FAIL structured clone to shared worker ReferenceError: Can't find variable: SharedWorker 2 Harness Error (TIMEOUT), message = null 4 3 4 FAIL primitive undefined Can't find variable: SharedWorker 5 FAIL primitive null Can't find variable: SharedWorker 6 FAIL primitive true Can't find variable: SharedWorker 7 FAIL primitive false Can't find variable: SharedWorker 8 FAIL primitive string, empty string Can't find variable: SharedWorker 9 FAIL primitive string, lone high surrogate Can't find variable: SharedWorker 10 FAIL primitive string, lone low surrogate Can't find variable: SharedWorker 11 FAIL primitive string, NUL Can't find variable: SharedWorker 12 FAIL primitive string, astral character Can't find variable: SharedWorker 13 FAIL primitive number, 0.2 Can't find variable: SharedWorker 14 FAIL primitive number, 0 Can't find variable: SharedWorker 15 FAIL primitive number, -0 Can't find variable: SharedWorker 16 FAIL primitive number, NaN Can't find variable: SharedWorker 17 FAIL primitive number, Infinity Can't find variable: SharedWorker 18 FAIL primitive number, -Infinity Can't find variable: SharedWorker 19 FAIL primitive number, 9007199254740992 Can't find variable: SharedWorker 20 FAIL primitive number, -9007199254740992 Can't find variable: SharedWorker 21 FAIL primitive number, 9007199254740994 Can't find variable: SharedWorker 22 FAIL primitive number, -9007199254740994 Can't find variable: SharedWorker 23 FAIL Array primitives Can't find variable: SharedWorker 24 FAIL Object primitives Can't find variable: SharedWorker 25 FAIL Boolean true Can't find variable: SharedWorker 26 FAIL Boolean false Can't find variable: SharedWorker 27 FAIL Array Boolean objects Can't find variable: SharedWorker 28 FAIL Object Boolean objects Can't find variable: SharedWorker 29 FAIL String empty string Can't find variable: SharedWorker 30 FAIL String lone high surrogate Can't find variable: SharedWorker 31 FAIL String lone low surrogate Can't find variable: SharedWorker 32 FAIL String NUL Can't find variable: SharedWorker 33 FAIL String astral character Can't find variable: SharedWorker 34 FAIL Array String objects Can't find variable: SharedWorker 35 FAIL Object String objects Can't find variable: SharedWorker 36 FAIL Number 0.2 Can't find variable: SharedWorker 37 FAIL Number 0 Can't find variable: SharedWorker 38 FAIL Number -0 Can't find variable: SharedWorker 39 FAIL Number NaN Can't find variable: SharedWorker 40 FAIL Number Infinity Can't find variable: SharedWorker 41 FAIL Number -Infinity Can't find variable: SharedWorker 42 FAIL Number 9007199254740992 Can't find variable: SharedWorker 43 FAIL Number -9007199254740992 Can't find variable: SharedWorker 44 FAIL Number 9007199254740994 Can't find variable: SharedWorker 45 FAIL Number -9007199254740994 Can't find variable: SharedWorker 46 FAIL Array Number objects Can't find variable: SharedWorker 47 FAIL Object Number objects Can't find variable: SharedWorker 48 FAIL Date 0 Can't find variable: SharedWorker 49 FAIL Date -0 Can't find variable: SharedWorker 50 FAIL Date -8.64e15 Can't find variable: SharedWorker 51 FAIL Date 8.64e15 Can't find variable: SharedWorker 52 FAIL Array Date objects Can't find variable: SharedWorker 53 FAIL Object Date objects Can't find variable: SharedWorker 54 FAIL RegExp flags and lastIndex Can't find variable: SharedWorker 55 FAIL RegExp sticky flag Can't find variable: SharedWorker 56 FAIL RegExp unicode flag Can't find variable: SharedWorker 57 FAIL RegExp empty Can't find variable: SharedWorker 58 FAIL RegExp slash Can't find variable: SharedWorker 59 FAIL RegExp new line Can't find variable: SharedWorker 60 FAIL Array RegExp object, RegExp flags and lastIndex Can't find variable: SharedWorker 61 FAIL Array RegExp object, RegExp sticky flag Can't find variable: SharedWorker 62 FAIL Array RegExp object, RegExp unicode flag Can't find variable: SharedWorker 63 FAIL Array RegExp object, RegExp empty Can't find variable: SharedWorker 64 FAIL Array RegExp object, RegExp slash Can't find variable: SharedWorker 65 FAIL Array RegExp object, RegExp new line Can't find variable: SharedWorker 66 FAIL Object RegExp object, RegExp flags and lastIndex Can't find variable: SharedWorker 67 FAIL Object RegExp object, RegExp sticky flag Can't find variable: SharedWorker 68 FAIL Object RegExp object, RegExp unicode flag Can't find variable: SharedWorker 69 FAIL Object RegExp object, RegExp empty Can't find variable: SharedWorker 70 FAIL Object RegExp object, RegExp slash Can't find variable: SharedWorker 71 FAIL Object RegExp object, RegExp new line Can't find variable: SharedWorker 72 FAIL Blob basic Can't find variable: SharedWorker 73 FAIL Blob unpaired high surrogate (invalid utf-8) Can't find variable: SharedWorker 74 FAIL Blob unpaired low surrogate (invalid utf-8) Can't find variable: SharedWorker 75 FAIL Blob paired surrogates (invalid utf-8) Can't find variable: SharedWorker 76 FAIL Blob empty Can't find variable: SharedWorker 77 FAIL Blob NUL Can't find variable: SharedWorker 78 FAIL Array Blob object, Blob basic Can't find variable: SharedWorker 79 FAIL Array Blob object, Blob unpaired high surrogate (invalid utf-8) Can't find variable: SharedWorker 80 FAIL Array Blob object, Blob unpaired low surrogate (invalid utf-8) Can't find variable: SharedWorker 81 FAIL Array Blob object, Blob paired surrogates (invalid utf-8) Can't find variable: SharedWorker 82 FAIL Array Blob object, Blob empty Can't find variable: SharedWorker 83 FAIL Array Blob object, Blob NUL Can't find variable: SharedWorker 84 FAIL Object Blob object, Blob basic Can't find variable: SharedWorker 85 FAIL Object Blob object, Blob unpaired high surrogate (invalid utf-8) Can't find variable: SharedWorker 86 FAIL Object Blob object, Blob unpaired low surrogate (invalid utf-8) Can't find variable: SharedWorker 87 FAIL Object Blob object, Blob paired surrogates (invalid utf-8) Can't find variable: SharedWorker 88 FAIL Object Blob object, Blob empty Can't find variable: SharedWorker 89 FAIL Object Blob object, Blob NUL Can't find variable: SharedWorker 90 FAIL File basic Can't find variable: SharedWorker 91 FAIL FileList empty Can't find variable: SharedWorker 92 FAIL Array FileList object, FileList empty Can't find variable: SharedWorker 93 FAIL Object FileList object, FileList empty Can't find variable: SharedWorker 94 FAIL ImageData 1x1 transparent black Can't find variable: SharedWorker 95 FAIL ImageData 1x1 non-transparent non-black Can't find variable: SharedWorker 96 FAIL Array ImageData object, ImageData 1x1 transparent black Can't find variable: SharedWorker 97 FAIL Array ImageData object, ImageData 1x1 non-transparent non-black Can't find variable: SharedWorker 98 FAIL Object ImageData object, ImageData 1x1 transparent black Can't find variable: SharedWorker 99 FAIL Object ImageData object, ImageData 1x1 non-transparent non-black Can't find variable: SharedWorker 100 TIMEOUT ImageBitmap 1x1 transparent black Test timed out 101 TIMEOUT ImageBitmap 1x1 non-transparent non-black Test timed out 102 TIMEOUT Array ImageBitmap object, ImageBitmap 1x1 transparent black Test timed out 103 TIMEOUT Array ImageBitmap object, ImageBitmap 1x1 non-transparent non-black Test timed out 104 TIMEOUT Object ImageBitmap object, ImageBitmap 1x1 transparent black Test timed out 105 TIMEOUT Object ImageBitmap object, ImageBitmap 1x1 non-transparent non-black Test timed out 106 FAIL Array sparse Can't find variable: SharedWorker 107 FAIL Array with non-index property Can't find variable: SharedWorker 108 FAIL Object with index property and length Can't find variable: SharedWorker 109 FAIL Array with circular reference Can't find variable: SharedWorker 110 FAIL Object with circular reference Can't find variable: SharedWorker 111 FAIL Array with identical property values Can't find variable: SharedWorker 112 FAIL Object with identical property values Can't find variable: SharedWorker 113 FAIL Object with property on prototype Can't find variable: SharedWorker 114 FAIL Object with non-enumerable property Can't find variable: SharedWorker 115 FAIL Object with non-writable property Can't find variable: SharedWorker 116 FAIL Object with non-configurable property Can't find variable: SharedWorker 117 -
trunk/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/shared.html
r232030 r232037 3 3 <script src="/resources/testharness.js"></script> 4 4 <script src="/resources/testharnessreport.js"></script> 5 <script src=/html/webappapis/structured-clone/structured-clone-battery-of-tests.js></script>6 <script src=/html/webappapis/structured-clone/structured-clone-battery-of-tests-with-transferables.js></script>7 <script src=/html/webappapis/structured-clone/structured-clone-battery-of-tests-harness.js></script>8 5 <div id=log></div> 9 6 <script> 10 runStructuredCloneBatteryOfTests({ 11 setup() { 12 const blob = new Blob([` 13 onconnect = ev => { 14 const port = ev.ports[0]; 15 port.onmessage = ev => port.postMessage(ev.data, ev.data.transfer); 16 }; 17 `], {type: 'text/javascript'}); 18 this.blobURL = URL.createObjectURL(blob); 19 this.worker = new SharedWorker(this.blobURL); 20 this.port = this.worker.port; 21 }, 22 structuredClone(data, transfer) { 23 return new Promise(resolve => { 24 this.port.addEventListener('message', function f(ev) { 25 this.port.removeEventListener('message', f); 26 resolve(ev.data.data); 27 }.bind(this)); 28 this.port.start(); 29 this.port.postMessage({data, transfer}, transfer); 30 }); 31 }, 32 teardown() { 33 URL.revokeObjectURL(this.blobURL); 34 } 35 }); 7 var type = 'shared'; 36 8 </script> 9 <script src="common.js"></script> -
trunk/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/w3c-import.log
r232030 r232037 15 15 ------------------------------------------------------------------------ 16 16 List of files: 17 /LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/common.js 17 18 /LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/dedicated.html 19 /LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/dedicated.js 18 20 /LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/shared.html 21 /LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/shared.js 22 /LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/worker-common.js -
trunk/Source/WebCore/ChangeLog
r232032 r232037 1 2018-05-21 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r232030. 4 https://bugs.webkit.org/show_bug.cgi?id=185850 5 6 "Caused 7 TestWebKitAPI.IndexedDB.StructuredCloneBackwardCompatibility 8 API test to fail" (Requested by cdumez on #webkit). 9 10 Reverted changeset: 11 12 "File's structured serialization should serialize lastModified 13 attribute" 14 https://bugs.webkit.org/show_bug.cgi?id=185773 15 https://trac.webkit.org/changeset/232030 16 1 17 2018-05-21 Daniel Bates <dabates@apple.com> 2 18 -
trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp
r232030 r232037 279 279 * Version 5. added support for Map and Set types. 280 280 * Version 6. added support for 8-bit strings. 281 * Version 7. added support for File's lastModified attribute.282 281 */ 283 static const unsigned CurrentVersion = 7;282 static const unsigned CurrentVersion = 6; 284 283 static const unsigned TerminatorTag = 0xFFFFFFFF; 285 284 static const unsigned StringPoolTag = 0xFFFFFFFE; … … 365 364 * 366 365 * FileData :- 367 * <path:StringData> <url:StringData> <type:StringData> <name:StringData> <lastModified:double>366 * <path:StringData> <url:StringData> <type:StringData> <name:StringData> 368 367 * 369 368 * FileList :- … … 1238 1237 write(file.type()); 1239 1238 write(file.name()); 1240 write(static_cast<double>(file.lastModifiedOverride().value_or(-1)));1241 1239 } 1242 1240 … … 2039 2037 if (!readStringData(name)) 2040 2038 return false; 2041 double lastModified;2042 if (!read(lastModified))2043 return false;2044 2039 2045 2040 // If the blob URL for this file has an associated blob file path, prefer that one over the "built-in" path. … … 2049 2044 2050 2045 if (m_isDOMGlobalObject) 2051 file = File::deserialize(filePath, URL(URL(), url->string()), type->string(), name->string() , lastModified >= 0 ? std::make_optional<int64_t>(lastModified) : std::nullopt);2046 file = File::deserialize(filePath, URL(URL(), url->string()), type->string(), name->string()); 2052 2047 return true; 2053 2048 } -
trunk/Source/WebCore/fileapi/File.cpp
r232030 r232037 64 64 } 65 65 66 File::File(DeserializationContructor, const String& path, const URL& url, const String& type, const String& name , const std::optional<int64_t>& lastModified)66 File::File(DeserializationContructor, const String& path, const URL& url, const String& type, const String& name) 67 67 : Blob(deserializationContructor, url, type, -1, path) 68 68 , m_path(path) 69 69 , m_name(name) 70 , m_lastModifiedDateOverride(lastModified)71 70 { 72 71 } … … 82 81 : Blob(WTFMove(blobPartVariants), convertPropertyBag(propertyBag)) 83 82 , m_name(filename) 84 , m_ lastModifiedDateOverride(propertyBag.lastModified.value_or(WallTime::now().secondsSinceEpoch().milliseconds()))83 , m_overrideLastModifiedDate(propertyBag.lastModified.value_or(WallTime::now().secondsSinceEpoch().milliseconds())) 85 84 { 86 85 } … … 98 97 , m_relativePath(file.relativePath()) 99 98 , m_name(!name.isNull() ? name : file.name()) 100 , m_ lastModifiedDateOverride(file.m_lastModifiedDateOverride)99 , m_overrideLastModifiedDate(file.m_overrideLastModifiedDate) 101 100 , m_isDirectory(file.isDirectory()) 102 101 { 103 102 } 104 103 105 int64_tFile::lastModified() const104 double File::lastModified() const 106 105 { 107 if (m_ lastModifiedDateOverride)108 return m_ lastModifiedDateOverride.value();106 if (m_overrideLastModifiedDate) 107 return m_overrideLastModifiedDate.value(); 109 108 110 int64_tresult;109 double result; 111 110 112 111 // FIXME: This does sync-i/o on the main thread and also recalculates every time the method is called. -
trunk/Source/WebCore/fileapi/File.h
r232030 r232037 39 39 public: 40 40 struct PropertyBag : BlobPropertyBag { 41 std::optional< int64_t> lastModified;41 std::optional<long long> lastModified; 42 42 }; 43 43 … … 53 53 } 54 54 55 static Ref<File> deserialize(const String& path, const URL& srcURL, const String& type, const String& name , const std::optional<int64_t>& lastModified = std::nullopt)55 static Ref<File> deserialize(const String& path, const URL& srcURL, const String& type, const String& name) 56 56 { 57 return adoptRef(*new File(deserializationContructor, path, srcURL, type, name , lastModified));57 return adoptRef(*new File(deserializationContructor, path, srcURL, type, name)); 58 58 } 59 59 … … 84 84 void setRelativePath(const String& relativePath) { m_relativePath = relativePath; } 85 85 const String& name() const { return m_name; } 86 WEBCORE_EXPORT int64_t lastModified() const; // Number of milliseconds since Epoch. 87 const std::optional<int64_t>& lastModifiedOverride() const { return m_lastModifiedDateOverride; } // Number of milliseconds since Epoch. 86 WEBCORE_EXPORT double lastModified() const; 88 87 89 88 static String contentTypeForFile(const String& path); … … 102 101 File(const File&, const String& name); 103 102 104 File(DeserializationContructor, const String& path, const URL& srcURL, const String& type, const String& name , const std::optional<int64_t>& lastModified);103 File(DeserializationContructor, const String& path, const URL& srcURL, const String& type, const String& name); 105 104 106 105 static void computeNameAndContentType(const String& path, const String& nameOverride, String& effectiveName, String& effectiveContentType); … … 113 112 String m_name; 114 113 115 std::optional<int64_t> m_ lastModifiedDateOverride;114 std::optional<int64_t> m_overrideLastModifiedDate; 116 115 mutable std::optional<bool> m_isDirectory; 117 116 };
Note: See TracChangeset
for help on using the changeset viewer.