Changeset 244539 in webkit


Ignore:
Timestamp:
Apr 23, 2019 8:36:58 AM (5 years ago)
Author:
youenn@apple.com
Message:

REGRESSION (r240727) [ Mac iOS ] Layout Test http/tests/workers/service/basic-register-exceptions.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=194368
<rdar://problem/47937467>

Reviewed by Alex Christensen.

Test was exiting sooner than the last registration was rejected.
Make sure that the test is run until the end in a more ordered way.

  • http/tests/workers/service/basic-register-exceptions-expected.txt:
  • http/tests/workers/service/resources/basic-register-exceptions.js:

(async.doTest):
(then): Deleted.
(catch): Deleted.

  • platform/mac-wk2/TestExpectations:
Location:
trunk/LayoutTests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r244538 r244539  
     12019-04-23  Youenn Fablet  <youenn@apple.com>
     2
     3        REGRESSION (r240727) [ Mac iOS ] Layout Test http/tests/workers/service/basic-register-exceptions.html is flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=194368
     5        <rdar://problem/47937467>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Test was exiting sooner than the last registration was rejected.
     10        Make sure that the test is run until the end in a more ordered way.
     11
     12        * http/tests/workers/service/basic-register-exceptions-expected.txt:
     13        * http/tests/workers/service/resources/basic-register-exceptions.js:
     14        (async.doTest):
     15        (then): Deleted.
     16        (catch): Deleted.
     17        * platform/mac-wk2/TestExpectations:
     18
    1192019-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
    220
  • trunk/LayoutTests/http/tests/workers/service/basic-register-exceptions-expected.txt

    r226096 r244539  
    1 CONSOLE MESSAGE: line 20: Registration failed with error: TypeError: serviceWorker.register() cannot be called with an empty script URL
    2 CONSOLE MESSAGE: line 30: Registration failed with error: TypeError: serviceWorker.register() must be called with a valid relative script URL
    3 CONSOLE MESSAGE: line 40: Registration failed with error: TypeError: serviceWorker.register() must be called with a script URL whose protocol is either HTTP or HTTPS
    4 CONSOLE MESSAGE: line 50: Registration failed with error: TypeError: serviceWorker.register() must be called with a script URL whose path does not contain '%2f' or '%5c'
    5 CONSOLE MESSAGE: line 60: Registration failed with error: TypeError: Scope URL provided to serviceWorker.register() must be either HTTP or HTTPS
    6 CONSOLE MESSAGE: line 70: Registration failed with error: TypeError: Scope URL provided to serviceWorker.register() cannot have a path that contains '%2f' or '%5c'
    7 CONSOLE MESSAGE: line 80: Registration failed with error: SecurityError: Script origin does not match the registering client's origin
    8 CONSOLE MESSAGE: line 91: Registration failed with error: SecurityError: Scope origin does not match the registering client's origin
     1CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: Script http://127.0.0.1:8000/workers/service/image-mime-type.php load failed
     2CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: serviceWorker.register() cannot be called with an empty script URL
     3CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: serviceWorker.register() must be called with a valid relative script URL
     4CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: serviceWorker.register() must be called with a script URL whose protocol is either HTTP or HTTPS
     5CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: serviceWorker.register() must be called with a script URL whose path does not contain '%2f' or '%5c'
     6CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: Scope URL provided to serviceWorker.register() must be either HTTP or HTTPS
     7CONSOLE MESSAGE: line 24: Registration failed with error: TypeError: Scope URL provided to serviceWorker.register() cannot have a path that contains '%2f' or '%5c'
     8CONSOLE MESSAGE: line 24: Registration failed with error: SecurityError: Script origin does not match the registering client's origin
     9CONSOLE MESSAGE: line 24: Registration failed with error: SecurityError: Scope origin does not match the registering client's origin
    910
  • trunk/LayoutTests/http/tests/workers/service/resources/basic-register-exceptions.js

    r222980 r244539  
    44}
    55
    6 navigator.serviceWorker.register("image-mime-type.php", { })
    7 .then(function(r) {
    8         console.log("Registered! (unexpectedly)");
    9 }, function(e) {
    10         console.log("Registration failed with error: " + e);
    11 })
    12 .catch(function(e) {
    13         console.log("Exception registering: " + e);
    14 });
     6var registrations = [
     7    ["image-mime-type.php", {}],
     8    ["", {}],
     9    ["http://127.0.0.1:abc", {}],
     10    ["somescheme://script.js", { }],
     11    ["resources/%2fscript.js", { }],
     12    ["resources/script.js", { scope: "somescheme://script.js" }],
     13    ["resources/script.js", { scope: "%2fscript.js" }],
     14    ["http://localhost:8000/workers/service/resources/empty-worker.js", { }],
     15    ["resources/empty-worker.js", { scope: "http://localhost:8000/workers/service/" }]
     16];
    1517
    16 navigator.serviceWorker.register("", { })
    17 .then(function(r) {
    18         console.log("Registered! (unexpectedly)");
    19 }, function(e) {
    20         console.log("Registration failed with error: " + e);
    21 })
    22 .catch(function(e) {
    23         console.log("Exception registering: " + e);
    24 });
     18async function doTest()
     19{
     20    for (let registration of registrations) {
     21        await navigator.serviceWorker.register(registration[0], registration[1]).then(function(r) {
     22            console.log("Registered! (unexpectedly)");
     23        }, function(e) {
     24            console.log("Registration failed with error: " + e);
     25        }).catch(function(e) {
     26            console.log("Exception registering: " + e);i
     27        });
     28    }
     29    finishSWTest();
     30}
    2531
    26 navigator.serviceWorker.register("http://127.0.0.1:abc", { })
    27 .then(function(r) {
    28         console.log("Registered! (unexpectedly)");
    29 }, function(e) {
    30         console.log("Registration failed with error: " + e);
    31 })
    32 .catch(function(e) {
    33         console.log("Exception registering: " + e);
    34 });
    35 
    36 navigator.serviceWorker.register("somescheme://script.js", { })
    37 .then(function(r) {
    38         console.log("Registered! (unexpectedly)");
    39 }, function(e) {
    40         console.log("Registration failed with error: " + e);
    41 })
    42 .catch(function(e) {
    43         console.log("Exception registering: " + e);
    44 });
    45 
    46 navigator.serviceWorker.register("resources/%2fscript.js", { })
    47 .then(function(r) {
    48         console.log("Registered! (unexpectedly)");
    49 }, function(e) {
    50         console.log("Registration failed with error: " + e);
    51 })
    52 .catch(function(e) {
    53         console.log("Exception registering: " + e);
    54 });
    55 
    56 navigator.serviceWorker.register("resources/script.js", { scope: "somescheme://script.js" })
    57 .then(function(r) {
    58         console.log("Registered! (unexpectedly)");
    59 }, function(e) {
    60         console.log("Registration failed with error: " + e);
    61 })
    62 .catch(function(e) {
    63         console.log("Exception registering: " + e);
    64 });
    65 
    66 navigator.serviceWorker.register("resources/script.js", { scope: "%2fscript.js" })
    67 .then(function(r) {
    68         console.log("Registered! (unexpectedly)");
    69 }, function(e) {
    70         console.log("Registration failed with error: " + e);
    71 })
    72 .catch(function(e) {
    73         console.log("Exception registering: " + e);
    74 });
    75 
    76 navigator.serviceWorker.register("http://localhost:8000/workers/service/resources/empty-worker.js", { })
    77 .then(function(r) {
    78         console.log("Registered! (unexpectedly)");
    79 }, function(e) {
    80         console.log("Registration failed with error: " + e);
    81 })
    82 .catch(function(e) {
    83         console.log("Exception registering: " + e);
    84 });
    85 
    86 navigator.serviceWorker.register("resources/empty-worker.js", { scope: "http://localhost:8000/workers/service/" })
    87 .then(function(r) {
    88         console.log("Registered! (unexpectedly)");
    89         done();
    90 }, function(e) {
    91         console.log("Registration failed with error: " + e);
    92         done();
    93 })
    94 .catch(function(e) {
    95         console.log("Exception registering: " + e);
    96         done();
    97 });
     32doTest();
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r244344 r244539  
    914914webkit.org/b/194826 http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect.html [ Pass Timeout ]
    915915
    916 webkit.org/b/194368 http/tests/workers/service/basic-register-exceptions.html [ Pass Failure ]
    917 
    918916webkit.org/b/194253 scrollingcoordinator/scrolling-tree/fixed-inside-frame.html [ Pass Failure ]
    919917
Note: See TracChangeset for help on using the changeset viewer.