Changeset 256104 in webkit


Ignore:
Timestamp:
Feb 9, 2020 1:36:53 PM (4 years ago)
Author:
Kate Cheney
Message:

[ Mac wk2 ] http/tests/resourceLoadStatistics/log-cross-site-load-with-link-decoration.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=207271
<rdar://problem/59190346>

Reviewed by Maciej Stachowiak.

Source/WebKit:

This patch adds a check to make sure a test is expecting a statistics
processing call before proceeding. Otherwise, this can cause
flakiness in ITP tests if data is removed/changed during the test.

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:

(WebKit::ResourceLoadStatisticsStore::processStatisticsAndDataRecords):

LayoutTests:

This patch updates all ITP tests to follow the pattern
setEnableFeature(true) at test setup and setEnableFeature(false) when
finished. This enables/disables both ITP and the isRunningTest
parameter so tests don't have to make two calls. It also ensures that
each test which relies on statistics processing notifies the testRunner
so it knows to wait for a callback, and deletes unecessary calls
to setStatisticsNotifyPagesWhenDataRecordsWereScanned which is called
in installStatisticsDidScanDataRecordsCallback.

This will help limit flakiness by processing statistics only for ITP
tests which require it for their purpose.

  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-database.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-database.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-database.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-database.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-database.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-database.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-database.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-database.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-database.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to-database.html:
  • http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to.html:
  • http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-database.html:
  • http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics.html:
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-database.html:
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-database.html:
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html:
  • http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-database.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-database.html:
  • http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database.html:
  • http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction.html:
  • http/tests/resourceLoadStatistics/prune-statistics-database.html:
  • http/tests/resourceLoadStatistics/prune-statistics.html:
  • http/tests/resourceLoadStatistics/resources/util.js:

(setEnableFeature):

  • http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html:
  • http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html:
  • http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/telemetry-generation-advanced-functionality-database.html:
  • http/tests/resourceLoadStatistics/telemetry-generation-basic-functionality-database.html:
  • http/tests/resourceLoadStatistics/telemetry-generation.html:
  • http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database.html:
  • http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame.html:
