Changeset 256104 in webkit
- Timestamp:
- Feb 9, 2020 1:36:53 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 73 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r256095 r256104 1 2020-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 1 93 2020-02-08 Simon Fraser <simon.fraser@apple.com> 2 94 -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-database.html
r250393 r256104 5 5 <title>Tests for Classification Based on Mixed Statistics</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 20 21 testPassed("Host did not get classified as prevalent resource."); 21 22 22 testRunner.statisticsResetToConsistentState(function() {23 setEnableFeature(false, function() { 23 24 testRunner.notifyDone(); 24 25 }); … … 26 27 27 28 function runTestRunnerTest() { 28 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);29 30 29 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 31 30 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 45 44 testRunner.setUseITPDatabase(true); 46 45 testRunner.waitUntilDone(); 47 internals.setResourceLoadStatisticsEnabled(true); 48 runTestRunnerTest(); 46 setEnableFeature(true, runTestRunnerTest); 49 47 } 50 48 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics.html
r233888 r256104 5 5 <title>Tests for Classification Based on Mixed Statistics</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 20 21 testPassed("Host did not get classified as prevalent resource."); 21 22 22 testRunner.statisticsResetToConsistentState(function() {23 setEnableFeature(false, function() { 23 24 testRunner.notifyDone(); 24 25 }); … … 26 27 27 28 function runTestRunnerTest() { 28 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);29 30 29 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 31 30 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 44 43 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 45 44 testRunner.waitUntilDone(); 46 internals.setResourceLoadStatisticsEnabled(true); 47 runTestRunnerTest(); 45 setEnableFeature(true, runTestRunnerTest); 48 46 } 49 47 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-database.html
r250393 r256104 5 5 <title>Tests for Classification Based on Subresource Under Top Frame Origins</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 19 20 testPassed("Host did not get classified as prevalent resource."); 20 21 21 testRunner.statisticsResetToConsistentState(function() {22 setEnableFeature(false, function() { 22 23 testRunner.notifyDone(); 23 24 }); 24 25 } 25 26 26 function runTestRunnerTest() { 27 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 28 27 function runTestRunnerTest() { 29 28 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 30 29 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 43 42 testRunner.setUseITPDatabase(true); 44 43 testRunner.waitUntilDone(); 45 internals.setResourceLoadStatisticsEnabled(true); 46 runTestRunnerTest(); 44 setEnableFeature(true, runTestRunnerTest); 47 45 } 48 46 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins.html
r233888 r256104 5 5 <title>Tests for Classification Based on Subresource Under Top Frame Origins</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 19 20 testPassed("Host did not get classified as prevalent resource."); 20 21 21 testRunner.statisticsResetToConsistentState(function() {22 setEnableFeature(false, function() { 22 23 testRunner.notifyDone(); 23 24 }); … … 25 26 26 27 function runTestRunnerTest() { 27 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);28 29 28 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 30 29 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 42 41 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 43 42 testRunner.waitUntilDone(); 44 internals.setResourceLoadStatisticsEnabled(true); 45 runTestRunnerTest(); 43 setEnableFeature(true, runTestRunnerTest); 46 44 } 47 45 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-database.html
r250393 r256104 5 5 <title>Tests for Classification Based on Subresource Unique Redirects To</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 19 20 testPassed("Host did not get classified as prevalent resource."); 20 21 21 internals.setResourceLoadStatisticsEnabled(false); 22 testRunner.statisticsResetToConsistentState(function() { 22 setEnableFeature(false, function() { 23 23 testRunner.notifyDone(); 24 24 }); … … 26 26 27 27 function runTestRunnerTest() { 28 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);29 30 28 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 31 29 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 44 42 testRunner.setUseITPDatabase(true); 45 43 testRunner.waitUntilDone(); 46 internals.setResourceLoadStatisticsEnabled(true); 47 runTestRunnerTest(); 48 testRunner.setUseITPDatabase(false); 44 setEnableFeature(true, runTestRunnerTest); 49 45 } 50 46 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to.html
r233888 r256104 5 5 <title>Tests for Classification Based on Subresource Unique Redirects To</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 19 20 testPassed("Host did not get classified as prevalent resource."); 20 21 21 internals.setResourceLoadStatisticsEnabled(false); 22 testRunner.statisticsResetToConsistentState(function() { 22 setEnableFeature(false, function() { 23 23 testRunner.notifyDone(); 24 24 }); 25 25 } 26 26 27 function runTestRunnerTest() { 28 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 29 27 function runTestRunnerTest() { 30 28 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 31 29 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 43 41 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 44 42 testRunner.waitUntilDone(); 45 internals.setResourceLoadStatisticsEnabled(true); 46 runTestRunnerTest(); 43 setEnableFeature(true, runTestRunnerTest); 47 44 } 48 45 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-database.html
r250393 r256104 5 5 <title>Tests for Classification Based on Mixed Statistics</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 23 24 testPassed("Host classified as prevalent resource."); 24 25 25 internals.setResourceLoadStatisticsEnabled(false); 26 testRunner.statisticsResetToConsistentState(function() { 26 setEnableFeature(false, function() { 27 27 testRunner.notifyDone(); 28 28 }); 29 29 } 30 30 31 function runTestRunnerTest() { 32 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 33 31 function runTestRunnerTest() { 34 32 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 35 33 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 55 53 testRunner.setUseITPDatabase(true); 56 54 testRunner.waitUntilDone(); 57 internals.setResourceLoadStatisticsEnabled(true); 58 runTestRunnerTest(); 55 setEnableFeature(true, runTestRunnerTest); 59 56 } 60 57 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics.html
r233888 r256104 5 5 <title>Tests for Classification Based on Mixed Statistics</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 23 24 testPassed("Host classified as prevalent resource."); 24 25 25 internals.setResourceLoadStatisticsEnabled(false); 26 testRunner.statisticsResetToConsistentState(function() { 26 setEnableFeature(false, function() { 27 27 testRunner.notifyDone(); 28 28 }); 29 29 } 30 30 31 function runTestRunnerTest() { 32 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 33 31 function runTestRunnerTest() { 34 32 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 35 33 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 54 52 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 55 53 testRunner.waitUntilDone(); 56 internals.setResourceLoadStatisticsEnabled(true); 57 runTestRunnerTest(); 54 setEnableFeature(true, runTestRunnerTest); 58 55 } 59 56 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
r250393 r256104 5 5 <title>Tests for Classification Based on Sub Frame Under Top Frame Origins</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 23 24 testPassed("Host classified as prevalent resource."); 24 25 25 internals.setResourceLoadStatisticsEnabled(false); 26 testRunner.statisticsResetToConsistentState(function() { 26 setEnableFeature(false, function() { 27 27 testRunner.notifyDone(); 28 28 }); … … 30 30 31 31 function runTestRunnerTest() { 32 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);33 34 32 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 35 33 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 50 48 testRunner.setUseITPDatabase(true); 51 49 testRunner.waitUntilDone(); 52 internals.setResourceLoadStatisticsEnabled(true); 53 runTestRunnerTest(); 50 setEnableFeature(true, runTestRunnerTest); 54 51 } 55 52 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins.html
r233888 r256104 5 5 <title>Tests for Classification Based on Sub Frame Under Top Frame Origins</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 23 24 testPassed("Host classified as prevalent resource."); 24 25 25 internals.setResourceLoadStatisticsEnabled(false); 26 testRunner.statisticsResetToConsistentState(function() { 26 setEnableFeature(false, function() { 27 27 testRunner.notifyDone(); 28 28 }); … … 30 30 31 31 function runTestRunnerTest() { 32 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);33 34 32 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 35 33 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 49 47 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 50 48 testRunner.waitUntilDone(); 51 internals.setResourceLoadStatisticsEnabled(true); 52 runTestRunnerTest(); 49 setEnableFeature(true, runTestRunnerTest); 53 50 } 54 51 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-database.html
r250393 r256104 38 38 testRunner.setUseITPDatabase(true); 39 39 setEnableFeature(true, function() { 40 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);41 42 40 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 43 41 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent.html
r234440 r256104 37 37 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 38 38 setEnableFeature(true, function() { 39 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);40 41 39 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 42 40 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-database.html
r250393 r256104 5 5 <title>Tests for Classification Based on Subresource Under Top Frame Origins</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 23 24 testPassed("Host classified as prevalent resource."); 24 25 25 internals.setResourceLoadStatisticsEnabled(false); 26 testRunner.statisticsResetToConsistentState(function() { 26 setEnableFeature(false, function() { 27 27 testRunner.notifyDone(); 28 28 }); 29 29 } 30 30 31 function runTestRunnerTest() { 32 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 33 31 function runTestRunnerTest() { 34 32 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 35 33 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 50 48 testRunner.setUseITPDatabase(true); 51 49 testRunner.waitUntilDone(); 52 internals.setResourceLoadStatisticsEnabled(true); 53 runTestRunnerTest(); 50 setEnableFeature(true, runTestRunnerTest); 54 51 } 55 52 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins.html
r233888 r256104 5 5 <title>Tests for Classification Based on Subresource Under Top Frame Origins</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 23 24 testPassed("Host classified as prevalent resource."); 24 25 25 internals.setResourceLoadStatisticsEnabled(false); 26 testRunner.statisticsResetToConsistentState(function() { 26 setEnableFeature(false, function() { 27 27 testRunner.notifyDone(); 28 28 }); 29 29 } 30 30 31 function runTestRunnerTest() { 32 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 33 31 function runTestRunnerTest() { 34 32 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 35 33 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 49 47 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 50 48 testRunner.waitUntilDone(); 51 internals.setResourceLoadStatisticsEnabled(true); 52 runTestRunnerTest(); 49 setEnableFeature(true, runTestRunnerTest); 53 50 } 54 51 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-database.html
r250393 r256104 5 5 <title>Tests for Classification Based on Subresource Unique Redirects To</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 23 24 testPassed("Host classified as prevalent resource."); 24 25 25 internals.setResourceLoadStatisticsEnabled(false); 26 testRunner.statisticsResetToConsistentState(function() { 26 setEnableFeature(false, function() { 27 27 testRunner.notifyDone(); 28 28 }); 29 29 } 30 30 31 function runTestRunnerTest() { 32 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 33 31 function runTestRunnerTest() { 34 32 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 35 33 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 50 48 testRunner.setUseITPDatabase(true); 51 49 testRunner.waitUntilDone(); 52 internals.setResourceLoadStatisticsEnabled(true); 53 runTestRunnerTest(); 50 setEnableFeature(true, runTestRunnerTest); 54 51 } 55 52 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to.html
r233888 r256104 5 5 <title>Tests for Classification Based on Subresource Unique Redirects To</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 23 24 testPassed("Host classified as prevalent resource."); 24 25 25 internals.setResourceLoadStatisticsEnabled(false); 26 testRunner.statisticsResetToConsistentState(function() { 26 setEnableFeature(false, function() { 27 27 testRunner.notifyDone(); 28 28 }); 29 29 } 30 30 31 function runTestRunnerTest() { 32 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 33 31 function runTestRunnerTest() { 34 32 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 35 33 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) … … 49 47 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 50 48 testRunner.waitUntilDone(); 51 internals.setResourceLoadStatisticsEnabled(true); 52 runTestRunnerTest(); 49 setEnableFeature(true, runTestRunnerTest); 53 50 } 54 51 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-database.html
r250393 r256104 38 38 testRunner.setUseITPDatabase(true); 39 39 setEnableFeature(true, function() { 40 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);41 42 40 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 43 41 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent.html
r234440 r256104 37 37 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 38 38 setEnableFeature(true, function() { 39 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);40 41 39 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 42 40 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to-database.html
r250393 r256104 43 43 testRunner.setUseITPDatabase(true); 44 44 setEnableFeature(true, function() { 45 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);46 47 45 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 48 46 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to.html
r234440 r256104 42 42 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 43 43 setEnableFeature(true, function() { 44 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);45 46 44 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 47 45 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-database.html
r250393 r256104 30 30 } 31 31 32 function runTestRunnerTest() { 33 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 34 32 function runTestRunnerTest() { 35 33 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 36 34 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) -
trunk/LayoutTests/http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics.html
r234440 r256104 30 30 } 31 31 32 function runTestRunnerTest() { 33 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 34 32 function runTestRunnerTest() { 35 33 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 36 34 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) -
trunk/LayoutTests/http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-database.html
r250393 r256104 37 37 38 38 function runTestRunnerTest() { 39 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);40 41 39 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 42 40 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) -
trunk/LayoutTests/http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-database.html
r250393 r256104 36 36 37 37 function runTestRunnerTest() { 38 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);39 40 38 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {}); 41 39 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) -
trunk/LayoutTests/http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html
r246804 r256104 37 37 38 38 function runTestRunnerTest() { 39 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);40 41 39 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() {}); 42 40 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) -
trunk/LayoutTests/http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store.html
r246804 r256104 37 37 38 38 function runTestRunnerTest() { 39 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);40 41 39 testRunner.setStatisticsPrevalentResource(statisticsUrl, false, function() { 42 40 if (testRunner.isStatisticsPrevalentResource(statisticsUrl)) -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-database.html
r250393 r256104 56 56 testRunner.setUseITPDatabase(true); 57 57 testRunner.waitUntilDone(); 58 setEnableFeature(true, function() { 59 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 60 runTestRunnerTest(); 61 }); 58 setEnableFeature(true, runTestRunnerTest); 62 59 } 63 60 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction.html
r234440 r256104 55 55 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 56 56 testRunner.waitUntilDone(); 57 setEnableFeature(true, function() { 58 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 59 runTestRunnerTest(); 60 }); 57 setEnableFeature(true, runTestRunnerTest); 61 58 } 62 59 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-database.html
r250393 r256104 56 56 testRunner.setUseITPDatabase(true); 57 57 testRunner.waitUntilDone(); 58 setEnableFeature(true, function() { 59 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 60 runTestRunnerTest(); 61 }); 58 setEnableFeature(true, runTestRunnerTest); 62 59 } 63 60 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction.html
r234440 r256104 55 55 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 56 56 testRunner.waitUntilDone(); 57 setEnableFeature(true, function() { 58 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 59 runTestRunnerTest(); 60 }); 57 setEnableFeature(true, runTestRunnerTest); 61 58 } 62 59 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
r250393 r256104 43 43 testRunner.setUseITPDatabase(true); 44 44 setEnableFeature(true, function() { 45 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);46 45 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 47 46 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html
r234440 r256104 42 42 if (testRunner) { 43 43 setEnableFeature(true, function() { 44 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);45 44 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 46 45 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
r250393 r256104 43 43 testRunner.setUseITPDatabase(true); 44 44 setEnableFeature(true, function() { 45 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);46 45 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 47 46 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html
r234440 r256104 42 42 if (testRunner) { 43 43 setEnableFeature(true, function() { 44 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);45 44 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 46 45 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
r250393 r256104 43 43 testRunner.setUseITPDatabase(true); 44 44 setEnableFeature(true, function() { 45 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);46 45 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 47 46 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html
r234440 r256104 42 42 if (testRunner) { 43 43 setEnableFeature(true, function() { 44 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);45 44 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 46 45 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
r250393 r256104 43 43 testRunner.setUseITPDatabase(true); 44 44 setEnableFeature(true, function() { 45 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);46 45 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 47 46 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html
r234440 r256104 42 42 if (testRunner) { 43 43 setEnableFeature(true, function() { 44 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);45 44 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 46 45 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
r250393 r256104 43 43 testRunner.setUseITPDatabase(true); 44 44 setEnableFeature(true, function() { 45 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);46 45 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 47 46 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html
r234440 r256104 42 42 if (testRunner) { 43 43 setEnableFeature(true, function() { 44 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);45 44 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 46 45 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database.html
r250393 r256104 3 3 <body> 4 4 <script src="/js-test-resources/js-test.js"></script> 5 <script src="resources/util.js"></script> 5 6 <script> 6 7 description("Tests that we grant User Interaction credit for handled keypresses."); … … 14 15 if (window.testRunner && window.internals) { 15 16 testRunner.setUseITPDatabase(true); 16 internals.setResourceLoadStatisticsEnabled(true); 17 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 17 setEnableFeature(true, function() { 18 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 19 }); 18 20 } 19 21 … … 39 41 testFrame.src = "about:blank"; 40 42 setTimeout(function() { 41 testRunner.statisticsResetToConsistentState(function() { 42 finishJSTest(); 43 }); 43 setEnableFeature(false, finishJSTest); 44 44 }, 0); 45 45 }, 0); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html
r233888 r256104 3 3 <body> 4 4 <script src="/js-test-resources/js-test.js"></script> 5 <script src="resources/util.js"></script> 5 6 <script> 6 7 description("Tests that we grant User Interaction credit for handled keypresses."); … … 13 14 14 15 if (window.testRunner && window.internals) { 15 internals.setResourceLoadStatisticsEnabled(true); 16 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 16 setEnableFeature(true, function() { 17 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 18 }); 17 19 } 18 20 … … 38 40 testFrame.src = "about:blank"; 39 41 setTimeout(function() { 40 testRunner.statisticsResetToConsistentState(function() { 41 finishJSTest(); 42 }); 42 setEnableFeature(false, finishJSTest); 43 43 }, 0); 44 44 }, 0); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database.html
r250393 r256104 3 3 <body> 4 4 <script src="/js-test-resources/js-test.js"></script> 5 <script src="resources/util.js"></script> 5 6 <script> 6 7 description("Tests that we do not grant User Interaction credit for unhandled keypress."); … … 14 15 if (window.testRunner && window.internals) { 15 16 testRunner.setUseITPDatabase(true); 16 internals.setResourceLoadStatisticsEnabled(true); 17 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 17 setEnableFeature(true, function() { 18 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 19 }); 18 20 } 19 21 … … 34 36 testFrame.src = "about:blank"; 35 37 setTimeout(function() { 36 testRunner.statisticsResetToConsistentState(function() { 37 finishJSTest(); 38 }); 38 setEnableFeature(false, finishJSTest); 39 39 }, 0); 40 40 }, 0); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown.html
r233888 r256104 3 3 <body> 4 4 <script src="/js-test-resources/js-test.js"></script> 5 <script src="resources/util.js"></script> 5 6 <script> 6 7 description("Tests that we do not grant User Interaction credit for unhandled keypress."); … … 13 14 14 15 if (window.testRunner && window.internals) { 15 internals.setResourceLoadStatisticsEnabled(true); 16 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 16 setEnableFeature(true, function() { 17 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 18 }); 17 19 } 18 20 … … 33 35 testFrame.src = "about:blank"; 34 36 setTimeout(function() { 35 testRunner.statisticsResetToConsistentState(function() { 36 finishJSTest(); 37 }); 37 setEnableFeature(false, finishJSTest); 38 38 }, 0); 39 39 }, 0); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database.html
r250393 r256104 58 58 testRunner.setUseITPDatabase(true); 59 59 setEnableFeature(true, function () { 60 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 60 61 runTestRunnerTest(); 61 62 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database.html
r250393 r256104 5 5 <title>Tests for Prevalent Resource With User Interaction Timeout</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 49 50 testRunner.setUseITPDatabase(true); 50 51 testRunner.waitUntilDone(); 51 internals.setResourceLoadStatisticsEnabled(true);52 52 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 53 runTestRunnerTest();53 setEnableFeature(true, runTestRunnerTest); 54 54 } 55 55 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout.html
r233888 r256104 5 5 <title>Tests for Prevalent Resource With User Interaction Timeout</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 31 32 else 32 33 testPassed("Cookie deleted."); 33 internals.setResourceLoadStatisticsEnabled(false); 34 testRunner.statisticsResetToConsistentState(function() { 34 setEnableFeature(false, function() { 35 35 testRunner.notifyDone(); 36 36 }); … … 48 48 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 49 49 testRunner.waitUntilDone(); 50 internals.setResourceLoadStatisticsEnabled(true); 51 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 52 runTestRunnerTest(); 50 setEnableFeature(true, function() { 51 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 52 runTestRunnerTest(); 53 }); 53 54 } 54 55 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction.html
r242712 r256104 57 57 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 58 58 setEnableFeature(true, function () { 59 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 59 60 runTestRunnerTest(); 60 61 }); 61 62 } else { 62 63 testFailed("Wrong host, no testRunner, or no internals."); 63 testRunner.notifyDone(); 64 setEnableFeature(false, function() { 65 testRunner.notifyDone(); 66 }); 64 67 } 65 68 } -
trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database.html
r250393 r256104 5 5 <title>Tests for Prevalent Resource Without User Interaction</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 16 17 else 17 18 testPassed("Cookie deleted."); 18 internals.setResourceLoadStatisticsEnabled(false); 19 testRunner.statisticsResetToConsistentState(function() { 19 setEnableFeature(false, function() { 20 20 testRunner.notifyDone(); 21 21 }); … … 50 50 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 51 51 testRunner.waitUntilDone(); 52 internals.setResourceLoadStatisticsEnabled(true);53 52 testRunner.setUseITPDatabase(true); 54 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 55 runTestRunnerTest(); 53 setEnableFeature(true, function() { 54 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 55 runTestRunnerTest(); 56 }); 56 57 } 57 58 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction.html
r233888 r256104 5 5 <title>Tests for Prevalent Resource Without User Interaction</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 17 18 testPassed("Cookie deleted."); 18 19 internals.setResourceLoadStatisticsEnabled(false); 19 testRunner.statisticsResetToConsistentState(function() {20 setEnableFeature(false, function() { 20 21 testRunner.notifyDone(); 21 22 }); … … 50 51 if (document.location.host === hostUnderTest && window.testRunner && window.internals) { 51 52 testRunner.waitUntilDone(); 52 internals.setResourceLoadStatisticsEnabled(true); 53 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 54 runTestRunnerTest(); 53 setEnableFeature(true, function() { 54 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 55 runTestRunnerTest(); 56 }); 55 57 } 56 58 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/prune-statistics-database.html
r250393 r256104 5 5 <title>Test for Resource Load Statistics Pruning</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 34 35 } 35 36 } 36 if (failed) { 37 testRunner.statisticsResetToConsistentState(function() { 38 finishJSTest(); 39 }); 40 } 37 if (failed) 38 setEnableFeature(false, finishJSTest); 41 39 } 42 40 … … 49 47 } 50 48 } 51 if (failed) { 52 testRunner.statisticsResetToConsistentState(function() { 53 finishJSTest(); 54 }); 55 } 49 if (failed) 50 setEnableFeature(false, finishJSTest); 56 51 } 57 52 … … 128 123 testRunner.installStatisticsDidScanDataRecordsCallback(checkStatisticsAfterPruning); 129 124 initializeStatisticsAndRunTests(1); 130 } else { 131 testRunner.statisticsResetToConsistentState(function() { 132 finishJSTest(); 133 }); 134 } 125 } else 126 setEnableFeature(false, finishJSTest); 135 127 } 136 128 … … 148 140 149 141 if (window.testRunner) { 150 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); 156 148 157 currentTest = 1; 158 testRunner.installStatisticsDidScanDataRecordsCallback(checkStatisticsAfterPruning); 159 initializeStatisticsAndRunTests(1); 149 currentTest = 1; 150 testRunner.installStatisticsDidScanDataRecordsCallback(checkStatisticsAfterPruning); 151 initializeStatisticsAndRunTests(1); 152 }); 160 153 } 161 154 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/prune-statistics.html
r233888 r256104 5 5 <title>Test for Resource Load Statistics Pruning</title> 6 6 <script src="/js-test-resources/js-test.js"></script> 7 <script src="resources/util.js"></script> 7 8 </head> 8 9 <body> … … 34 35 } 35 36 } 36 if (failed) { 37 testRunner.statisticsResetToConsistentState(function() { 38 finishJSTest(); 39 }); 40 } 37 if (failed) 38 setEnableFeature(false, finishJSTest); 41 39 } 42 40 … … 49 47 } 50 48 } 51 if (failed) { 52 testRunner.statisticsResetToConsistentState(function() { 53 finishJSTest(); 54 }); 55 } 49 if (failed) 50 setEnableFeature(false, finishJSTest); 56 51 } 57 52 … … 128 123 testRunner.installStatisticsDidScanDataRecordsCallback(checkStatisticsAfterPruning); 129 124 initializeStatisticsAndRunTests(1); 130 } else { 131 testRunner.statisticsResetToConsistentState(function() { 132 finishJSTest(); 133 }); 134 } 125 } else 126 setEnableFeature(false, finishJSTest); 127 135 128 } 136 129 … … 148 141 149 142 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); 155 148 156 currentTest = 1; 157 testRunner.installStatisticsDidScanDataRecordsCallback(checkStatisticsAfterPruning); 158 initializeStatisticsAndRunTests(1); 149 currentTest = 1; 150 testRunner.installStatisticsDidScanDataRecordsCallback(checkStatisticsAfterPruning); 151 initializeStatisticsAndRunTests(1); 152 }); 159 153 } 160 154 </script> -
trunk/LayoutTests/http/tests/resourceLoadStatistics/resources/util.js
r242712 r256104 2 2 if (typeof completionHandler !== "function") 3 3 testFailed("setEnableFeature() requires a completion handler function."); 4 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(enable);5 4 if (enable) { 6 5 internals.setResourceLoadStatisticsEnabled(true); … … 11 10 testRunner.setStatisticsIsRunningTest(false); 12 11 internals.setResourceLoadStatisticsEnabled(false); 12 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(false); 13 13 completionHandler(); 14 14 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
r250393 r256104 16 16 testRunner.setUseITPDatabase(true); 17 17 setEnableFeature(true, function() { 18 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);19 18 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 20 19 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip.html
r234440 r256104 15 15 if (testRunner) { 16 16 setEnableFeature(true, function() { 17 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);18 17 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 19 18 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
r250393 r256104 16 16 testRunner.setUseITPDatabase(true); 17 17 setEnableFeature(true, function() { 18 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);19 18 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 20 19 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html
r234440 r256104 15 15 if (testRunner) { 16 16 setEnableFeature(true, function() { 17 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);18 17 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 19 18 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
r250393 r256104 16 16 testRunner.setUseITPDatabase(true); 17 17 setEnableFeature(true, function() { 18 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);19 18 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 20 19 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html
r234440 r256104 15 15 if (testRunner) { 16 16 setEnableFeature(true, function() { 17 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);18 17 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 19 18 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
r250393 r256104 16 16 testRunner.setUseITPDatabase(true); 17 17 setEnableFeature(true, function() { 18 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);19 18 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 20 19 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html
r234440 r256104 15 15 if (testRunner) { 16 16 setEnableFeature(true, function() { 17 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);18 17 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 19 18 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
r250393 r256104 16 16 testRunner.setUseITPDatabase(true); 17 17 setEnableFeature(true, function() { 18 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);19 18 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 20 19 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html
r234440 r256104 15 15 if (testRunner) { 16 16 setEnableFeature(true, function() { 17 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);18 17 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 19 18 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
r250393 r256104 16 16 testRunner.setUseITPDatabase(true); 17 17 setEnableFeature(true, function() { 18 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);19 18 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 20 19 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html
r234440 r256104 15 15 if (testRunner) { 16 16 setEnableFeature(true, function() { 17 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);18 17 testRunner.installStatisticsDidScanDataRecordsCallback(checkStats); 19 18 }); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/telemetry-generation-advanced-functionality-database.html
r250866 r256104 148 148 if (window.testRunner) { 149 149 setEnableFeature(true, function() { 150 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);151 150 testRunner.setStatisticsNotifyPagesWhenTelemetryWasCaptured(true); 152 151 setUpStatisticsAndContinue(); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/telemetry-generation-basic-functionality-database.html
r250866 r256104 128 128 if (window.testRunner) { 129 129 setEnableFeature(true, function() { 130 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);131 130 testRunner.setStatisticsNotifyPagesWhenTelemetryWasCaptured(true); 132 131 setUpInsufficientStatisticsAndContinue(); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/telemetry-generation.html
r250393 r256104 114 114 if (window.testRunner) { 115 115 setEnableFeature(true, function() { 116 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);117 116 testRunner.setStatisticsNotifyPagesWhenTelemetryWasCaptured(true); 118 117 setUpInsufficientStatisticsAndContinue(); -
trunk/LayoutTests/http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database.html
r250393 r256104 29 29 setEnableFeature(true, function() { 30 30 if (testRunner) { 31 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);32 31 testRunner.installStatisticsDidScanDataRecordsCallback(finishTest); 33 32 } -
trunk/LayoutTests/http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame.html
r234440 r256104 28 28 onload = function() { 29 29 setEnableFeature(true, function() { 30 if (testRunner) { 31 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true); 30 if (testRunner) 32 31 testRunner.installStatisticsDidScanDataRecordsCallback(finishTest); 33 }34 32 35 33 shouldBe("document.location.origin", "topFrameOrigin"); -
trunk/Source/WebKit/ChangeLog
r256103 r256104 1 2020-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 1 16 2020-02-08 Sam Weinig <weinig@apple.com> 2 17 -
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp
r253359 r256104 236 236 ASSERT(!RunLoop::isMain()); 237 237 238 if (parameters().isRunningTest && !m_parameters.shouldNotifyPagesWhenDataRecordsWereScanned) 239 return; 240 238 241 if (m_parameters.shouldClassifyResourcesBeforeDataRecordsRemoval) 239 242 classifyPrevalentResources();
Note: See TracChangeset
for help on using the changeset viewer.