gecko-dev/toolkit/components/antitracking/test/browser/3rdPartyRelay.html
Ehsan Akhgari b8a41d0a49 Bug 1599959 - Enable ETP heuristics for doubly(+) nested contexts; r=baku
Currently our ETP heuristic grant criteria is overly restrictive,
requiring the content that triggers the heuristic to be a single
level tracking content.  This means that the potential benefits of
our heuristics are limited as well.

This patch enhances our heuristics to cover all levels of nesting.

Differential Revision: https://phabricator.services.mozilla.com/D58893

--HG--
rename : toolkit/components/antitracking/test/browser/3rdPartyUI.html => toolkit/components/antitracking/test/browser/3rdPartyRelay.html
extra : moz-landing-system : lando
2020-01-08 10:27:29 +00:00

41 lines
851 B
HTML

<html>
<head>
<title>Tracker</title>
<script type="text/javascript" src="https://example.com/browser/toolkit/components/antitracking/test/browser/storageAccessAPIHelpers.js"></script>
</head>
<body>
<h1>Relay</h1>
<iframe></iframe>
<script>
function info(msg) {
parent.postMessage({ type: "info", msg }, "*");
}
function ok(what, msg) {
parent.postMessage({ type: "ok", what: !!what, msg }, "*");
}
function is(a, b, msg) {
ok(a === b, msg);
}
onmessage = function(e) {
switch (e.data.type || "") {
case "finish":
case "ok":
case "info":
parent.postMessage(e.data, "*");
break;
default:
let iframe = document.querySelector("iframe");
iframe.contentWindow.postMessage(e.data, "*");
break;
}
};
document.querySelector("iframe").src = location.search.substr(1);
</script>
</body>
</html>