mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
5a5e541b5e
The e2e tests have been updated for `@metamask/phishing-warning@1.1.0`. The iframe case was updated with a new design, which required test changes. The third test that was meant to ensure the phishing page can't redirect to an extension page has been updated to navigate directly to the phishing warning page and setting the URL manually via query parameters, as that was the only way to test that redirect.
21 lines
636 B
HTML
21 lines
636 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Mock E2E Phishing Page</title>
|
|
</head>
|
|
<script type="text/javascript">
|
|
function setIframeSource() {
|
|
const urlSearchParams = new URLSearchParams(window.location.search);
|
|
const params = Object.fromEntries(urlSearchParams.entries());
|
|
const extensionUrl = new URL(params.extensionUrl);
|
|
document.getElementById('frame').src = `http://localhost:9999/#hostname=${encodeURIComponent(extensionUrl.hostname)}&href=${encodeURIComponent(extensionUrl.href)}`;
|
|
}
|
|
window.onload = setIframeSource;
|
|
</script>
|
|
<body>
|
|
<div>Hello</div>
|
|
<iframe id="frame" width=900 height=900>
|
|
</body>
|
|
|
|
</html>
|