Files
sousa-gecko/browser/base/content/test/browser-framebusting/framebusting_intervention_frame.html
T
Mark Banner a0364d50fd Bug 2069131 - Rename most browser/base/content/test browser-chrome directories to match eslint-test-paths conventions. r=frontend-codestyle-reviewers,Gijs
This handles most of the directories, where the changes required do not affect tests outside of the browser/base/content/test directory.

Differential Revision: https://phabricator.services.mozilla.com/D323419
2026-09-11 15:27:28 +00:00

46 lines
1.2 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>Framebusting Intervention - Frame</title>
</head>
<body>
<form id="form" method="post" target="_top"></form>
<a id="link" target="_top"></a>
<script>
const form = document.getElementById("form");
const link = document.getElementById("link");
const params = new URLSearchParams(location.search);
if (self != top) {
try {
switch (params.get("variant")) {
case null:
case "top":
top.location = self.location;
break;
case "open":
self.open(self.location, "_top");
break;
case "form":
form.action = self.location;
form.submit();
break;
case "link":
link.href = self.location;
link.click();
break;
case "mailto":
top.location = "mailto:example@example.com";
break;
default:
throw Error("Invalid variant!");
}
} catch (err) {
if (err.name !== "SecurityError") throw err;
}
}
</script>
</body>
</html>