mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-07 11:48:19 +02:00
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
41 lines
851 B
HTML
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>
|