blob: ce65c6629869321b208f6b66d09816225bdb55e3 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ WebAPIStatisticsEnabled=true ] -->
<head>
<meta charset="UTF-8">
<title>Test for screen functions accessed data collection in resource load statistics</title>
</head>
<script>
internals.setResourceLoadStatisticsEnabled(false);
</script>
<body>
<p> Tests for screen functions accessed data collection in ResourceLoadStatistics plist by querying for all the screen 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.installStatisticsDidScanDataRecordsCallback(completeTest);
var availTop = screen.availTop;
var colorDepth = screen.colorDepth;
var pixelDepth = screen.pixelDepth;
var height = screen.height;
var width = screen.width;
var availLeft = screen.availLeft;
var availHeight = screen.availHeight;
var availWidth = screen.availWidth;
testRunner.statisticsNotifyObserver();
}
if (document.location.host === hostUnderTest && window.testRunner && window.internals) {
testRunner.dumpAsText();
testRunner.dumpResourceLoadStatistics();
testRunner.waitUntilDone();
internals.setResourceLoadStatisticsEnabled(true);
runTestRunnerTest();
}
</script>
</body>
</html>