Location:
trunk
Files:
73 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r256095 r256104  
     12020-02-09  Kate Cheney  <katherine_cheney@apple.com>
     2
     3        [ Mac wk2 ] http/tests/resourceLoadStatistics/log-cross-site-load-with-link-decoration.html is a flaky failure
     4        https://bugs.webkit.org/show_bug.cgi?id=207271
     5        <rdar://problem/59190346>
     6
     7        Reviewed by Maciej Stachowiak.
     8
     9        This patch updates all ITP tests to follow the pattern
     10        setEnableFeature(true) at test setup and setEnableFeature(false) when
     11        finished. This enables/disables both ITP and the isRunningTest
     12        parameter so tests don't have to make two calls. It also ensures that
     13        each test which relies on statistics processing notifies the testRunner
     14        so it knows to wait for a callback, and deletes unecessary calls
     15        to setStatisticsNotifyPagesWhenDataRecordsWereScanned which is called
     16        in installStatisticsDidScanDataRecordsCallback.
     17
     18        This will help limit flakiness by processing statistics only for ITP
     19        tests which require it for their purpose.
     20
     21        * http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-database.html:
     22        * http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics.html:
     23        * http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-database.html:
     24        * http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins.html:
     25        * http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-database.html:
     26        * http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to.html:
     27        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-database.html:
     28        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics.html:
     29        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-database.html:
     30        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins.html:
     31        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-database.html:
     32        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent.html:
     33        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-database.html:
     34        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins.html:
     35        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-database.html:
     36        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to.html:
     37        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-database.html:
     38        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent.html:
     39        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to-database.html:
     40        * http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to.html:
     41        * http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-database.html:
     42        * http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics.html:
     43        * http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-database.html:
     44        * http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-database.html:
     45        * http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html:
     46        * http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store.html:
     47        * http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-database.html:
     48        * http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction.html:
     49        * http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-database.html:
     50        * http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction.html:
     51        * http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html:
     52        * http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
     53        * http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html:
     54        * http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
     55        * http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html:
     56        * http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
     57        * http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html:
     58        * http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
     59        * http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html:
     60        * http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
     61        * http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database.html:
     62        * http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html:
     63        * http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database.html:
     64        * http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown.html:
     65        * http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database.html:
     66        * http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database.html:
     67        * http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout.html:
     68        * http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction.html:
     69        * http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database.html:
     70        * http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction.html:
     71        * http/tests/resourceLoadStatistics/prune-statistics-database.html:
     72        * http/tests/resourceLoadStatistics/prune-statistics.html:
     73        * http/tests/resourceLoadStatistics/resources/util.js:
     74        (setEnableFeature):
     75        * http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html:
     76        * http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
     77        * http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html:
     78        * http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
     79        * http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html:
     80        * http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
     81        * http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html:
     82        * http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
     83        * http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html:
     84        * http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
     85        * http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html:
     86        * http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
     87        * http/tests/resourceLoadStatistics/telemetry-generation-advanced-functionality-database.html:
     88        * http/tests/resourceLoadStatistics/telemetry-generation-basic-functionality-database.html:
     89        * http/tests/resourceLoadStatistics/telemetry-generation.html:
     90        * http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database.html:
     91        * http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame.html:
     92
    1932020-02-08  Simon Fraser  <simon.fraser@apple.com>
    294
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-database.html

    r250393 r256104  
    55    <title>Tests for Classification Based on Mixed Statistics</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    2021            testPassed("Host did not get classified as prevalent resource.");
    2122
    22         testRunner.statisticsResetToConsistentState(function() {
     23        setEnableFeature(false, function() {
    2324            testRunner.notifyDone();
    2425        });
     
    2627
    2728    function runTestRunnerTest() {
    28         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    29 
    3029        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3130            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    4544        testRunner.setUseITPDatabase(true);
    4645        testRunner.waitUntilDone();
    47         internals.setResourceLoadStatisticsEnabled(true);
    48         runTestRunnerTest();
     46        setEnableFeature(true, runTestRunnerTest);
    4947    }
    5048</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics.html

    r233888 r256104  
    55    <title>Tests for Classification Based on Mixed Statistics</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    2021            testPassed("Host did not get classified as prevalent resource.");
    2122
    22         testRunner.statisticsResetToConsistentState(function() {
     23        setEnableFeature(false, function() {
    2324            testRunner.notifyDone();
    2425        });
     
    2627
    2728    function runTestRunnerTest() {
    28         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    29 
    3029        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3130            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    4443    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    4544        testRunner.waitUntilDone();
    46         internals.setResourceLoadStatisticsEnabled(true);
    47         runTestRunnerTest();
     45        setEnableFeature(true, runTestRunnerTest);
    4846    }
    4947</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-database.html

    r250393 r256104  
    55    <title>Tests for Classification Based on Subresource Under Top Frame Origins</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    1920            testPassed("Host did not get classified as prevalent resource.");
    2021
    21         testRunner.statisticsResetToConsistentState(function() {
     22        setEnableFeature(false, function() {
    2223            testRunner.notifyDone();
    2324        });
    2425    }
    2526
    26     function runTestRunnerTest() {
    27         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    28  
     27    function runTestRunnerTest() {
    2928        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3029            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    4342        testRunner.setUseITPDatabase(true);
    4443        testRunner.waitUntilDone();
    45         internals.setResourceLoadStatisticsEnabled(true);
    46         runTestRunnerTest();
     44        setEnableFeature(true, runTestRunnerTest);
    4745    }
    4846</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins.html

    r233888 r256104  
    55    <title>Tests for Classification Based on Subresource Under Top Frame Origins</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    1920            testPassed("Host did not get classified as prevalent resource.");
    2021
    21         testRunner.statisticsResetToConsistentState(function() {
     22        setEnableFeature(false, function() {
    2223            testRunner.notifyDone();
    2324        });
     
    2526
    2627    function runTestRunnerTest() {
    27         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    28  
    2928        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3029            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    4241    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    4342        testRunner.waitUntilDone();
    44         internals.setResourceLoadStatisticsEnabled(true);
    45         runTestRunnerTest();
     43        setEnableFeature(true, runTestRunnerTest);
    4644    }
    4745</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-database.html

    r250393 r256104  
    55    <title>Tests for Classification Based on Subresource Unique Redirects To</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    1920            testPassed("Host did not get classified as prevalent resource.");
    2021
    21         internals.setResourceLoadStatisticsEnabled(false);
    22         testRunner.statisticsResetToConsistentState(function() {
     22        setEnableFeature(false, function() {
    2323            testRunner.notifyDone();
    2424        });
     
    2626
    2727    function runTestRunnerTest() {
    28         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    29  
    3028        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3129            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    4442        testRunner.setUseITPDatabase(true);
    4543        testRunner.waitUntilDone();
    46         internals.setResourceLoadStatisticsEnabled(true);
    47         runTestRunnerTest();
    48         testRunner.setUseITPDatabase(false);
     44        setEnableFeature(true, runTestRunnerTest);
    4945    }
    5046</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to.html

    r233888 r256104  
    55    <title>Tests for Classification Based on Subresource Unique Redirects To</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    1920            testPassed("Host did not get classified as prevalent resource.");
    2021
    21         internals.setResourceLoadStatisticsEnabled(false);
    22         testRunner.statisticsResetToConsistentState(function() {
     22        setEnableFeature(false, function() {
    2323            testRunner.notifyDone();
    2424        });
    2525    }
    2626
    27     function runTestRunnerTest() {
    28         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    29  
     27    function runTestRunnerTest() {
    3028        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3129            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    4341    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    4442        testRunner.waitUntilDone();
    45         internals.setResourceLoadStatisticsEnabled(true);
    46         runTestRunnerTest();
     43        setEnableFeature(true, runTestRunnerTest);
    4744    }
    4845</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-database.html

    r250393 r256104  
    55    <title>Tests for Classification Based on Mixed Statistics</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    2324            testPassed("Host classified as prevalent resource.");
    2425
    25         internals.setResourceLoadStatisticsEnabled(false);
    26         testRunner.statisticsResetToConsistentState(function() {
     26        setEnableFeature(false, function() {
    2727            testRunner.notifyDone();
    2828        });
    2929    }
    3030
    31     function runTestRunnerTest() {
    32         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    33  
     31    function runTestRunnerTest() {
    3432        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3533            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    5553        testRunner.setUseITPDatabase(true);
    5654        testRunner.waitUntilDone();
    57         internals.setResourceLoadStatisticsEnabled(true);
    58         runTestRunnerTest();
     55        setEnableFeature(true, runTestRunnerTest);
    5956    }
    6057</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics.html

    r233888 r256104  
    55    <title>Tests for Classification Based on Mixed Statistics</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    2324            testPassed("Host classified as prevalent resource.");
    2425
    25         internals.setResourceLoadStatisticsEnabled(false);
    26         testRunner.statisticsResetToConsistentState(function() {
     26        setEnableFeature(false, function() {
    2727            testRunner.notifyDone();
    2828        });
    2929    }
    3030
    31     function runTestRunnerTest() {
    32         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    33  
     31    function runTestRunnerTest() {
    3432        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3533            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    5452    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    5553        testRunner.waitUntilDone();
    56         internals.setResourceLoadStatisticsEnabled(true);
    57         runTestRunnerTest();
     54        setEnableFeature(true, runTestRunnerTest);
    5855    }
    5956</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-database.html

    r250393 r256104  
    55    <title>Tests for Classification Based on Sub Frame Under Top Frame Origins</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    2324            testPassed("Host classified as prevalent resource.");
    2425
    25         internals.setResourceLoadStatisticsEnabled(false);
    26         testRunner.statisticsResetToConsistentState(function() {
     26        setEnableFeature(false, function() {
    2727            testRunner.notifyDone();
    2828        });
     
    3030
    3131    function runTestRunnerTest() {
    32         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    33 
    3432        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3533            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    5048        testRunner.setUseITPDatabase(true);
    5149        testRunner.waitUntilDone();
    52         internals.setResourceLoadStatisticsEnabled(true);
    53         runTestRunnerTest();
     50        setEnableFeature(true, runTestRunnerTest);
    5451    }
    5552</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins.html

    r233888 r256104  
    55    <title>Tests for Classification Based on Sub Frame Under Top Frame Origins</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    2324            testPassed("Host classified as prevalent resource.");
    2425
    25         internals.setResourceLoadStatisticsEnabled(false);
    26         testRunner.statisticsResetToConsistentState(function() {
     26        setEnableFeature(false, function() {
    2727            testRunner.notifyDone();
    2828        });
     
    3030
    3131    function runTestRunnerTest() {
    32         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    33 
    3432        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3533            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    4947    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    5048        testRunner.waitUntilDone();
    51         internals.setResourceLoadStatisticsEnabled(true);
    52         runTestRunnerTest();
     49        setEnableFeature(true, runTestRunnerTest);
    5350    }
    5451</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-database.html

    r250393 r256104  
    3838        testRunner.setUseITPDatabase(true);
    3939        setEnableFeature(true, function() {
    40             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    41 
    4240            testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    4341                if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent.html

    r234440 r256104  
    3737    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    3838        setEnableFeature(true, function() {
    39             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    40 
    4139            testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    4240                if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-database.html

    r250393 r256104  
    55    <title>Tests for Classification Based on Subresource Under Top Frame Origins</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    2324            testPassed("Host classified as prevalent resource.");
    2425
    25         internals.setResourceLoadStatisticsEnabled(false);
    26         testRunner.statisticsResetToConsistentState(function() {
     26        setEnableFeature(false, function() {
    2727            testRunner.notifyDone();
    2828        });
    2929    }
    3030
    31     function runTestRunnerTest() {
    32         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    33  
     31    function runTestRunnerTest() {
    3432        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3533            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    5048        testRunner.setUseITPDatabase(true);
    5149        testRunner.waitUntilDone();
    52         internals.setResourceLoadStatisticsEnabled(true);
    53         runTestRunnerTest();
     50        setEnableFeature(true, runTestRunnerTest);
    5451    }
    5552</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins.html

    r233888 r256104  
    55    <title>Tests for Classification Based on Subresource Under Top Frame Origins</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    2324            testPassed("Host classified as prevalent resource.");
    2425
    25         internals.setResourceLoadStatisticsEnabled(false);
    26         testRunner.statisticsResetToConsistentState(function() {
     26        setEnableFeature(false, function() {
    2727            testRunner.notifyDone();
    2828        });
    2929    }
    3030
    31     function runTestRunnerTest() {
    32         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    33  
     31    function runTestRunnerTest() {
    3432        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3533            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    4947    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    5048        testRunner.waitUntilDone();
    51         internals.setResourceLoadStatisticsEnabled(true);
    52         runTestRunnerTest();
     49        setEnableFeature(true, runTestRunnerTest);
    5350    }
    5451</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-database.html

    r250393 r256104  
    55    <title>Tests for Classification Based on Subresource Unique Redirects To</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    2324            testPassed("Host classified as prevalent resource.");
    2425
    25         internals.setResourceLoadStatisticsEnabled(false);
    26         testRunner.statisticsResetToConsistentState(function() {
     26        setEnableFeature(false, function() {
    2727            testRunner.notifyDone();
    2828        });
    2929    }
    3030
    31     function runTestRunnerTest() {
    32         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    33  
     31    function runTestRunnerTest() {
    3432        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3533            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    5048        testRunner.setUseITPDatabase(true);
    5149        testRunner.waitUntilDone();
    52         internals.setResourceLoadStatisticsEnabled(true);
    53         runTestRunnerTest();
     50        setEnableFeature(true, runTestRunnerTest);
    5451    }
    5552</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to.html

    r233888 r256104  
    55    <title>Tests for Classification Based on Subresource Unique Redirects To</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    2324            testPassed("Host classified as prevalent resource.");
    2425
    25         internals.setResourceLoadStatisticsEnabled(false);
    26         testRunner.statisticsResetToConsistentState(function() {
     26        setEnableFeature(false, function() {
    2727            testRunner.notifyDone();
    2828        });
    2929    }
    3030
    31     function runTestRunnerTest() {
    32         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    33  
     31    function runTestRunnerTest() {
    3432        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3533            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
     
    4947    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    5048        testRunner.waitUntilDone();
    51         internals.setResourceLoadStatisticsEnabled(true);
    52         runTestRunnerTest();
     49        setEnableFeature(true, runTestRunnerTest);
    5350    }
    5451</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-database.html

    r250393 r256104  
    3838        testRunner.setUseITPDatabase(true);
    3939        setEnableFeature(true, function() {
    40             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    41 
    4240            testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    4341                if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent.html

    r234440 r256104  
    3737    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    3838        setEnableFeature(true, function() {
    39             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    40 
    4139            testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    4240                if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to-database.html

    r250393 r256104  
    4343        testRunner.setUseITPDatabase(true);
    4444        setEnableFeature(true, function() {
    45             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    46 
    4745            testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    4846                if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to.html

    r234440 r256104  
    4242    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    4343        setEnableFeature(true, function() {
    44             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    45 
    4644            testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    4745                if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-database.html

    r250393 r256104  
    3030    }
    3131
    32     function runTestRunnerTest() {
    33         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    34  
     32    function runTestRunnerTest() {
    3533        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3634            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics.html

    r234440 r256104  
    3030    }
    3131
    32     function runTestRunnerTest() {
    33         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    34  
     32    function runTestRunnerTest() {
    3533        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    3634            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-database.html

    r250393 r256104  
    3737
    3838    function runTestRunnerTest() {
    39         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    40 
    4139        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    4240            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-database.html

    r250393 r256104  
    3636
    3737    function runTestRunnerTest() {
    38         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    39 
    4038        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {});
    4139        if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html

    r246804 r256104  
    3737
    3838    function runTestRunnerTest() {
    39         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    40 
    4139        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {});
    4240        if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store.html

    r246804 r256104  
    3737
    3838    function runTestRunnerTest() {
    39         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    40 
    4139        testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {
    4240            if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-database.html

    r250393 r256104  
    5656        testRunner.setUseITPDatabase(true);
    5757        testRunner.waitUntilDone();
    58         setEnableFeature(true, function() {
    59             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    60             runTestRunnerTest();
    61         });
     58        setEnableFeature(true, runTestRunnerTest);
    6259    }
    6360</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction.html

    r234440 r256104  
    5555    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    5656        testRunner.waitUntilDone();
    57         setEnableFeature(true, function() {
    58             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    59             runTestRunnerTest();
    60         });
     57        setEnableFeature(true, runTestRunnerTest);
    6158    }
    6259</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-database.html

    r250393 r256104  
    5656        testRunner.setUseITPDatabase(true);
    5757        testRunner.waitUntilDone();
    58         setEnableFeature(true, function() {
    59             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    60             runTestRunnerTest();
    61         });
     58        setEnableFeature(true, runTestRunnerTest);
    6259    }
    6360</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction.html

    r234440 r256104  
    5555    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    5656        testRunner.waitUntilDone();
    57         setEnableFeature(true, function() {
    58             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    59             runTestRunnerTest();
    60         });
     57        setEnableFeature(true, runTestRunnerTest);
    6158    }
    6259</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html

    r250393 r256104  
    4343            testRunner.setUseITPDatabase(true);
    4444            setEnableFeature(true, function() {
    45                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    4645                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    4746            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html

    r234440 r256104  
    4242        if (testRunner) {
    4343            setEnableFeature(true, function() {
    44                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    4544                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    4645            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html

    r250393 r256104  
    4343            testRunner.setUseITPDatabase(true);
    4444            setEnableFeature(true, function() {
    45                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    4645                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    4746            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html

    r234440 r256104  
    4242        if (testRunner) {
    4343            setEnableFeature(true, function() {
    44                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    4544                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    4645            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html

    r250393 r256104  
    4343            testRunner.setUseITPDatabase(true);
    4444            setEnableFeature(true, function() {
    45                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    4645                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    4746            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html

    r234440 r256104  
    4242        if (testRunner) {
    4343            setEnableFeature(true, function() {
    44                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    4544                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    4645            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html

    r250393 r256104  
    4343            testRunner.setUseITPDatabase(true);
    4444            setEnableFeature(true, function() {
    45                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    4645                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    4746            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html

    r234440 r256104  
    4242        if (testRunner) {
    4343            setEnableFeature(true, function() {
    44                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    4544                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    4645            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html

    r250393 r256104  
    4343            testRunner.setUseITPDatabase(true);
    4444            setEnableFeature(true, function() {
    45                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    4645                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    4746            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html

    r234440 r256104  
    4242        if (testRunner) {
    4343            setEnableFeature(true, function() {
    44                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    4544                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    4645            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database.html

    r250393 r256104  
    33<body>
    44<script src="/js-test-resources/js-test.js"></script>
     5<script src="resources/util.js"></script>
    56<script>
    67description("Tests that we grant User Interaction credit for handled keypresses.");
     
    1415    if (window.testRunner && window.internals) {
    1516        testRunner.setUseITPDatabase(true);
    16         internals.setResourceLoadStatisticsEnabled(true);
    17         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
     17        setEnableFeature(true, function() {
     18            testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
     19        });
    1820    }
    1921
     
    3941                    testFrame.src = "about:blank";
    4042                    setTimeout(function() {
    41                         testRunner.statisticsResetToConsistentState(function() {
    42                             finishJSTest();
    43                         });
     43                        setEnableFeature(false, finishJSTest);
    4444                    }, 0);
    4545                }, 0);
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html

    r233888 r256104  
    33<body>
    44<script src="/js-test-resources/js-test.js"></script>
     5<script src="resources/util.js"></script>
    56<script>
    67description("Tests that we grant User Interaction credit for handled keypresses.");
     
    1314
    1415    if (window.testRunner && window.internals) {
    15         internals.setResourceLoadStatisticsEnabled(true);
    16         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
     16        setEnableFeature(true, function() {
     17            testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
     18        });
    1719    }
    1820
     
    3840                    testFrame.src = "about:blank";
    3941                    setTimeout(function() {
    40                         testRunner.statisticsResetToConsistentState(function() {
    41                             finishJSTest();
    42                         });
     42                        setEnableFeature(false, finishJSTest);
    4343                    }, 0);
    4444                }, 0);
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database.html

    r250393 r256104  
    33<body>
    44<script src="/js-test-resources/js-test.js"></script>
     5<script src="resources/util.js"></script>
    56<script>
    67description("Tests that we do not grant User Interaction credit for unhandled keypress.");
     
    1415    if (window.testRunner && window.internals) {
    1516        testRunner.setUseITPDatabase(true);
    16         internals.setResourceLoadStatisticsEnabled(true);
    17         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
     17        setEnableFeature(true, function() {
     18            testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
     19        });
    1820    }
    1921
     
    3436                    testFrame.src = "about:blank";
    3537                    setTimeout(function() {
    36                         testRunner.statisticsResetToConsistentState(function() {
    37                             finishJSTest();
    38                         });
     38                        setEnableFeature(false, finishJSTest);
    3939                    }, 0);
    4040                }, 0);
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown.html

    r233888 r256104  
    33<body>
    44<script src="/js-test-resources/js-test.js"></script>
     5<script src="resources/util.js"></script>
    56<script>
    67description("Tests that we do not grant User Interaction credit for unhandled keypress.");
     
    1314
    1415    if (window.testRunner && window.internals) {
    15         internals.setResourceLoadStatisticsEnabled(true);
    16         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
     16        setEnableFeature(true, function() {
     17            testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
     18        });
    1719    }
    1820
     
    3335                    testFrame.src = "about:blank";
    3436                    setTimeout(function() {
    35                         testRunner.statisticsResetToConsistentState(function() {
    36                             finishJSTest();
    37                         });
     37                        setEnableFeature(false, finishJSTest);
    3838                    }, 0);
    3939                }, 0);
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database.html

    r250393 r256104  
    5858            testRunner.setUseITPDatabase(true);
    5959            setEnableFeature(true, function () {
     60                testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    6061                runTestRunnerTest();
    6162            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database.html

    r250393 r256104  
    55    <title>Tests for Prevalent Resource With User Interaction Timeout</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    4950        testRunner.setUseITPDatabase(true);
    5051        testRunner.waitUntilDone();
    51         internals.setResourceLoadStatisticsEnabled(true);
    5252        testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    53         runTestRunnerTest();
     53        setEnableFeature(true, runTestRunnerTest);
    5454    }
    5555</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout.html

    r233888 r256104  
    55    <title>Tests for Prevalent Resource With User Interaction Timeout</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    3132                    else
    3233                        testPassed("Cookie deleted.");
    33                     internals.setResourceLoadStatisticsEnabled(false);
    34                     testRunner.statisticsResetToConsistentState(function() {
     34                    setEnableFeature(false, function() {
    3535                        testRunner.notifyDone();
    3636                    });
     
    4848    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    4949        testRunner.waitUntilDone();
    50         internals.setResourceLoadStatisticsEnabled(true);
    51         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    52         runTestRunnerTest();
     50        setEnableFeature(true, function() {
     51            testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
     52            runTestRunnerTest();
     53         });
    5354    }
    5455</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction.html

    r242712 r256104  
    5757        if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    5858            setEnableFeature(true, function () {
     59                testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    5960                runTestRunnerTest();
    6061            });
    6162        } else {
    6263            testFailed("Wrong host, no testRunner, or no internals.");
    63             testRunner.notifyDone();
     64            setEnableFeature(false, function() {
     65                testRunner.notifyDone();
     66            });
    6467        }
    6568    }
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database.html

    r250393 r256104  
    55    <title>Tests for Prevalent Resource Without User Interaction</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    1617        else
    1718            testPassed("Cookie deleted.");
    18         internals.setResourceLoadStatisticsEnabled(false);
    19         testRunner.statisticsResetToConsistentState(function() {
     19        setEnableFeature(false, function() {
    2020            testRunner.notifyDone();
    2121        });
     
    5050    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    5151        testRunner.waitUntilDone();
    52         internals.setResourceLoadStatisticsEnabled(true);
    5352        testRunner.setUseITPDatabase(true);
    54         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    55         runTestRunnerTest();
     53        setEnableFeature(true, function() {
     54            testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
     55            runTestRunnerTest();
     56        });
    5657    }
    5758</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction.html

    r233888 r256104  
    55    <title>Tests for Prevalent Resource Without User Interaction</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    1718            testPassed("Cookie deleted.");
    1819        internals.setResourceLoadStatisticsEnabled(false);
    19         testRunner.statisticsResetToConsistentState(function() {
     20        setEnableFeature(false, function() {
    2021            testRunner.notifyDone();
    2122        });
     
    5051    if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
    5152        testRunner.waitUntilDone();
    52         internals.setResourceLoadStatisticsEnabled(true);
    53         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    54         runTestRunnerTest();
     53        setEnableFeature(true, function() {
     54            testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
     55            runTestRunnerTest();
     56        });
    5557    }
    5658</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/prune-statistics-database.html

    r250393 r256104  
    55    <title>Test for Resource Load Statistics Pruning</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    3435            }
    3536        }
    36         if (failed) {
    37             testRunner.statisticsResetToConsistentState(function() {
    38                 finishJSTest();
    39             });
    40         }
     37        if (failed)
     38            setEnableFeature(false, finishJSTest);
    4139    }
    4240
     
    4947            }
    5048        }
    51         if (failed) {
    52             testRunner.statisticsResetToConsistentState(function() {
    53                 finishJSTest();
    54             });
    55         }
     49        if (failed)
     50            setEnableFeature(false, finishJSTest);
    5651    }
    5752
     
    128123            testRunner.installStatisticsDidScanDataRecordsCallback(checkStatisticsAfterPruning);
    129124            initializeStatisticsAndRunTests(1);
    130         } else {
    131             testRunner.statisticsResetToConsistentState(function() {
    132                 finishJSTest();
    133             });
    134         }
     125        } else
     126            setEnableFeature(false, finishJSTest);
    135127    }
    136128
     
    148140
    149141    if (window.testRunner) {
    150             testRunner.setUseITPDatabase(true);
    151         testRunner.setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(false);
    152         testRunner.setStatisticsMinimumTimeBetweenDataRecordsRemoval(0);
    153         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    154         testRunner.setStatisticsMaxStatisticsEntries(urlsToBePruned.length);
    155         testRunner.setStatisticsPruneEntriesDownTo(urlsToBePruned.length);
     142        testRunner.setUseITPDatabase(true);
     143        setEnableFeature(true, function () {
     144            testRunner.setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(false);
     145            testRunner.setStatisticsMinimumTimeBetweenDataRecordsRemoval(0);
     146            testRunner.setStatisticsMaxStatisticsEntries(urlsToBePruned.length);
     147            testRunner.setStatisticsPruneEntriesDownTo(urlsToBePruned.length);
    156148
    157         currentTest = 1;
    158         testRunner.installStatisticsDidScanDataRecordsCallback(checkStatisticsAfterPruning);
    159         initializeStatisticsAndRunTests(1);
     149            currentTest = 1;
     150            testRunner.installStatisticsDidScanDataRecordsCallback(checkStatisticsAfterPruning);
     151            initializeStatisticsAndRunTests(1);
     152        });
    160153    }
    161154</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/prune-statistics.html

    r233888 r256104  
    55    <title>Test for Resource Load Statistics Pruning</title>
    66    <script src="/js-test-resources/js-test.js"></script>
     7    <script src="resources/util.js"></script>
    78</head>
    89<body>
     
    3435            }
    3536        }
    36         if (failed) {
    37             testRunner.statisticsResetToConsistentState(function() {
    38                 finishJSTest();
    39             });
    40         }
     37        if (failed)
     38            setEnableFeature(false, finishJSTest);
    4139    }
    4240
     
    4947            }
    5048        }
    51         if (failed) {
    52             testRunner.statisticsResetToConsistentState(function() {
    53                 finishJSTest();
    54             });
    55         }
     49        if (failed)
     50            setEnableFeature(false, finishJSTest);
    5651    }
    5752
     
    128123            testRunner.installStatisticsDidScanDataRecordsCallback(checkStatisticsAfterPruning);
    129124            initializeStatisticsAndRunTests(1);
    130         } else {
    131             testRunner.statisticsResetToConsistentState(function() {
    132                 finishJSTest();
    133             });
    134         }
     125        } else
     126            setEnableFeature(false, finishJSTest);
     127
    135128    }
    136129
     
    148141
    149142    if (window.testRunner) {
    150         testRunner.setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(false);
    151         testRunner.setStatisticsMinimumTimeBetweenDataRecordsRemoval(0);
    152         testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    153         testRunner.setStatisticsMaxStatisticsEntries(urlsToBePruned.length);
    154         testRunner.setStatisticsPruneEntriesDownTo(urlsToBePruned.length);
     143        setEnableFeature(true, function () {
     144            testRunner.setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval(false);
     145            testRunner.setStatisticsMinimumTimeBetweenDataRecordsRemoval(0);
     146            testRunner.setStatisticsMaxStatisticsEntries(urlsToBePruned.length);
     147            testRunner.setStatisticsPruneEntriesDownTo(urlsToBePruned.length);
    155148
    156         currentTest = 1;
    157         testRunner.installStatisticsDidScanDataRecordsCallback(checkStatisticsAfterPruning);
    158         initializeStatisticsAndRunTests(1);
     149            currentTest = 1;
     150            testRunner.installStatisticsDidScanDataRecordsCallback(checkStatisticsAfterPruning);
     151            initializeStatisticsAndRunTests(1);
     152        });
    159153    }
    160154</script>
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/resources/util.js

    r242712 r256104  
    22    if (typeof completionHandler !== "function")
    33        testFailed("setEnableFeature() requires a completion handler function.");
    4     testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(enable);
    54    if (enable) {
    65        internals.setResourceLoadStatisticsEnabled(true);
     
    1110            testRunner.setStatisticsIsRunningTest(false);
    1211            internals.setResourceLoadStatisticsEnabled(false);
     12            testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(false);
    1313            completionHandler();
    1414        });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html

    r250393 r256104  
    1616            testRunner.setUseITPDatabase(true);
    1717            setEnableFeature(true, function() {
    18                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    1918                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    2019            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip.html

    r234440 r256104  
    1515        if (testRunner) {
    1616            setEnableFeature(true, function() {
    17                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    1817                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    1918            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html

    r250393 r256104  
    1616            testRunner.setUseITPDatabase(true);
    1717            setEnableFeature(true, function() {
    18                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    1918                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    2019            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html

    r234440 r256104  
    1515        if (testRunner) {
    1616            setEnableFeature(true, function() {
    17                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    1817                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    1918            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html

    r250393 r256104  
    1616            testRunner.setUseITPDatabase(true);
    1717            setEnableFeature(true, function() {
    18                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    1918                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    2019            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html

    r234440 r256104  
    1515        if (testRunner) {
    1616            setEnableFeature(true, function() {
    17                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    1817                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    1918            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html

    r250393 r256104  
    1616            testRunner.setUseITPDatabase(true);
    1717            setEnableFeature(true, function() {
    18                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    1918                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    2019            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html

    r234440 r256104  
    1515        if (testRunner) {
    1616            setEnableFeature(true, function() {
    17                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    1817                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    1918            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html

    r250393 r256104  
    1616            testRunner.setUseITPDatabase(true);
    1717            setEnableFeature(true, function() {
    18                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    1918                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    2019            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html

    r234440 r256104  
    1515        if (testRunner) {
    1616            setEnableFeature(true, function() {
    17                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    1817                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    1918            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html

    r250393 r256104  
    1616            testRunner.setUseITPDatabase(true);
    1717            setEnableFeature(true, function() {
    18                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    1918                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    2019            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html

    r234440 r256104  
    1515        if (testRunner) {
    1616            setEnableFeature(true, function() {
    17                 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    1817                testRunner.installStatisticsDidScanDataRecordsCallback(checkStats);
    1918            });
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/telemetry-generation-advanced-functionality-database.html

    r250866 r256104  
    148148    if (window.testRunner) {
    149149        setEnableFeature(true, function() {
    150             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    151150            testRunner.setStatisticsNotifyPagesWhenTelemetryWasCaptured(true);
    152151            setUpStatisticsAndContinue();
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/telemetry-generation-basic-functionality-database.html

    r250866 r256104  
    128128    if (window.testRunner) {
    129129        setEnableFeature(true, function() {
    130             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    131130            testRunner.setStatisticsNotifyPagesWhenTelemetryWasCaptured(true);
    132131            setUpInsufficientStatisticsAndContinue();
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/telemetry-generation.html

    r250393 r256104  
    114114    if (window.testRunner) {
    115115        setEnableFeature(true, function() {
    116             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    117116            testRunner.setStatisticsNotifyPagesWhenTelemetryWasCaptured(true);
    118117            setUpInsufficientStatisticsAndContinue();
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database.html

    r250393 r256104  
    2929    setEnableFeature(true, function() {
    3030        if (testRunner) {
    31             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
    3231            testRunner.installStatisticsDidScanDataRecordsCallback(finishTest);
    3332        }
  • trunk/LayoutTests/http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame.html

    r234440 r256104  
    2828onload = function() {
    2929    setEnableFeature(true, function() {
    30         if (testRunner) {
    31             testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
     30        if (testRunner)
    3231            testRunner.installStatisticsDidScanDataRecordsCallback(finishTest);
    33         }
    3432
    3533        shouldBe("document.location.origin", "topFrameOrigin");
  • trunk/Source/WebKit/ChangeLog

    r256103 r256104  
     12020-02-09  Kate Cheney  <katherine_cheney@apple.com>
     2
     3        [ Mac wk2 ] http/tests/resourceLoadStatistics/log-cross-site-load-with-link-decoration.html is a flaky failure
     4        https://bugs.webkit.org/show_bug.cgi?id=207271
     5        <rdar://problem/59190346>
     6
     7        Reviewed by Maciej Stachowiak.
     8
     9        This patch adds a check to make sure a test is expecting a statistics
     10        processing call before proceeding. Otherwise, this can cause
     11        flakiness in ITP tests if data is removed/changed during the test.
     12
     13        * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
     14        (WebKit::ResourceLoadStatisticsStore::processStatisticsAndDataRecords):
     15
    1162020-02-08  Sam Weinig  <weinig@apple.com>
    217
  • trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp

    r253359 r256104  
    236236    ASSERT(!RunLoop::isMain());
    237237
     238    if (parameters().isRunningTest && !m_parameters.shouldNotifyPagesWhenDataRecordsWereScanned)
     239        return;
     240
    238241    if (m_parameters.shouldClassifyResourcesBeforeDataRecordsRemoval)
    239242        classifyPrevalentResources();
Note: See TracChangeset for help on using the changeset viewer.