Changeset 239959 in webkit


Ignore:
Timestamp:
Jan 14, 2019 4:00:04 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Import current Resource-Timing WPTs
https://bugs.webkit.org/show_bug.cgi?id=193302

Patch by Charles Vazac <cvazac@akamai.com> on 2019-01-14
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/resource-timing/SyntheticResponse.py:

(main):

  • web-platform-tests/resource-timing/buffer-full-add-after-full-event-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-add-after-full-event.html: Added.
  • web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-that-drop.html: Added.
  • web-platform-tests/resource-timing/buffer-full-add-entries-during-callback.html: Added.
  • web-platform-tests/resource-timing/buffer-full-add-then-clear-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-add-then-clear.html: Added.
  • web-platform-tests/resource-timing/buffer-full-decrease-buffer-during-callback.html: Added.
  • web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback.html: Added.
  • web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback.html: Added.
  • web-platform-tests/resource-timing/buffer-full-set-to-current-buffer-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-set-to-current-buffer.html: Added.
  • web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback.html: Added.
  • web-platform-tests/resource-timing/buffer-full-then-increased-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-then-increased.html: Added.
  • web-platform-tests/resource-timing/buffer-full-when-populate-entries-expected.txt: Added.
  • web-platform-tests/resource-timing/buffer-full-when-populate-entries.html: Added.
  • web-platform-tests/resource-timing/document-domain-no-impact-loader.sub-expected.txt: Added.
  • web-platform-tests/resource-timing/document-domain-no-impact-loader.sub.html: Added.
  • web-platform-tests/resource-timing/no-entries-for-cross-origin-css-fetched.sub-expected.txt: Added.
  • web-platform-tests/resource-timing/no-entries-for-cross-origin-css-fetched.sub.html: Added.
  • web-platform-tests/resource-timing/resource-timing-level1.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing.js.

(assertInvariants):
(window.onload):

  • web-platform-tests/resource-timing/resource-timing-level1.sub-expected.txt: Added.
  • web-platform-tests/resource-timing/resource-timing-level1.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing.html.
  • web-platform-tests/resource-timing/resource_connection_reuse.html:
  • web-platform-tests/resource-timing/resource_timing.worker.js:
  • web-platform-tests/resource-timing/resource_timing_buffer_full_when_populate_entries-expected.txt: Removed.
  • web-platform-tests/resource-timing/resource_timing_buffer_full_when_populate_entries.html: Removed.
  • web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback-expected.txt: Removed.
  • web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback.html: Removed.
  • web-platform-tests/resource-timing/resources/buffer-full-utilities.js: Added.

(let.appendScript):
(let.waitForNextTask):
(let.waitForEventToFire.return.new.Promise):
(let.waitForEventToFire):

  • web-platform-tests/resource-timing/resources/document-domain-no-impact.sub.html: Added.
  • web-platform-tests/resource-timing/resources/iframe-setdomain.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/iframe-setdomain.sub.html.
  • web-platform-tests/resource-timing/resources/w3c-import.log:
  • web-platform-tests/resource-timing/resources/webperftestharness.js:

(wp_test):
(test_namespace):

  • web-platform-tests/resource-timing/resources/webperftestharnessextension.js:

(test_resource_entries):
(performance_entrylist_checker): Deleted.

  • web-platform-tests/resource-timing/single-entry-per-resource.html:
  • web-platform-tests/resource-timing/supported_resource_type.any-expected.txt: Added.
  • web-platform-tests/resource-timing/supported_resource_type.any.html: Added.
  • web-platform-tests/resource-timing/supported_resource_type.any.js: Added.

(test):

  • web-platform-tests/resource-timing/supported_resource_type.any.worker-expected.txt: Added.
  • web-platform-tests/resource-timing/supported_resource_type.any.worker.html: Added.
  • web-platform-tests/resource-timing/test_resource_timing.https-expected.txt: Added.
  • web-platform-tests/resource-timing/test_resource_timing.https.html: Added.
  • web-platform-tests/resource-timing/test_resource_timing.js:

(resource_load):

  • web-platform-tests/resource-timing/w3c-import.log:

LayoutTests:

