blob: 17b25cc830185af3154402f9506f2f5dcea193b1 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
<script>
function test()
{
let suite = InspectorTest.createAsyncSuite("Page.overrideSetting");
suite.addTestCase({
name: "Page.overrideSetting.PrivateClickMeasurementDebugModeEnabled",
description: "Test that changing whether private click measurement debug mode is enabled has an effect.",
test(resolve, reject) {
let listener = WI.consoleManager.addEventListener(WI.ConsoleManager.Event.MessageAdded, (event) => {
let {message} = event.data;
if (message.source !== WI.ConsoleMessage.MessageSource.PrivateClickMeasurement)
return;
InspectorTest.pass("Should broadcast at least one console message.");
WI.consoleManager.removeEventListener(WI.ConsoleManager.Event.MessageAdded, listener);
resolve();
});
InspectorTest.log("Enabling private click measurement debug mode...");
PageAgent.overrideSetting(InspectorBackend.Enum.Page.Setting.PrivateClickMeasurementDebugModeEnabled, true).catch(reject);
},
});
suite.runTestCasesAndFinish();
}
</script>
</head>
<body onload="runTest()">
<p>Tests for the Page.overrideSetting command.</p>
</body>
</html>