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
32 lines
748 B
HTML
32 lines
748 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>Tracker</h1>
|
|
<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) {
|
|
let runnableStr = `(() => {return (${e.data.callback});})();`;
|
|
let runnable = eval(runnableStr); // eslint-disable-line no-eval
|
|
runnable.call(this, e.data.arg || /* Phase */ 3).then(_ => {
|
|
parent.postMessage({ type: "finish" }, "*");
|
|
});
|
|
};
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|