blob: fadf11d7c1c15f48aa4305e1044f7756496eed82 [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.AdClickAttributionDebugModeEnabled",
description: "Test that changing whether ad click attribution 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.AdClickAttribution)
return;
InspectorTest.pass("Should broadcast at least one console message.");
WI.consoleManager.removeEventListener(WI.ConsoleManager.Event.MessageAdded, listener);
resolve();
});
InspectorTest.log("Enabling ad click attribution debug mode...");
PageAgent.overrideSetting(InspectorBackend.Enum.Page.Setting.AdClickAttributionDebugModeEnabled, true).catch(reject);
},
});
suite.runTestCasesAndFinish();
}
</script>
</head>
<body onload="runTest()">
<p>Tests for the Page.overrideSetting command.</p>
</body>
</html>