1 <!DOCTYPE html><!-- webkit-test-runner [ internal:WebAPIStatisticsEnabled=true ] -->
4 <title>Test for navigator functions accessed data collection in resource load statistics</title>
5 <script src="/js-test-resources/js-test.js"></script>
9 description("Tests for navigator functions accessed data collection in ResourceLoadStatistics plist by querying for all the navigator properties and dumping the entire resource load statistics map.");
10 const hostUnderTest = "127.0.0.1:8000";
11 const statisticsUrl = "http://" + hostUnderTest + "/temp";
13 function completeTest() {
14 testRunner.dumpResourceLoadStatistics();
16 testRunner.statisticsResetToConsistentState(function() {
17 testRunner.notifyDone();
21 function runTestRunnerTest() {
22 testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
24 testRunner.installStatisticsDidScanDataRecordsCallback(completeTest);
26 var useragent = navigator.userAgent;
27 var javaenabled = navigator.javaEnabled();
28 var cookieEnabled = navigator.cookieEnabled;
29 var mimetypes = navigator.mimeTypes;
30 var plugins = navigator.plugins;
31 var appversion = navigator.appVersion;
34 if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
35 testRunner.waitUntilDone();
36 internals.setResourceLoadStatisticsEnabled(true);
37 testRunner.setWebAPIStatisticsEnabled(true);