Location:
trunk/LayoutTests
Files:
35 added
4 deleted
19 edited
1 copied
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r239958 r239959  
     12019-01-14  Charles Vazac  <cvazac@akamai.com>
     2
     3        Import current Resource-Timing WPTs
     4        https://bugs.webkit.org/show_bug.cgi?id=193302
     5
     6        Reviewed by Youenn Fablet.
     7
     8        * TestExpectations:
     9        * tests-options.json:
     10
    1112019-01-14  Jiewen Tan  <jiewen_tan@apple.com>
    212
  • trunk/LayoutTests/TestExpectations

    r239864 r239959  
    379379webkit.org/b/189906 imported/w3c/web-platform-tests/resource-timing/resource_timing_buffer_full_eventually.html [ Skip ]
    380380webkit.org/b/189905 imported/w3c/web-platform-tests/resource-timing/resource_initiator_types.html [ Pass Failure ]
    381 webkit.org/b/189910 imported/w3c/web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback.html [ Pass Failure ]
    382381webkit.org/b/190523 imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html [ Pass Failure ]
    383382
     
    772771imported/w3c/web-platform-tests/fetch/api/response/response-error-from-stream.html [ DumpJSConsoleLogInStdErr ]
    773772
    774 webkit.org/b/161088 imported/w3c/web-platform-tests/resource-timing/resource-timing.html [ Pass Failure ]
    775773imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html [ Pass Failure ]
     774imported/w3c/web-platform-tests/resource-timing/test_resource_timing.https.html [ Pass Failure ]
     775imported/w3c/web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-that-drop.html [ Skip ]
     776imported/w3c/web-platform-tests/resource-timing/buffer-full-decrease-buffer-during-callback.html [ Skip ]
     777
     778imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse.html [ Failure ]
     779imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse.https.html [ Failure ]
     780imported/w3c/web-platform-tests/resource-timing/resource_reparenting.html [ Failure ]
    776781
    777782webkit.org/b/168357 http/wpt/resource-timing/rt-initiatorType-media.html [ Failure ]
     
    29072912webkit.org/b/187773 http/tests/webAPIStatistics [ Skip ]
    29082913
    2909 webkit.org/b/189997 imported/w3c/web-platform-tests/resource-timing/resource_timing.worker.html [ Failure ]
    2910 
    29112914# This is fallout from turning Web Animations on.
    29122915webkit.org/b/190032 animations/animation-playstate-paused-style-resolution.html [ Failure ]
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r239831 r239959  
     12019-01-14  Charles Vazac  <cvazac@akamai.com>
     2
     3        Import current Resource-Timing WPTs
     4        https://bugs.webkit.org/show_bug.cgi?id=193302
     5
     6        Reviewed by Youenn Fablet.
     7
     8        * web-platform-tests/resource-timing/SyntheticResponse.py:
     9        (main):
     10        * web-platform-tests/resource-timing/buffer-full-add-after-full-event-expected.txt: Added.
     11        * web-platform-tests/resource-timing/buffer-full-add-after-full-event.html: Added.
     12        * web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-expected.txt: Added.
     13        * web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-that-drop.html: Added.
     14        * web-platform-tests/resource-timing/buffer-full-add-entries-during-callback.html: Added.
     15        * web-platform-tests/resource-timing/buffer-full-add-then-clear-expected.txt: Added.
     16        * web-platform-tests/resource-timing/buffer-full-add-then-clear.html: Added.
     17        * web-platform-tests/resource-timing/buffer-full-decrease-buffer-during-callback.html: Added.
     18        * web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback-expected.txt: Added.
     19        * web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback.html: Added.
     20        * web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback-expected.txt: Added.
     21        * web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback.html: Added.
     22        * web-platform-tests/resource-timing/buffer-full-set-to-current-buffer-expected.txt: Added.
     23        * web-platform-tests/resource-timing/buffer-full-set-to-current-buffer.html: Added.
     24        * web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback-expected.txt: Added.
     25        * web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback.html: Added.
     26        * web-platform-tests/resource-timing/buffer-full-then-increased-expected.txt: Added.
     27        * web-platform-tests/resource-timing/buffer-full-then-increased.html: Added.
     28        * web-platform-tests/resource-timing/buffer-full-when-populate-entries-expected.txt: Added.
     29        * web-platform-tests/resource-timing/buffer-full-when-populate-entries.html: Added.
     30        * web-platform-tests/resource-timing/document-domain-no-impact-loader.sub-expected.txt: Added.
     31        * web-platform-tests/resource-timing/document-domain-no-impact-loader.sub.html: Added.
     32        * web-platform-tests/resource-timing/no-entries-for-cross-origin-css-fetched.sub-expected.txt: Added.
     33        * web-platform-tests/resource-timing/no-entries-for-cross-origin-css-fetched.sub.html: Added.
     34        * web-platform-tests/resource-timing/resource-timing-level1.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing.js.
     35        (assertInvariants):
     36        (window.onload):
     37        * web-platform-tests/resource-timing/resource-timing-level1.sub-expected.txt: Added.
     38        * web-platform-tests/resource-timing/resource-timing-level1.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing.html.
     39        * web-platform-tests/resource-timing/resource_connection_reuse.html:
     40        * web-platform-tests/resource-timing/resource_timing.worker.js:
     41        * web-platform-tests/resource-timing/resource_timing_buffer_full_when_populate_entries-expected.txt: Removed.
     42        * web-platform-tests/resource-timing/resource_timing_buffer_full_when_populate_entries.html: Removed.
     43        * web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback-expected.txt: Removed.
     44        * web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback.html: Removed.
     45        * web-platform-tests/resource-timing/resources/buffer-full-utilities.js: Added.
     46        (let.appendScript):
     47        (let.waitForNextTask):
     48        (let.waitForEventToFire.return.new.Promise):
     49        (let.waitForEventToFire):
     50        * web-platform-tests/resource-timing/resources/document-domain-no-impact.sub.html: Added.
     51        * web-platform-tests/resource-timing/resources/iframe-setdomain.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/resource-timing/iframe-setdomain.sub.html.
     52        * web-platform-tests/resource-timing/resources/w3c-import.log:
     53        * web-platform-tests/resource-timing/resources/webperftestharness.js:
     54        (wp_test):
     55        (test_namespace):
     56        * web-platform-tests/resource-timing/resources/webperftestharnessextension.js:
     57        (test_resource_entries):
     58        (performance_entrylist_checker): Deleted.
     59        * web-platform-tests/resource-timing/single-entry-per-resource.html:
     60        * web-platform-tests/resource-timing/supported_resource_type.any-expected.txt: Added.
     61        * web-platform-tests/resource-timing/supported_resource_type.any.html: Added.
     62        * web-platform-tests/resource-timing/supported_resource_type.any.js: Added.
     63        (test):
     64        * web-platform-tests/resource-timing/supported_resource_type.any.worker-expected.txt: Added.
     65        * web-platform-tests/resource-timing/supported_resource_type.any.worker.html: Added.
     66        * web-platform-tests/resource-timing/test_resource_timing.https-expected.txt: Added.
     67        * web-platform-tests/resource-timing/test_resource_timing.https.html: Added.
     68        * web-platform-tests/resource-timing/test_resource_timing.js:
     69        (resource_load):
     70        * web-platform-tests/resource-timing/w3c-import.log:
    1712019-01-10  Oriol Brufau  <obrufau@igalia.com>
    272
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/SyntheticResponse.py

    r215164 r239959  
    11import urllib
    2 import time
     2import sys, os
     3sys.path.append(os.path.join(os.path.dirname(__file__), "../common/"))
     4import sleep
    35
    46def main(request, response):
    57    index = request.request_path.index("?")
    68    args = request.request_path[index+1:].split("&")
    7     headersSent = 0
     9    headers = []
     10    statusSent = False
     11    headersSent = False
    812    for arg in args:
    913        if arg.startswith("ignored"):
    1014            continue
    1115        elif arg.endswith("ms"):
    12             time.sleep(float(arg[0:-2]) / 1E3);
     16            sleep.sleep_at_least(float(arg[0:-2]))
    1317        elif arg.startswith("redirect:"):
    1418            return (302, "WEBPERF MARKETING"), [("Location", urllib.unquote(arg[9:]))], "TEST"
    1519        elif arg.startswith("mime:"):
    16             response.headers.set("Content-Type", urllib.unquote(arg[5:]))
     20            headers.append(("Content-Type", urllib.unquote(arg[5:])))
    1721        elif arg.startswith("send:"):
    1822            text = urllib.unquote(arg[5:])
    19             if headersSent == 0:
    20                 response.write_status_headers()
    21                 headersSent = 1
     23
     24            if not statusSent:
     25                # Default to a 200 status code.
     26                response.writer.write_status(200)
     27                statusSent = True
     28            if not headersSent:
     29                for key, value in headers:
     30                    response.writer.write_header(key, value)
     31                response.writer.end_headers()
     32                headersSent = True
    2233
    2334            response.writer.write_content(text)
     35        elif arg.startswith("status:"):
     36            code = int(urllib.unquote(arg[7:]))
     37            response.writer.write_status(code)
     38            if code // 100 == 1:
     39                # Terminate informational 1XX responses with an empty line.
     40                response.writer.end_headers()
     41            else:
     42                statusSent = True
     43        elif arg == "flush":
     44            response.writer.flush()
     45
    2446#        else:
    2547#            error "  INVALID ARGUMENT %s" % arg
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.js

    r239958 r239959  
    5454                    }
    5555            },
    56             {
    57                 description: "Setting 'document.domain' does not effect same-origin checks",
    58                 test:
    59                     function (test) {
    60                         initiateFetch(
    61                             test,
    62                             "iframe",
    63                             canonicalize("iframe-setdomain.sub.html"),
    64                             function (initiator, entry) {
    65                                 // Ensure that the script inside the IFrame has successfully changed the IFrame's domain.
    66                                 assert_throws(
    67                                     null,
    68                                     function () {
    69                                         assert_not_equals(frame.contentWindow.document, null);
    70                                     },
    71                                     "Test Error: IFrame is not recognized as cross-domain.");
    72 
    73                                 // To verify that setting 'document.domain' did not change the results of the timing allow check,
    74                                 // verify that the following non-zero properties return their value.
    75                                 ["domainLookupStart", "domainLookupEnd", "connectStart", "connectEnd"]
    76                                     .forEach(function(property) {
    77                                         assert_greater_than(entry.connectEnd, 0,
    78                                             "Property should be non-zero because timing allow check ignores 'document.domain'.");
    79                                     });
    80                                 test.done();
    81                             });
    82                     }
    83             }
    8456        ];
    8557
     
    225197            });
    226198
     199        // Ensure that responseStart only measures the time up to the first few
     200        // bytes of the header response. This is tested by writing an HTTP 1.1
     201        // status line, followed by a flush, then a pause before the end of the
     202        // headers. The test makes sure that responseStart is not delayed by
     203        // this pause.
     204        [
     205            { initiator: "iframe",         response: "(done)",    mime: mimeHtml },
     206            { initiator: "xmlhttprequest", response: "(done)",    mime: mimeText },
     207            { initiator: "script",         response: '"";',       mime: mimeScript },
     208            { initiator: "link",           response: ".unused{}", mime: mimeCss },
     209        ]
     210        .forEach(function (template) {
     211            testCases.push({
     212                description: "'" + template.initiator + " " + serverStepDelay + "ms delay in headers does not affect responseStart'",
     213                test: function (test) {
     214                    initiateFetch(
     215                        test,
     216                        template.initiator,
     217                        getSyntheticUrl("status:200"
     218                                        + "&flush"
     219                                        + "&" + serverStepDelay + "ms"
     220                                        + "&mime:" + template.mime
     221                                        + "&send:" + encodeURIComponent(template.response)),
     222                        function (initiator, entry) {
     223                            // Test that the delay between 'responseStart' and
     224                            // 'responseEnd' includes the delay, which implies
     225                            // that 'responseStart' was measured at the time of
     226                            // status line receipt.
     227                            assert_greater_than_equal(
     228                                entry.responseEnd,
     229                                entry.responseStart + serverStepDelay,
     230                                "Delay after HTTP/1.1 status should not affect 'responseStart'.");
     231
     232                            test.done();
     233                        });
     234                    }
     235                });
     236            });
     237
     238        // Test that responseStart uses the timing of 1XX responses by
     239        // synthesizing a delay between a 100 and 200 status, and verifying that
     240        // this delay is included before responseEnd. If the delay is not
     241        // included, this implies that the 200 status line was (incorrectly) used
     242        // for responseStart timing, despite the 100 response arriving earlier.
     243        //
     244        // Source: "In the case where more than one response is available for a
     245        // request, due to an Informational 1xx response, the reported
     246        // responseStart value is that of the first response to the last
     247        // request."
     248        [
     249            { initiator: "iframe",         response: "(done)",    mime: mimeHtml },
     250            { initiator: "xmlhttprequest", response: "(done)",    mime: mimeText },
     251            { initiator: "script",         response: '"";',       mime: mimeScript },
     252            { initiator: "link",           response: ".unused{}", mime: mimeCss },
     253        ]
     254        .forEach(function (template) {
     255            testCases.push({
     256                description: "'" + template.initiator + " responseStart uses 1XX (first) response timings'",
     257                test: function (test) {
     258                    initiateFetch(
     259                        test,
     260                        template.initiator,
     261                        getSyntheticUrl("status:100"
     262                                        + "&flush"
     263                                        + "&" + serverStepDelay + "ms"
     264                                        + "&status:200"
     265                                        + "&mime:" + template.mime
     266                                        + "&send:" + encodeURIComponent(template.response)),
     267                        function (initiator, entry) {
     268                            assert_greater_than_equal(
     269                                entry.responseEnd,
     270                                entry.responseStart + serverStepDelay,
     271                                "HTTP/1.1 1XX (first) response should determine 'responseStart' timing.");
     272
     273                            test.done();
     274                        });
     275                    }
     276                });
     277            });
     278
    227279        // Function to run the next case in the queue.
    228280        var currentTestIndex = -1;
     
    245297            // Yield for 100ms to workaround a suspected race where window.onload fires before
    246298            //     script visible side-effects from the wininet/urlmon thread have finished.
    247             window.setTimeout(
     299            test.step_timeout(
    248300                test.step_func(
    249301                    function () {
     
    389441        function createOnloadCallbackFn(test, initiator, url, onloadCallback) {
    390442            // Remember the number of entries on the timeline prior to initiating the fetch:
    391             var beforeEntryCount = performance.getEntries().length;
     443            var beforeEntryCount = performance.getEntriesByType("resource").length;
    392444
    393445            return test.step_func(
     
    401453                    }
    402454
    403                     var entries = performance.getEntries();
     455                    var entries = performance.getEntriesByType("resource");
    404456                    var candidateEntry = entries[entries.length - 1];
    405457
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.sub.html

    r239958 r239959  
    33<head>
    44  <title>Resource-Timing Level 1</title>
     5  <meta name="timeout" content="long">
    56  <!-- To aid debugability, explicitly link the testharness's CSS to avoid demand
    67       loading it while the test executes. -->
     
    1415  <div id="log"></div>
    1516  <pre id="output"></pre>
    16   <script src="resource-timing.js"></script>
     17  <script src="resource-timing-level1.js"></script>
    1718</body>
    1819</html>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse.html

    r230445 r239959  
    2222    iframe = document.getElementById('frameContext');
    2323    d = iframe.contentWindow.document;
    24     iframeBody = d.body;
    2524    iframe.addEventListener('load', onload_test, false);
    2625}
     
    4241        test_equals(entry.fetchStart, entry.connectStart, 'connectStart and fetchStart should be the same');
    4342        test_equals(entry.fetchStart, entry.connectEnd, 'connectEnd and fetchStart should be the same');
     43        if(!window.isSecureConnection) {
     44            test_equals(entry.secureConnectionStart, 0, 'secureConnectStart should be zero');
     45        }
     46        test_equals(entry.fetchStart, entry.domainLookupStart, 'domainLookupStart and fetchStart should be the same')
     47        test_equals(entry.fetchStart, entry.domainLookupEnd, 'domainLookupEnd and fetchStart should be the same')
    4448    }
    4549
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse.https.html

    r239958 r239959  
    2222    iframe = document.getElementById('frameContext');
    2323    d = iframe.contentWindow.document;
    24     iframeBody = d.body;
    2524    iframe.addEventListener('load', onload_test, false);
    2625}
     
    4241        test_equals(entry.fetchStart, entry.connectStart, 'connectStart and fetchStart should be the same');
    4342        test_equals(entry.fetchStart, entry.connectEnd, 'connectEnd and fetchStart should be the same');
     43        test_equals(entry.fetchStart, entry.secureConnectionStart, 'secureConnectStart and fetchStart should be the same');
     44        test_equals(entry.fetchStart, entry.domainLookupStart, 'domainLookupStart and fetchStart should be the same')
     45        test_equals(entry.fetchStart, entry.domainLookupEnd, 'domainLookupEnd and fetchStart should be the same')
    4446    }
    4547
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_dynamic_insertion-expected.txt

    r211006 r239959  
    66PASS window.performance is defined
    77PASS window.performance.getEntriesByType is defined
    8 PASS http://localhost:8800/resource-timing/resources/inject_resource_test.html is expected to have initiatorType iframe
    9 PASS http://localhost:8800/resource-timing/resources/resource_timing_test0.css is expected to have initiatorType link
    10 PASS http://localhost:8800/resource-timing/resources/resource_timing_test0.png is expected to have initiatorType img
     8PASS Testing resource entries
    119
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_memory_cached.sub-expected.txt

    r236402 r239959  
    1 Blocked access to external URL http://www1.localhost:8801/resource-timing/resources/blue.png?id=cached
    2 Blocked access to external URL http://www1.localhost:8801/resource-timing/resources/blue.png?id=cached
    3 Blocked access to external URL http://www1.localhost:8801/resource-timing/resources/blue.png?id=cached
    41Description
    52
     
    74
    85
    9 Harness Error (TIMEOUT), message = null
    10 
    116PASS There should be only one entry
    12 PASS http://localhost:8800/resource-timing/resources/blue.png?id=cached is expected to have initiatorType img
     7PASS Testing resource entries
    138PASS requestStart should be non-zero on the same-origin request
    149PASS responseEnd should not be before startTime
    1510PASS duration should not be negative
     11PASS There should be one entry in second test
     12PASS Entry name should start with cross-origin domain
     13PASS Entry name should end with file name
     14PASS requestStart should be 0 on the cross-origin request
    1615 
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_memory_cached.sub.html

    r236402 r239959  
    1010<script src="resources/webperftestharness.js"></script>
    1111<script src="resources/webperftestharnessextension.js"></script>
     12<script src="/common/get-host-info.sub.js"></script>
    1213<script>
    1314setup({explicit_done: true});
     
    1617let iframeBody;
    1718let count = 0;
     19const host = get_host_info();
    1820function onload_prep() {
    1921    iframe = document.getElementById('frameContext');
     
    2123    iframeBody = d.body;
    2224
    23     const image = d.createElement('img');
     25    const image = d.createElement('IMG');
    2426    image.addEventListener('load', function() {
    2527        step_timeout(onload_test, 0); });
     
    2729    iframeBody.appendChild(image);
    2830
    29     const image2 = d.createElement('img');
     31    const image2 = d.createElement('IMG');
    3032    image2.addEventListener('load', function() {
    3133        step_timeout(onload_test, 0); });
     
    5658}
    5759function start_crossorigin_test() {
    58     const image3 = d.createElement('img');
     60    const image3 = d.createElement('IMG');
    5961    image3.addEventListener("load", function() { step_timeout(finish_crossorigin_test, 0); });
    60     image3.src = 'http://{{domains[www1]}}:{{ports[http][1]}}{{location[path]}}/../resources/blue.png?id=cached';
     62    image3.src = 'http://' + host.REMOTE_HOST + ':{{ports[http][1]}}{{location[path]}}/../resources/blue.png?id=cached';
    6163    iframeBody.appendChild(image3);
    6264}
     
    6567    const entries = context.getEntriesByType('resource');
    6668    test_equals(entries.length, 1, 'There should be one entry in second test');
    67     test_true(entries[0].name.startsWith('http://{{domains[www1]}}:{{ports[http][1]}}'), 'Entry name should start with cross-origin domain');
     69    test_true(entries[0].name.startsWith('http://' + host.REMOTE_HOST + ':{{ports[http][1]}}'), 'Entry name should start with cross-origin domain');
    6870    test_true(entries[0].name.endsWith('/resources/blue.png?id=cached'), 'Entry name should end with file name');
    6971    test_equals(entries[0].requestStart, 0, 'requestStart should be 0 on the cross-origin request');
     
    8082<iframe id="frameContext" src="resources/inject_resource_test.html"></iframe>
    8183<img src="resources/blue.png?id=cached"></img>
    82 <img src="http://{{domains[www1]}}:{{ports[http][1]}}{{location[path]}}/../resources/blue.png?id=cached"></img>
     84<script>
     85    const img = document.createElement('IMG');
     86    img.src = "http://" + host.REMOTE_HOST + ":{{ports[http][1]}}{{location[path]}}/../resources/blue.png?id=cached";
     87    document.currentScript.parentNode.insertBefore(img, document.currentScript);
     88</script>
    8389</body>
    8490</html>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_redirects-expected.txt

    r236402 r239959  
    44
    55
    6 PASS http://localhost:8800/common/redirect.py?location=/resource-timing/resources/blank_page_green.htm is expected to have initiatorType iframe
    7 PASS http://localhost:8800/common/redirect.py?location=/resource-timing/resources/blank_page_green.htm?id=xhr is expected to have initiatorType xmlhttprequest
    8 PASS http://localhost:8800/common/redirect.py?location=/resource-timing/resources/blue.png is expected to have initiatorType img
    9 PASS http://localhost:8800/common/redirect.py?location=/resource-timing/resources/empty_script.js is expected to have initiatorType script
    10 PASS http://localhost:8800/common/redirect.py?location=/resource-timing/resources/resource_timing_test0.css is expected to have initiatorType link
     6PASS Testing resource entries
    117
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_script_types-expected.txt

    r236402 r239959  
    44
    55
    6 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=1 is expected to have initiatorType script
    7 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=2 is expected to have initiatorType script
    8 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=3 is expected to have initiatorType script
    9 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=4 is expected to have initiatorType script
    10 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=5 is expected to have initiatorType script
    11 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=6 is expected to have initiatorType script
    12 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=7 is expected to have initiatorType script
    13 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=8 is expected to have initiatorType script
    14 PASS http://localhost:8800/resource-timing/resources/empty_script.js?id=9 is expected to have initiatorType script
     6PASS Testing resource entries
    157
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing.worker-expected.txt

    r236402 r239959  
    11
    2 PASS Performance Resouce Entries in workers
     2PASS Performance Resource Entries in workers
    33
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing.worker.js

    r236402 r239959  
    6060    t.done();
    6161  });
    62 }, "Performance Resouce Entries in workers");
     62}, "Performance Resource Entries in workers");
    6363
    6464done();
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/iframe-setdomain.sub.html

    r239958 r239959  
    22<html>
    33<head>
    4   <title>domain: {{domains[www]}}</title>
     4  <title>domain: {{domains[]}}</title>
    55</head>
    66<body>
    77  <script>
    88    // The purpose of this IFrame is to change the 'document.domain'
    9     document.domain = "{{domains[www]}}";
     9    document.domain = "{{domains[]}}";
    1010  </script>
    11   The resource-timings.html test loads this document into an IFrame to vet that setting
     11  The resource-timings-level1.sub.html test loads this document into an IFrame to vet that setting
    1212  'document.domain' does not effect the timing allowed.
    1313</body>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/w3c-import.log

    r236402 r239959  
    1919/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/blank_page_green.htm
    2020/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/blue.png
     21/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/buffer-full-utilities.js
     22/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/document-domain-no-impact.sub.html
    2123/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/empty.js
    2224/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/empty.py
     
    2729/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/green_frame.htm
    2830/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/gzip_xml.py
     31/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/iframe-setdomain.sub.html
    2932/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/iframe_TAO_match_origin.html
    3033/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/iframe_TAO_match_wildcard.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/webperftestharness.js

    r204976 r239959  
    1 //
     1/*
     2author: W3C http://www.w3.org/
     3help: http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute
     4*/
     5//
    26// Helper Functions for NavigationTiming W3C tests
    37//
     
    4650        {
    4751            // show a single error that window.performance is undefined
    48             test(function() { assert_true(performanceNamespace !== undefined && performanceNamespace != null, "window.performance is defined and not null"); }, "window.performance is defined and not null.", {author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "});
     52            // The window.performance attribute provides a hosting area for performance related attributes.
     53            test(function() { assert_true(performanceNamespace !== undefined && performanceNamespace != null, "window.performance is defined and not null"); }, "window.performance is defined and not null.");
    4954        }
    5055    }
     
    5762    if (skip_root === undefined) {
    5863        var msg = 'window.performance is defined';
    59         wp_test(function () { assert_true(performanceNamespace !== undefined, msg); }, msg,{author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "});
     64        // The window.performance attribute provides a hosting area for performance related attributes.
     65        wp_test(function () { assert_true(performanceNamespace !== undefined, msg); }, msg);
    6066    }
    6167
    6268    if (child_name !== undefined) {
    6369        var msg2 = 'window.performance.' + child_name + ' is defined';
    64         wp_test(function() { assert_true(performanceNamespace[child_name] !== undefined, msg2); }, msg2,{author:"W3C http://www.w3.org/",help:"http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert:"The window.performance attribute provides a hosting area for performance related attributes. "});
     70        // The window.performance attribute provides a hosting area for performance related attributes.
     71        wp_test(function() { assert_true(performanceNamespace[child_name] !== undefined, msg2); }, msg2);
    6572    }
    6673}
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resources/webperftestharnessextension.js

    r210823 r239959  
    5050function test_resource_entries(entries, expected_entries)
    5151{
    52     // This is slightly convoluted so that we can sort the output.
    53     var actual_entries = {};
    54     var origin = window.location.protocol + "//" + window.location.host;
    55 
    56     for (var i = 0; i < entries.length; ++i) {
    57         var entry = entries[i];
    58         var found = false;
    59         for (var expected_entry in expected_entries) {
    60             if (entry.name == origin + expected_entry) {
    61                 found = true;
    62                 if (expected_entry in actual_entries) {
    63                     test_fail(expected_entry + ' is not expected to have duplicate entries');
     52    test(function() {
     53        // This is slightly convoluted so that we can sort the output.
     54        var actual_entries = {};
     55        var origin = window.location.protocol + "//" + window.location.host;
     56
     57        for (var i = 0; i < entries.length; ++i) {
     58            var entry = entries[i];
     59            var found = false;
     60            for (var expected_entry in expected_entries) {
     61                if (entry.name == origin + expected_entry) {
     62                    found = true;
     63                    if (expected_entry in actual_entries) {
     64                        assert_unreached(expected_entry + ' is not expected to have duplicate entries');
     65                    }
     66                    actual_entries[expected_entry] = entry;
     67                    break;
    6468                }
    65                 actual_entries[expected_entry] = entry;
    66                 break;
    67             }
    68         }
    69         if (!found) {
    70             test_fail(entries[i].name + ' is not expected to be in the Resource Timing buffer');
    71         }
    72     }
    73 
    74     sorted_urls = [];
    75     for (var i in actual_entries) {
    76         sorted_urls.push(i);
    77     }
    78     sorted_urls.sort();
    79     for (var i in sorted_urls) {
    80         var url = sorted_urls[i];
    81         test_equals(actual_entries[url].initiatorType,
    82                     expected_entries[url],
    83                     origin + url + ' is expected to have initiatorType ' + expected_entries[url]);
    84     }
    85     for (var j in expected_entries) {
    86         if (!(j in actual_entries)) {
    87             test_fail(origin + j + ' is expected to be in the Resource Timing buffer');
    88         }
    89     }
    90 }
     69            }
     70            if (!found) {
     71                assert_unreached(entries[i].name + ' is not expected to be in the Resource Timing buffer');
     72            }
     73        }
     74
     75        sorted_urls = [];
     76        for (var i in actual_entries) {
     77            sorted_urls.push(i);
     78        }
     79        sorted_urls.sort();
     80        for (var i in sorted_urls) {
     81            var url = sorted_urls[i];
     82            assert_equals(actual_entries[url].initiatorType,
     83                        expected_entries[url],
     84                        origin + url + ' is expected to have initiatorType ' + expected_entries[url]);
     85        }
     86        for (var j in expected_entries) {
     87            if (!(j in actual_entries)) {
     88                assert_unreached(origin + j + ' is expected to be in the Resource Timing buffer');
     89            }
     90        }
     91    }, "Testing resource entries");
     92}
     93
    9194function performance_entrylist_checker(type)
    9295{
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/single-entry-per-resource.html

    r222307 r239959  
    1414      var entries = entryList.getEntriesByType("resource");
    1515      for (var i = 0; i < entries.length; ++i) {
     16        // Ignore any entries for the test harness files if present.
     17        if (/testharness(report)?\.js/.test(entries[i].name)) {
     18          continue;
     19        }
     20
    1621        ++observed;
    1722        if (entries[i].name.indexOf(img_url) != -1)
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/test_resource_timing.js

    r230445 r239959  
    187187        assert_equals(entries.length, 1, 'There should be a single matching entry');
    188188        const actual = entries[0];
    189 
    190         // Debugging bug 1263428
    191         // Feel free to remove/overwrite this piece of code
    192         if (actual.connectStart < actual.domainLookupEnd) {
    193             assert_true(false, "actual: "+JSON.stringify(actual));
     189        if (window.location.protocol == "http:") {
     190            assert_equals(actual.secureConnectionStart, 0, 'secureConnectionStart should be 0 in http');
     191        } else {
     192            assert_greater_than(actual.secureConnectionStart, 0, 'secureConnectionStart should not be 0 in https');
    194193        }
    195194
    196195        assert_equals(actual.redirectStart, 0, 'redirectStart should be 0');
    197196        assert_equals(actual.redirectEnd, 0, 'redirectEnd should be 0');
    198         assert_true(actual.secureConnectionStart == undefined ||
    199                     actual.secureConnectionStart == 0, 'secureConnectionStart should be 0 or undefined');
    200197        assert_equals(actual.fetchStart, actual.startTime, 'fetchStart is equal to startTime');
    201198        assert_greater_than_equal(actual.domainLookupStart, actual.fetchStart, 'domainLookupStart after fetchStart');
     
    203200        assert_greater_than_equal(actual.connectStart, actual.domainLookupEnd, 'connectStart after domainLookupEnd');
    204201        assert_greater_than_equal(actual.connectEnd, actual.connectStart, 'connectEnd after connectStart');
     202        assert_true(actual.secureConnectionStart == 0 || actual.secureConnectionStart <= actual.requestStart,
     203            "secureConnectionStart should be either 0 or smaller than/equals to requestStart")
    205204        assert_greater_than_equal(actual.requestStart, actual.connectEnd, 'requestStart after connectEnd');
    206205        assert_greater_than_equal(actual.responseStart, actual.requestStart, 'responseStart after requestStart');
  • trunk/LayoutTests/imported/w3c/web-platform-tests/resource-timing/w3c-import.log

    r236402 r239959  
    1717/LayoutTests/imported/w3c/web-platform-tests/resource-timing/META.yml
    1818/LayoutTests/imported/w3c/web-platform-tests/resource-timing/SyntheticResponse.py
     19/LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-add-after-full-event.html
     20/LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-that-drop.html
     21/LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-add-entries-during-callback.html
     22/LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-add-then-clear.html
     23/LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-decrease-buffer-during-callback.html
     24/LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback.html
     25/LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback.html
     26/LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-set-to-current-buffer.html
     27/LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback.html
     28/LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-then-increased.html
     29/LayoutTests/imported/w3c/web-platform-tests/resource-timing/buffer-full-when-populate-entries.html
    1930/LayoutTests/imported/w3c/web-platform-tests/resource-timing/clear_resource_timing_functionality.html
     31/LayoutTests/imported/w3c/web-platform-tests/resource-timing/document-domain-no-impact-loader.sub.html
    2032/LayoutTests/imported/w3c/web-platform-tests/resource-timing/idlharness.any.js
    21 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/iframe-setdomain.sub.html
     33/LayoutTests/imported/w3c/web-platform-tests/resource-timing/no-entries-for-cross-origin-css-fetched.sub.html
     34/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.js
     35/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.sub.html
    2236/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing-tojson.html
    23 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing.html
    24 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource-timing.js
    2537/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain.html
    2638/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_TAO_match_origin.htm
     
    3648/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_cached.htm
    3749/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse.html
     50/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse.https.html
    3851/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_dedicated_worker.html
    3952/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_dynamic_insertion.html
     
    4962/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_TAO_cross_origin_redirect.html
    5063/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_buffer_full_eventually.html
    51 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_buffer_full_when_populate_entries.html
    5264/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_buffer_full_when_shrink_buffer_size.html
    5365/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect.html
    5466/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_cross_origin_redirect_chain.html
    5567/LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_same_origin_redirect.html
    56 /LayoutTests/imported/w3c/web-platform-tests/resource-timing/resource_timing_store_and_clear_during_callback.html
    5768/LayoutTests/imported/w3c/web-platform-tests/resource-timing/single-entry-per-resource.html
     69/LayoutTests/imported/w3c/web-platform-tests/resource-timing/supported_resource_type.any.js
    5870/LayoutTests/imported/w3c/web-platform-tests/resource-timing/test_resource_timing.html
     71/LayoutTests/imported/w3c/web-platform-tests/resource-timing/test_resource_timing.https.html
    5972/LayoutTests/imported/w3c/web-platform-tests/resource-timing/test_resource_timing.js
  • trunk/LayoutTests/tests-options.json

    r239693 r239959  
    15331533        "slow"
    15341534    ],
     1535    "imported/w3c/web-platform-tests/resource-timing/resource-timing-level1.sub.html": [
     1536        "slow"
     1537    ],
    15351538    "imported/w3c/web-platform-tests/resource-timing/single-entry-per-resource.html": [
    15361539        "slow"
Note: See TracChangeset for help on using the changeset viewer.