[GTK] Do not use g_return_if_fail in EventSenderProxy::continuousMouseScrollBy
[WebKit-https.git] / LayoutTests / http / tests / loading / resourceLoadStatistics / classify-as-non-prevalent-based-on-subresource-unique-redirects-to.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4     <meta charset="UTF-8">
5     <title>Tests for Classification Based on Subresource Unique Redirects To</title>
6     <script src="../../resources/js-test-pre.js"></script>
7 </head>
8 <body>
9 <script>
10     const hostUnderTest = "127.0.0.1:8000";
11     const statisticsUrl = "http://" + hostUnderTest + "/temp";
12     const topFrameOrigin1 = "http://127.0.0.2:8000/temp";
13     const topFrameOrigin2 = "http://127.0.0.3:8000/temp";
14     function runTestRunnerTest() {
15         testRunner.setStatisticsPrevalentResource(statisticsUrl, false);
16         if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
17             testFailed("Host did not get set as non-prevalent resource.");
18
19         testRunner.setStatisticsSubresourceUniqueRedirectTo(statisticsUrl, topFrameOrigin1);
20         testRunner.setStatisticsSubresourceUniqueRedirectTo(statisticsUrl, topFrameOrigin2);
21
22         testRunner.statisticsFireDataModificationHandler();
23
24         if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
25             testFailed("Host classified as prevalent resource.");
26         else
27             testPassed("Host did not get classified as prevalent resource.");
28
29         testRunner.statisticsResetToConsistentState();
30         testRunner.notifyDone();
31     }
32
33     if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
34         testRunner.waitUntilDone();
35         internals.setResourceLoadStatisticsEnabled(true);
36         runTestRunnerTest();
37     }
38 </script>
39 </body>
40 </html>