Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function waitForLoad() {
- return new Promise(resolve => {
- function handleLoad() {
- window.removeEventListener("load", handleLoad);
- resolve();
- }
- window.addEventListener("load", handleLoad);
- });
- }
- add_task(async function test_no_prompt_on_navigation() {
- // If login field values were set by the website, we don't
- // prompt to save the login values if the user
- // has not interacted with the fields before submiting.
- await promiseFormsProcessed();
- let promptShown = false;
- let promptShownPromise = promisePromptShown("passwordmgr-prompt-save").then(value => {
- promptShown = true;
- });
- let loadPromise = waitForLoad();
- document.getElementById("link").click();
- await loadPromise;
- ok(!promptShown, "Prompt is not shown on navigation since the login fields were not modified");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement