[GTK] Do not use g_return_if_fail in EventSenderProxy::continuousMouseScrollBy
[WebKit-https.git] / LayoutTests / http / tests / loading / resourceLoadStatistics / classify-as-prevalent-based-on-mixed-statistics.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4     <meta charset="UTF-8">
5     <title>Tests for Classification Based on Mixed Statistics</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     const topFrameOrigin3 = "http://127.0.0.4:8000/temp";
15     const topFrameOrigin4 = "http://127.0.0.5:8000/temp";
16     function runTestRunnerTest() {
17         testRunner.setStatisticsPrevalentResource(statisticsUrl, false);
18         if (testRunner.isStatisticsPrevalentResource(statisticsUrl))
19             testFailed("Host did not get set as non-prevalent resource.");
20
21         testRunner.setStatisticsSubframeUnderTopFrameOrigin(statisticsUrl, topFrameOrigin1);
22         testRunner.setStatisticsSubframeUnderTopFrameOrigin(statisticsUrl, topFrameOrigin4);
23
24         testRunner.setStatisticsSubresourceUnderTopFrameOrigin(statisticsUrl, topFrameOrigin2);
25         testRunner.setStatisticsSubresourceUnderTopFrameOrigin(statisticsUrl, topFrameOrigin3);
26         testRunner.setStatisticsSubresourceUnderTopFrameOrigin(statisticsUrl, topFrameOrigin4);
27
28         testRunner.setStatisticsSubresourceUniqueRedirectTo(statisticsUrl, topFrameOrigin3);
29         testRunner.setStatisticsSubresourceUniqueRedirectTo(statisticsUrl, topFrameOrigin1);
30
31         testRunner.statisticsFireDataModificationHandler();
32
33         if (!testRunner.isStatisticsPrevalentResource(statisticsUrl))
34             testFailed("Host did not get classified as prevalent resource.");
35         else
36             testPassed("Host classified as prevalent resource.");
37
38         testRunner.statisticsResetToConsistentState();
39         testRunner.notifyDone();
40     }
41
42     if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
43         testRunner.waitUntilDone();
44         internals.setResourceLoadStatisticsEnabled(true);
45         runTestRunnerTest();
46     }
47 </script>
48 </body>
49 </html>