Changeset 232037 in webkit


Ignore:
Timestamp:
May 21, 2018 4:42:21 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r232030.
https://bugs.webkit.org/show_bug.cgi?id=185850

"Caused
TestWebKitAPI.IndexedDB.StructuredCloneBackwardCompatibility
API test to fail" (Requested by cdumez on #webkit).

Reverted changeset:

"File's structured serialization should serialize lastModified
attribute"
https://bugs.webkit.org/show_bug.cgi?id=185773
https://trac.webkit.org/changeset/232030

Location:
trunk
Files:
3 added
1 deleted
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r232033 r232037  
     12018-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
    1172018-05-11  Ryosuke Niwa  <rniwa@webkit.org>
    218
  • trunk/LayoutTests/TestExpectations

    r232030 r232037  
    242242imported/w3c/web-platform-tests/workers/opaque-origin.html [ Skip ]
    243243imported/w3c/web-platform-tests/workers/semantics/interface-objects/003.html [ Skip ]
     244imported/w3c/web-platform-tests/workers/semantics/structured-clone/shared.html [ Skip ]
     245imported/w3c/web-platform-tests/workers/semantics/structured-clone/dedicated.html [ Skip ]
    244246imported/w3c/web-platform-tests/workers/semantics/multiple-workers/003.html [ Skip ]
    245247imported/w3c/web-platform-tests/workers/semantics/multiple-workers/005.html [ Skip ]
  • trunk/LayoutTests/fast/storage/serialized-script-value.html

    r232030 r232037  
    66    <body>
    77        <script>
    8 
    9 const currentVersion = 0x07;
    108
    119// Here's a little Q&D helper for future adventurers needing to rebaseline this.
     
    4644testSerialization({foo: 'zoo', bar: {baz: 'myNewKey'}},
    4745[
    48     currentVersion, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
     46    0x06, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
    4947    0x80, 0x66, 0x6f, 0x6f, 0x10, 0x03, 0x00, 0x00,
    5048    0x80, 0x7a, 0x6f, 0x6f, 0x03, 0x00, 0x00, 0x80,
     
    6967testSerialization({foo: 'zoo', bar: 'myNewKey'},
    7068[
    71     currentVersion, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
     69    0x06, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
    7270    0x80, 0x66, 0x6f, 0x6f, 0x10, 0x03, 0x00, 0x00,
    7371    0x80, 0x7a, 0x6f, 0x6f, 0x03, 0x00, 0x00, 0x80,
     
    7775],
    7876[
    79     currentVersion, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
     77    0x03, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
    8078    0x00, 0x66, 0x00, 0x6f, 0x00, 0x6f, 0x00, 0x10,
    8179    0x03, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x6f, 0x00,
     
    8987testSerialization([],
    9088[
    91     currentVersion, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
     89    0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
    9290    0x00, 0xff, 0xff, 0xff, 0xff
    9391],
     
    9896testSerialization({foo: "zoo"},
    9997[
    100     currentVersion, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
     98    0x06, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
    10199    0x80, 0x66, 0x6f, 0x6f, 0x10, 0x03, 0x00, 0x00,
    102100    0x80, 0x7a, 0x6f, 0x6f, 0xff, 0xff, 0xff, 0xff
     
    110108testSerialization({foo: null},
    111109[
    112     currentVersion, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
     110    0x06, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00,
    113111    0x80, 0x66, 0x6f, 0x6f, 0x04, 0xff, 0xff, 0xff,
    114112    0xff
     
    122120testSerialization({},
    123121[
    124     currentVersion, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff,
     122    0x06, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff,
    125123    0xff
    126124],
     
    132130testSerialization(undefined,
    133131[
    134     currentVersion, 0x00, 0x00, 0x00, 0x03
     132    0x06, 0x00, 0x00, 0x00, 0x03
    135133],
    136134[
     
    139137testSerialization(true,
    140138[
    141     currentVersion, 0x00, 0x00, 0x00, 0x09
     139    0x06, 0x00, 0x00, 0x00, 0x09
    142140],
    143141[
     
    146144testSerialization(false,
    147145[
    148     currentVersion, 0x00, 0x00, 0x00, 0x08
     146    0x06, 0x00, 0x00, 0x00, 0x08
    149147],
    150148[
     
    153151testSerialization(new Array(100),
    154152[
    155     currentVersion, 0x00, 0x00, 0x00, 0x01, 0x64, 0x00, 0x00,
     153    0x06, 0x00, 0x00, 0x00, 0x01, 0x64, 0x00, 0x00,
    156154    0x00, 0xff, 0xff, 0xff, 0xff
    157155],
     
    162160testSerialization(10,
    163161[
    164     currentVersion, 0x00, 0x00, 0x00, 0x05, 0x0a, 0x00, 0x00,
     162    0x06, 0x00, 0x00, 0x00, 0x05, 0x0a, 0x00, 0x00,
    165163    0x00
    166164],
     
    171169testSerialization(-10,
    172170[
    173     currentVersion, 0x00, 0x00, 0x00, 0x05, 0xf6, 0xff, 0xff,
     171    0x06, 0x00, 0x00, 0x00, 0x05, 0xf6, 0xff, 0xff,
    174172    0xff
    175173],
     
    180178testSerialization(Math.pow(2,30),
    181179[
    182     currentVersion, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
     180    0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
    183181    0x40
    184182],
     
    189187testSerialization(Math.pow(2,55),
    190188[
    191     currentVersion, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
     189    0x06, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
    192190    0x00, 0x00, 0x00, 0x60, 0x43,
    193191],
     
    198196testSerialization(1.23,
    199197[
    200     currentVersion, 0x00, 0x00, 0x00, 0x0a, 0xae, 0x47, 0xe1,
     198    0x06, 0x00, 0x00, 0x00, 0x0a, 0xae, 0x47, 0xe1,
    201199    0x7a, 0x14, 0xae, 0xf3, 0x3f
    202200],
     
    207205testSerialization("",
    208206[
    209     currentVersion, 0x00, 0x00, 0x00, 0x11
     207    0x06, 0x00, 0x00, 0x00, 0x11
    210208],
    211209[
     
    214212testSerialization("abc",
    215213[
    216     currentVersion, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00,
     214    0x06, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00,
    217215    0x80, 0x61, 0x62, 0x63
    218216],
     
    223221testSerialization({integer: 123},
    224222[
    225     currentVersion, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00,
     223    0x06, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00,
    226224    0x80, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72,
    227225    0x05, 0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
     
    236234testSerialization({string: "str"},
    237235[
    238     currentVersion, 0x00, 0x00, 0x00, 0x02, 0x06, 0x00, 0x00,
     236    0x06, 0x00, 0x00, 0x00, 0x02, 0x06, 0x00, 0x00,
    239237    0x80, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x10,
    240238    0x03, 0x00, 0x00, 0x80, 0x73, 0x74, 0x72, 0xff,
     
    250248testSerialization({list: [1,2,3]},
    251249[
    252     currentVersion, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00,
     250    0x06, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00,
    253251    0x80, 0x6c, 0x69, 0x73, 0x74, 0x01, 0x03, 0x00,
    254252    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x01,
     
    269267testSerialization(null,
    270268[
    271     currentVersion, 0x00, 0x00, 0x00, 0x04
     269    0x06, 0x00, 0x00, 0x00, 0x04
    272270],
    273271[
     
    276274testSerialization(/abc/,
    277275[
    278     currentVersion, 0x00, 0x00, 0x00, 0x12, 0x03, 0x00, 0x00,
     276    0x06, 0x00, 0x00, 0x00, 0x12, 0x03, 0x00, 0x00,
    279277    0x80, 0x61, 0x62, 0x63, 0x00, 0x00, 0x00, 0x80
    280278],
     
    290288testSerialization(outerObject,
    291289[
    292     currentVersion, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00,
     290    0x06, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00,
    293291    0x80, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x02, 0x05,
    294292    0x00, 0x00, 0x80, 0x68, 0x65, 0x6c, 0x6c, 0x6f,
     
    312310testSerialization(innerObject,
    313311[
    314     currentVersion, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00,
     312    0x06, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00,
    315313    0x80, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x10, 0x05,
    316314    0x00, 0x00, 0x80, 0x74, 0x68, 0x65, 0x72, 0x65,
     
    328326testSerialization(unicodeObject,
    329327[
    330     currentVersion, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
     328    0x06, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
    331329    0x80, 0x61, 0x10, 0xfe, 0xff, 0xff, 0xff, 0x00,
    332330    0x01, 0x00, 0x00, 0x80, 0x75, 0x10, 0x02, 0x00,
     
    346344testSerialization(unicodeObject,
    347345[
    348     currentVersion, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
     346    0x06, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00,
    349347    0x80, 0x61, 0x10, 0x02, 0x00, 0x00, 0x80, 0x61,
    350348    0x62, 0x01, 0x00, 0x00, 0x80, 0x75, 0x10, 0x02,
     
    371369testSerialization(arrayObject,
    372370[
    373     currentVersion, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
     371    0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
    374372    0x00, 0xfd, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00,
    375373    0x80, 0x61, 0x09, 0x01, 0x00, 0x00, 0x80, 0x62,
     
    385383testSerialization(arrayObject,
    386384[
    387     currentVersion, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,
     385    0x06, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,
    388386    0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00,
    389387    0x00, 0x80, 0x66, 0x6f, 0x6f, 0x01, 0x00, 0x00,
     
    406404testSerialization(mapObject,
    407405[
    408     currentVersion, 0x00, 0x00, 0x00, 0x1e, 0x07, 0x05, 0x02,
     406    0x06, 0x00, 0x00, 0x00, 0x1e, 0x07, 0x05, 0x02,
    409407    0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00,
    410408    0x00, 0x00, 0xf8, 0x3f, 0x02, 0xff, 0xff, 0xff,
     
    427425testSerialization(setObject,
    428426[
    429     currentVersion, 0x00, 0x00, 0x00, 0x1d, 0x07, 0x0a, 0x00,
     427    0x06, 0x00, 0x00, 0x00, 0x1d, 0x07, 0x0a, 0x00,
    430428    0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0x13,
    431429    0x00, 0x10, 0x03, 0x00, 0x00, 0x80, 0x62, 0x61,
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r232030 r232037  
     12018-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
    1172018-05-21  Chris Dumez  <cdumez@apple.com>
    218
  • trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/keypath-special-identifiers-expected.txt

    r232030 r232037  
    55PASS Type: Blob, identifier: type
    66PASS Type: File, identifier: name
    7 PASS Type: File, identifier: lastModified
     7FAIL Type: File, identifier: lastModified assert_equals: Property should be used as key expected 0 but got 1
    88FAIL Type: File, identifier: lastModifiedDate Provided data is inadequate.
    99
  • 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     }
     1function 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
     11function 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); });
    2120  });
    2221}
     
    263262check('Object RegExp object, RegExp new line', {'x':new RegExp('\n')}, compare_Object(enumerate_props(compare_RegExp('\\n'))));
    264263
    265 async function compare_Blob(actual, input, test_obj, expect_File) {
     264function compare_Blob(actual, input, test_obj, expect_File) {
    266265  if (typeof actual === 'string')
    267266    assert_unreached(actual);
     
    272271  assert_equals(actual.type, input.type, 'type');
    273272  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;
    282298}
    283299function func_Blob_basic() {
     
    323339check('Blob NUL', func_Blob_NUL, compare_Blob);
    324340
    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));
     341async_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');
     344async_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)');
     347async_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)');
     350async_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)');
     353async_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');
     356async_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
     360async_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');
     363async_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)');
     366async_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)');
     369async_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)');
     372async_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');
     375async_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');
    338378
    339379function compare_File(actual, input, test_obj) {
     
    365405}
    366406check('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)));
     407check('Array FileList object, FileList empty', [func_FileList_empty], compare_Array(enumerate_props(compare_FileList)));
     408check('Object FileList object, FileList empty', {'x':func_FileList_empty}, compare_Object(enumerate_props(compare_FileList)));
    369409
    370410function compare_ArrayBufferView(view) {
     
    410450}
    411451check('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 
     452async_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');
     455async_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');
     458async_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');
     461async_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
     465function 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}
    500474function get_canvas_1x1_transparent_black() {
    501475  var canvas = document.createElement('canvas');
     
    504478  return canvas;
    505479}
    506 
     480async_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');
    507484function get_canvas_1x1_non_transparent_non_black() {
    508485  var canvas = document.createElement('canvas');
     
    517494  return canvas;
    518495}
    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 });
     496async_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
     501async_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');
     505async_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
     510async_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');
     514async_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
     519check('Array sparse', new Array(10), compare_Array(enumerate_props(compare_primitive)));
     520check('Array with non-index property', function() {
     521  var rv = [];
     522  rv.foo = 'bar';
     523  return rv;
     524}, compare_Array(enumerate_props(compare_primitive)));
     525check('Object with index property and length', {'0':'foo', 'length':1}, compare_Object(enumerate_props(compare_primitive)));
     526function check_circular_property(prop) {
     527  return function(actual) {
     528    assert_equals(actual[prop], actual);
     529  };
     530}
     531check('Array with circular reference', function() {
     532  var rv = [];
     533  rv[0] = rv;
     534  return rv;
     535}, compare_Array(check_circular_property('0')));
     536check('Object with circular reference', function() {
     537  var rv = {};
     538  rv['x'] = rv;
     539  return rv;
     540}, compare_Object(check_circular_property('x')));
     541function check_identical_property_values(prop1, prop2) {
     542  return function(actual) {
     543    assert_equals(actual[prop1], actual[prop2]);
     544  };
     545}
     546check('Array with identical property values', function() {
     547  var obj = {}
     548  return [obj, obj];
     549}, compare_Array(check_identical_property_values('0', '1')));
     550check('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
     555function check_absent_property(prop) {
     556  return function(actual) {
     557    assert_false(prop in actual);
     558  };
     559}
     560check('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
     566check('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
     572function 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}
     579check('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
     585function 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}
     592check('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
     2Harness Error (TIMEOUT), message = null
    13
    24PASS primitive undefined
     
    5153PASS Object Date objects
    5254PASS RegExp flags and lastIndex
    53 FAIL RegExp sticky flag assert_equals: sticky expected true but got false
    54 FAIL RegExp unicode flag assert_equals: unicode expected true but got false
     55FAIL RegExp sticky flag assert_unreached: FAIL: unknown test Reached unreachable code
     56FAIL RegExp unicode flag assert_unreached: FAIL: unknown test Reached unreachable code
    5557PASS RegExp empty
    5658PASS RegExp slash
    5759PASS RegExp new line
    5860PASS Array RegExp object, RegExp flags and lastIndex
    59 FAIL Array RegExp object, RegExp sticky flag assert_equals: sticky expected true but got false
    60 FAIL Array RegExp object, RegExp unicode flag assert_equals: unicode expected true but got false
     61FAIL Array RegExp object, RegExp sticky flag assert_unreached: FAIL: unknown test Reached unreachable code
     62FAIL Array RegExp object, RegExp unicode flag assert_unreached: FAIL: unknown test Reached unreachable code
    6163PASS Array RegExp object, RegExp empty
    6264PASS Array RegExp object, RegExp slash
    6365PASS Array RegExp object, RegExp new line
    6466PASS Object RegExp object, RegExp flags and lastIndex
    65 FAIL Object RegExp object, RegExp sticky flag assert_equals: sticky expected true but got false
    66 FAIL Object RegExp object, RegExp unicode flag assert_equals: unicode expected true but got false
     67FAIL Object RegExp object, RegExp sticky flag assert_unreached: FAIL: unknown test Reached unreachable code
     68FAIL Object RegExp object, RegExp unicode flag assert_unreached: FAIL: unknown test Reached unreachable code
    6769PASS Object RegExp object, RegExp empty
    6870PASS Object RegExp object, RegExp slash
    6971PASS 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
     72FAIL Blob basic assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     73FAIL Blob unpaired high surrogate (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     74FAIL Blob unpaired low surrogate (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     75FAIL Blob paired surrogates (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     76FAIL Blob empty assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     77FAIL Blob NUL assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     78FAIL Array Blob object, Blob basic assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     79FAIL Array Blob object, Blob unpaired high surrogate (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     80FAIL Array Blob object, Blob unpaired low surrogate (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     81FAIL Array Blob object, Blob paired surrogates (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     82FAIL Array Blob object, Blob empty assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     83FAIL Array Blob object, Blob NUL assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     84FAIL Object Blob object, Blob basic assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     85FAIL Object Blob object, Blob unpaired high surrogate (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     86FAIL Object Blob object, Blob unpaired low surrogate (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     87FAIL Object Blob object, Blob paired surrogates (invalid utf-8) assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     88FAIL Object Blob object, Blob empty assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     89FAIL Object Blob object, Blob NUL assert_unreached: FAIL ReferenceError: Can't find variable: File Reached unreachable code
     90FAIL File basic assert_true: instanceof File expected true got false
     91FAIL FileList empty assert_unreached: FAIL ReferenceError: Can't find variable: FileList Reached unreachable code
     92FAIL Array FileList object, FileList empty The object can not be cloned.
     93FAIL Object FileList object, FileList empty The object can not be cloned.
    9294PASS ImageData 1x1 transparent black
    9395PASS ImageData 1x1 non-transparent non-black
     
    9698PASS Object ImageData object, ImageData 1x1 transparent black
    9799PASS Object ImageData object, ImageData 1x1 non-transparent non-black
     100TIMEOUT ImageBitmap 1x1 transparent black Test timed out
     101TIMEOUT ImageBitmap 1x1 non-transparent non-black Test timed out
     102TIMEOUT Array ImageBitmap object, ImageBitmap 1x1 transparent black Test timed out
     103TIMEOUT Array ImageBitmap object, ImageBitmap 1x1 non-transparent non-black Test timed out
     104TIMEOUT Object ImageBitmap object, ImageBitmap 1x1 transparent black Test timed out
     105TIMEOUT Object ImageBitmap object, ImageBitmap 1x1 non-transparent non-black Test timed out
    98106PASS Array sparse
    99107PASS Array with non-index property
     
    107115PASS Object with non-writable property
    108116PASS 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 ArrayBuffer
    116 PASS MessagePort
    117117
  • trunk/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/dedicated.html

    r232030 r232037  
    33<script src="/resources/testharness.js"></script>
    44<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>
    85<div id=log></div>
    96<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   });
     7var type = 'dedicated';
    328</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: SharedWorker
    21
    3 FAIL structured clone to shared worker ReferenceError: Can't find variable: SharedWorker
     2Harness Error (TIMEOUT), message = null
    43
     4FAIL primitive undefined Can't find variable: SharedWorker
     5FAIL primitive null Can't find variable: SharedWorker
     6FAIL primitive true Can't find variable: SharedWorker
     7FAIL primitive false Can't find variable: SharedWorker
     8FAIL primitive string, empty string Can't find variable: SharedWorker
     9FAIL primitive string, lone high surrogate Can't find variable: SharedWorker
     10FAIL primitive string, lone low surrogate Can't find variable: SharedWorker
     11FAIL primitive string, NUL Can't find variable: SharedWorker
     12FAIL primitive string, astral character Can't find variable: SharedWorker
     13FAIL primitive number, 0.2 Can't find variable: SharedWorker
     14FAIL primitive number, 0 Can't find variable: SharedWorker
     15FAIL primitive number, -0 Can't find variable: SharedWorker
     16FAIL primitive number, NaN Can't find variable: SharedWorker
     17FAIL primitive number, Infinity Can't find variable: SharedWorker
     18FAIL primitive number, -Infinity Can't find variable: SharedWorker
     19FAIL primitive number, 9007199254740992 Can't find variable: SharedWorker
     20FAIL primitive number, -9007199254740992 Can't find variable: SharedWorker
     21FAIL primitive number, 9007199254740994 Can't find variable: SharedWorker
     22FAIL primitive number, -9007199254740994 Can't find variable: SharedWorker
     23FAIL Array primitives Can't find variable: SharedWorker
     24FAIL Object primitives Can't find variable: SharedWorker
     25FAIL Boolean true Can't find variable: SharedWorker
     26FAIL Boolean false Can't find variable: SharedWorker
     27FAIL Array Boolean objects Can't find variable: SharedWorker
     28FAIL Object Boolean objects Can't find variable: SharedWorker
     29FAIL String empty string Can't find variable: SharedWorker
     30FAIL String lone high surrogate Can't find variable: SharedWorker
     31FAIL String lone low surrogate Can't find variable: SharedWorker
     32FAIL String NUL Can't find variable: SharedWorker
     33FAIL String astral character Can't find variable: SharedWorker
     34FAIL Array String objects Can't find variable: SharedWorker
     35FAIL Object String objects Can't find variable: SharedWorker
     36FAIL Number 0.2 Can't find variable: SharedWorker
     37FAIL Number 0 Can't find variable: SharedWorker
     38FAIL Number -0 Can't find variable: SharedWorker
     39FAIL Number NaN Can't find variable: SharedWorker
     40FAIL Number Infinity Can't find variable: SharedWorker
     41FAIL Number -Infinity Can't find variable: SharedWorker
     42FAIL Number 9007199254740992 Can't find variable: SharedWorker
     43FAIL Number -9007199254740992 Can't find variable: SharedWorker
     44FAIL Number 9007199254740994 Can't find variable: SharedWorker
     45FAIL Number -9007199254740994 Can't find variable: SharedWorker
     46FAIL Array Number objects Can't find variable: SharedWorker
     47FAIL Object Number objects Can't find variable: SharedWorker
     48FAIL Date 0 Can't find variable: SharedWorker
     49FAIL Date -0 Can't find variable: SharedWorker
     50FAIL Date -8.64e15 Can't find variable: SharedWorker
     51FAIL Date 8.64e15 Can't find variable: SharedWorker
     52FAIL Array Date objects Can't find variable: SharedWorker
     53FAIL Object Date objects Can't find variable: SharedWorker
     54FAIL RegExp flags and lastIndex Can't find variable: SharedWorker
     55FAIL RegExp sticky flag Can't find variable: SharedWorker
     56FAIL RegExp unicode flag Can't find variable: SharedWorker
     57FAIL RegExp empty Can't find variable: SharedWorker
     58FAIL RegExp slash Can't find variable: SharedWorker
     59FAIL RegExp new line Can't find variable: SharedWorker
     60FAIL Array RegExp object, RegExp flags and lastIndex Can't find variable: SharedWorker
     61FAIL Array RegExp object, RegExp sticky flag Can't find variable: SharedWorker
     62FAIL Array RegExp object, RegExp unicode flag Can't find variable: SharedWorker
     63FAIL Array RegExp object, RegExp empty Can't find variable: SharedWorker
     64FAIL Array RegExp object, RegExp slash Can't find variable: SharedWorker
     65FAIL Array RegExp object, RegExp new line Can't find variable: SharedWorker
     66FAIL Object RegExp object, RegExp flags and lastIndex Can't find variable: SharedWorker
     67FAIL Object RegExp object, RegExp sticky flag Can't find variable: SharedWorker
     68FAIL Object RegExp object, RegExp unicode flag Can't find variable: SharedWorker
     69FAIL Object RegExp object, RegExp empty Can't find variable: SharedWorker
     70FAIL Object RegExp object, RegExp slash Can't find variable: SharedWorker
     71FAIL Object RegExp object, RegExp new line Can't find variable: SharedWorker
     72FAIL Blob basic Can't find variable: SharedWorker
     73FAIL Blob unpaired high surrogate (invalid utf-8) Can't find variable: SharedWorker
     74FAIL Blob unpaired low surrogate (invalid utf-8) Can't find variable: SharedWorker
     75FAIL Blob paired surrogates (invalid utf-8) Can't find variable: SharedWorker
     76FAIL Blob empty Can't find variable: SharedWorker
     77FAIL Blob NUL Can't find variable: SharedWorker
     78FAIL Array Blob object, Blob basic Can't find variable: SharedWorker
     79FAIL Array Blob object, Blob unpaired high surrogate (invalid utf-8) Can't find variable: SharedWorker
     80FAIL Array Blob object, Blob unpaired low surrogate (invalid utf-8) Can't find variable: SharedWorker
     81FAIL Array Blob object, Blob paired surrogates (invalid utf-8) Can't find variable: SharedWorker
     82FAIL Array Blob object, Blob empty Can't find variable: SharedWorker
     83FAIL Array Blob object, Blob NUL Can't find variable: SharedWorker
     84FAIL Object Blob object, Blob basic Can't find variable: SharedWorker
     85FAIL Object Blob object, Blob unpaired high surrogate (invalid utf-8) Can't find variable: SharedWorker
     86FAIL Object Blob object, Blob unpaired low surrogate (invalid utf-8) Can't find variable: SharedWorker
     87FAIL Object Blob object, Blob paired surrogates (invalid utf-8) Can't find variable: SharedWorker
     88FAIL Object Blob object, Blob empty Can't find variable: SharedWorker
     89FAIL Object Blob object, Blob NUL Can't find variable: SharedWorker
     90FAIL File basic Can't find variable: SharedWorker
     91FAIL FileList empty Can't find variable: SharedWorker
     92FAIL Array FileList object, FileList empty Can't find variable: SharedWorker
     93FAIL Object FileList object, FileList empty Can't find variable: SharedWorker
     94FAIL ImageData 1x1 transparent black Can't find variable: SharedWorker
     95FAIL ImageData 1x1 non-transparent non-black Can't find variable: SharedWorker
     96FAIL Array ImageData object, ImageData 1x1 transparent black Can't find variable: SharedWorker
     97FAIL Array ImageData object, ImageData 1x1 non-transparent non-black Can't find variable: SharedWorker
     98FAIL Object ImageData object, ImageData 1x1 transparent black Can't find variable: SharedWorker
     99FAIL Object ImageData object, ImageData 1x1 non-transparent non-black Can't find variable: SharedWorker
     100TIMEOUT ImageBitmap 1x1 transparent black Test timed out
     101TIMEOUT ImageBitmap 1x1 non-transparent non-black Test timed out
     102TIMEOUT Array ImageBitmap object, ImageBitmap 1x1 transparent black Test timed out
     103TIMEOUT Array ImageBitmap object, ImageBitmap 1x1 non-transparent non-black Test timed out
     104TIMEOUT Object ImageBitmap object, ImageBitmap 1x1 transparent black Test timed out
     105TIMEOUT Object ImageBitmap object, ImageBitmap 1x1 non-transparent non-black Test timed out
     106FAIL Array sparse Can't find variable: SharedWorker
     107FAIL Array with non-index property Can't find variable: SharedWorker
     108FAIL Object with index property and length Can't find variable: SharedWorker
     109FAIL Array with circular reference Can't find variable: SharedWorker
     110FAIL Object with circular reference Can't find variable: SharedWorker
     111FAIL Array with identical property values Can't find variable: SharedWorker
     112FAIL Object with identical property values Can't find variable: SharedWorker
     113FAIL Object with property on prototype Can't find variable: SharedWorker
     114FAIL Object with non-enumerable property Can't find variable: SharedWorker
     115FAIL Object with non-writable property Can't find variable: SharedWorker
     116FAIL 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  
    33<script src="/resources/testharness.js"></script>
    44<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>
    85<div id=log></div>
    96<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   });
     7var type = 'shared';
    368</script>
     9<script src="common.js"></script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/w3c-import.log

    r232030 r232037  
    1515------------------------------------------------------------------------
    1616List of files:
     17/LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/common.js
    1718/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
    1820/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  
     12018-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
    1172018-05-21  Daniel Bates  <dabates@apple.com>
    218
  • trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp

    r232030 r232037  
    279279 * Version 5. added support for Map and Set types.
    280280 * Version 6. added support for 8-bit strings.
    281  * Version 7. added support for File's lastModified attribute.
    282281 */
    283 static const unsigned CurrentVersion = 7;
     282static const unsigned CurrentVersion = 6;
    284283static const unsigned TerminatorTag = 0xFFFFFFFF;
    285284static const unsigned StringPoolTag = 0xFFFFFFFE;
     
    365364 *
    366365 * FileData :-
    367  *    <path:StringData> <url:StringData> <type:StringData> <name:StringData> <lastModified:double>
     366 *    <path:StringData> <url:StringData> <type:StringData> <name:StringData>
    368367 *
    369368 * FileList :-
     
    12381237        write(file.type());
    12391238        write(file.name());
    1240         write(static_cast<double>(file.lastModifiedOverride().value_or(-1)));
    12411239    }
    12421240
     
    20392037        if (!readStringData(name))
    20402038            return false;
    2041         double lastModified;
    2042         if (!read(lastModified))
    2043             return false;
    20442039
    20452040        // If the blob URL for this file has an associated blob file path, prefer that one over the "built-in" path.
     
    20492044
    20502045        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());
    20522047        return true;
    20532048    }
  • trunk/Source/WebCore/fileapi/File.cpp

    r232030 r232037  
    6464}
    6565
    66 File::File(DeserializationContructor, const String& path, const URL& url, const String& type, const String& name, const std::optional<int64_t>& lastModified)
     66File::File(DeserializationContructor, const String& path, const URL& url, const String& type, const String& name)
    6767    : Blob(deserializationContructor, url, type, -1, path)
    6868    , m_path(path)
    6969    , m_name(name)
    70     , m_lastModifiedDateOverride(lastModified)
    7170{
    7271}
     
    8281    : Blob(WTFMove(blobPartVariants), convertPropertyBag(propertyBag))
    8382    , 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()))
    8584{
    8685}
     
    9897    , m_relativePath(file.relativePath())
    9998    , m_name(!name.isNull() ? name : file.name())
    100     , m_lastModifiedDateOverride(file.m_lastModifiedDateOverride)
     99    , m_overrideLastModifiedDate(file.m_overrideLastModifiedDate)
    101100    , m_isDirectory(file.isDirectory())
    102101{
    103102}
    104103
    105 int64_t File::lastModified() const
     104double File::lastModified() const
    106105{
    107     if (m_lastModifiedDateOverride)
    108         return m_lastModifiedDateOverride.value();
     106    if (m_overrideLastModifiedDate)
     107        return m_overrideLastModifiedDate.value();
    109108
    110     int64_t result;
     109    double result;
    111110
    112111    // 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  
    3939public:
    4040    struct PropertyBag : BlobPropertyBag {
    41         std::optional<int64_t> lastModified;
     41        std::optional<long long> lastModified;
    4242    };
    4343
     
    5353    }
    5454
    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)
    5656    {
    57         return adoptRef(*new File(deserializationContructor, path, srcURL, type, name, lastModified));
     57        return adoptRef(*new File(deserializationContructor, path, srcURL, type, name));
    5858    }
    5959
     
    8484    void setRelativePath(const String& relativePath) { m_relativePath = relativePath; }
    8585    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;
    8887
    8988    static String contentTypeForFile(const String& path);
     
    102101    File(const File&, const String& name);
    103102
    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);
    105104
    106105    static void computeNameAndContentType(const String& path, const String& nameOverride, String& effectiveName, String& effectiveContentType);
     
    113112    String m_name;
    114113
    115     std::optional<int64_t> m_lastModifiedDateOverride;
     114    std::optional<int64_t> m_overrideLastModifiedDate;
    116115    mutable std::optional<bool> m_isDirectory;
    117116};
Note: See TracChangeset for help on using the changeset viewer.