blob: 8aabc322ca933b6e6c61778ff38ceafb4dedb278 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ internal:WebAPIStatisticsEnabled=true ] -->
<head>
<meta charset="UTF-8">
<title>Test for navigator functions accessed data collection in resource load statistics</title>
</head>
<script>
internals.setResourceLoadStatisticsEnabled(false);
</script>
<body>
<p> 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. </p>
<script>
const hostUnderTest = "127.0.0.1:8000";
const statisticsUrl = "http://" + hostUnderTest + "/temp";
function completeTest() {
testRunner.statisticsResetToConsistentState(function() {
testRunner.notifyDone();
});
}
function runTestRunnerTest() {
testRunner.setStatisticsNotifyPagesWhenDataRecordsWereScanned(true);
testRunner.installStatisticsDidScanDataRecordsCallback(completeTest);
var useragent = navigator.userAgent;
var javaenabled = navigator.javaEnabled();
var cookieEnabled = navigator.cookieEnabled;
var mimetypes = navigator.mimeTypes;
var plugins = navigator.plugins;
var appversion = navigator.appVersion;
testRunner.statisticsNotifyObserver();
}
if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
testRunner.dumpAsText();
testRunner.dumpResourceLoadStatistics();
testRunner.waitUntilDone();
internals.setResourceLoadStatisticsEnabled(true);
testRunner.setWebAPIStatisticsEnabled(true);
runTestRunnerTest();
}
</script>
</body>
</html>