mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 879767 - Intermittent testMasterPassword | GeckoEventExpecter - blockForEvent timeout: DOMContentLoaded. r=jmaher
This commit is contained in:
parent
a9ff0a7621
commit
c4d590d135
@ -30,12 +30,12 @@ public class testMasterPassword extends PixelTest {
|
|||||||
// Look for the 'Settings' menu if this device/OS uses it
|
// Look for the 'Settings' menu if this device/OS uses it
|
||||||
selectMenuItem("Settings");
|
selectMenuItem("Settings");
|
||||||
if (dev.type.equals("tablet")) {
|
if (dev.type.equals("tablet")) {
|
||||||
mSolo.waitForText("Privacy & Security");
|
waitForText("Privacy & Security");
|
||||||
mSolo.clickOnText("Privacy & Security");
|
mSolo.clickOnText("Privacy & Security");
|
||||||
}
|
}
|
||||||
mSolo.waitForText("^Use master password$");
|
waitForText("^Use master password$");
|
||||||
mSolo.clickOnText("^Use master password$");
|
mSolo.clickOnText("^Use master password$");
|
||||||
mSolo.waitForText("^Create Master Password$");
|
waitForText("^Create Master Password$");
|
||||||
|
|
||||||
// Verify that the OK button is not activated until both fields are filled
|
// Verify that the OK button is not activated until both fields are filled
|
||||||
closeTabletKeyboard();
|
closeTabletKeyboard();
|
||||||
@ -59,9 +59,9 @@ public class testMasterPassword extends PixelTest {
|
|||||||
mSolo.clearEditText(1);
|
mSolo.clearEditText(1);
|
||||||
mSolo.clickOnEditText(1);
|
mSolo.clickOnEditText(1);
|
||||||
mActions.sendKeys(password);
|
mActions.sendKeys(password);
|
||||||
mSolo.waitForText("^Cancel$");
|
waitForText("^Cancel$");
|
||||||
mSolo.clickOnText("^Cancel$");
|
mSolo.clickOnText("^Cancel$");
|
||||||
mSolo.waitForText("^Use master password$");
|
waitForText("^Use master password$");
|
||||||
mSolo.clickOnText("^Use master password$");
|
mSolo.clickOnText("^Use master password$");
|
||||||
mAsserter.ok(mSolo.waitForText("^Create Master Password$"), "Checking if no password was set if the action was canceled", "No password was set");
|
mAsserter.ok(mSolo.waitForText("^Create Master Password$"), "Checking if no password was set if the action was canceled", "No password was set");
|
||||||
|
|
||||||
@ -72,16 +72,15 @@ public class testMasterPassword extends PixelTest {
|
|||||||
mActions.sendKeys(password);
|
mActions.sendKeys(password);
|
||||||
|
|
||||||
// Verify that the input characters are converted to dots automatically
|
// Verify that the input characters are converted to dots automatically
|
||||||
mAsserter.ok(mSolo.waitForText("."), "waiting to convert the letters in dots", "The letters are converted in dots");
|
mAsserter.ok(waitForText("."), "waiting to convert the letters in dots", "The letters are converted in dots");
|
||||||
mSolo.clickOnButton("OK");
|
mSolo.clickOnButton("OK");
|
||||||
|
|
||||||
// Verify that the Master Password was set
|
// Verify that the Master Password was set
|
||||||
mSolo.waitForText("^Use master password$");
|
waitForText("^Use master password$");
|
||||||
mSolo.clickOnText("^Use master password$");
|
mSolo.clickOnText("^Use master password$");
|
||||||
mAsserter.ok(mSolo.searchText("Remove Master Password"), "Checking if the password is enabled", "The password is enabled");
|
mAsserter.ok(mSolo.searchText("Remove Master Password"), "Checking if the password is enabled", "The password is enabled");
|
||||||
closeTabletKeyboard();
|
clickOnButton("Cancel"); // Go back to settings menu
|
||||||
mActions.sendSpecialKey(Actions.SpecialKey.BACK); // Go back to settings menu
|
waitForText("^Settings$");
|
||||||
mSolo.waitForText("^Settings$");
|
|
||||||
mActions.sendSpecialKey(Actions.SpecialKey.BACK);// Close the Settings Menu
|
mActions.sendSpecialKey(Actions.SpecialKey.BACK);// Close the Settings Menu
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,12 +89,12 @@ public class testMasterPassword extends PixelTest {
|
|||||||
// Look for the 'Settings' menu if this device/OS uses it
|
// Look for the 'Settings' menu if this device/OS uses it
|
||||||
selectMenuItem("Settings");
|
selectMenuItem("Settings");
|
||||||
if (dev.type.equals("tablet")) {
|
if (dev.type.equals("tablet")) {
|
||||||
mSolo.waitForText("Privacy & Security");
|
waitForText("Privacy & Security");
|
||||||
mSolo.clickOnText("Privacy & Security");
|
mSolo.clickOnText("Privacy & Security");
|
||||||
}
|
}
|
||||||
mSolo.waitForText("^Use master password$");
|
waitForText("^Use master password$");
|
||||||
mSolo.clickOnText("^Use master password$");
|
mSolo.clickOnText("^Use master password$");
|
||||||
mSolo.waitForText("^Remove Master Password$");
|
waitForText("^Remove Master Password$");
|
||||||
|
|
||||||
// Verify that the OK button is not activated if the password field is empty
|
// Verify that the OK button is not activated if the password field is empty
|
||||||
closeTabletKeyboard();
|
closeTabletKeyboard();
|
||||||
@ -115,11 +114,10 @@ public class testMasterPassword extends PixelTest {
|
|||||||
mSolo.clickOnButton("OK");
|
mSolo.clickOnButton("OK");
|
||||||
|
|
||||||
// Verify that the Master Password was disabled
|
// Verify that the Master Password was disabled
|
||||||
mSolo.waitForText("^Use master password$");
|
waitForText("^Use master password$");
|
||||||
mSolo.clickOnText("^Use master password$");
|
mSolo.clickOnText("^Use master password$");
|
||||||
mAsserter.ok(mSolo.waitForText("^Create Master Password$"), "Checking if the password is disabled", "The password is disabled");
|
mAsserter.ok(waitForText("^Create Master Password$"), "Checking if the password is disabled", "The password is disabled");
|
||||||
toggleVKB(); // Close the VKB
|
clickOnButton("Cancel"); // Go back to settings menu
|
||||||
mActions.sendSpecialKey(Actions.SpecialKey.BACK); // Close the Master Password menu
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void editPasswordField(int i, String password) {
|
public void editPasswordField(int i, String password) {
|
||||||
@ -131,7 +129,7 @@ public class testMasterPassword extends PixelTest {
|
|||||||
public void noDoorhangerDisplayed(String LOGIN_URL) {
|
public void noDoorhangerDisplayed(String LOGIN_URL) {
|
||||||
mSolo.waitForText("Browser Blank Page 01 | Enter Search or Address");
|
mSolo.waitForText("Browser Blank Page 01 | Enter Search or Address");
|
||||||
loadUrl(LOGIN_URL);
|
loadUrl(LOGIN_URL);
|
||||||
mAsserter.is(mSolo.waitForText("Save password for"), false, "Doorhanger notification is hidden");
|
mAsserter.is(waitForText("Save password for"), false, "Doorhanger notification is hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doorhangerDisplayed(String LOGIN_URL) {
|
public void doorhangerDisplayed(String LOGIN_URL) {
|
||||||
@ -153,25 +151,37 @@ public class testMasterPassword extends PixelTest {
|
|||||||
// Look for the 'Settings' menu if this device/OS uses it
|
// Look for the 'Settings' menu if this device/OS uses it
|
||||||
selectMenuItem("Settings");
|
selectMenuItem("Settings");
|
||||||
if (dev.type.equals("tablet")) {
|
if (dev.type.equals("tablet")) {
|
||||||
mSolo.waitForText("Privacy & Security");
|
waitForText("Privacy & Security");
|
||||||
mSolo.clickOnText("Privacy & Security");
|
mSolo.clickOnText("Privacy & Security");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear private data
|
// Clear private data
|
||||||
mSolo.waitForText("^Clear private data$");
|
waitForText("^Clear private data$");
|
||||||
mSolo.clickOnText("^Clear private data$");
|
mSolo.clickOnText("^Clear private data$");
|
||||||
mSolo.waitForText("^Clear data$");
|
waitForText("Browsing & download history"); // Make sure the Clear private data pop-up is displayed
|
||||||
mSolo.clickOnText("^Clear data$");
|
Actions.EventExpecter clearPrivateDataEventExpecter = mActions.expectGeckoEvent("Sanitize:Finished");
|
||||||
mAsserter.ok(mSolo.waitForText("^Private data cleared$"), "Waiting for private data to be cleared", "Private data is cleared");
|
if (mSolo.searchText("Clear data") && !mSolo.searchText("Cookies")) {
|
||||||
|
mSolo.clickOnText("^Clear data$");
|
||||||
|
clearPrivateDataEventExpecter.blockForEvent();
|
||||||
|
} else { // For some reason the pop-up was not opened
|
||||||
|
if (mSolo.searchText("Cookies")) {
|
||||||
|
mSolo.clickOnText("^Clear private data$");
|
||||||
|
waitForText("Browsing & download history"); // Make sure the Clear private data pop-up is displayed
|
||||||
|
mSolo.clickOnText("^Clear data$");
|
||||||
|
clearPrivateDataEventExpecter.blockForEvent();
|
||||||
|
} else {
|
||||||
|
mAsserter.ok(false, "Something happened and the clear data dialog could not be opened", "Failed to clear data");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check that the Master Password isn't disabled by clearing private data
|
// Check that the Master Password isn't disabled by clearing private data
|
||||||
mSolo.waitForText("^Use master password$");
|
waitForText("^Use master password$");
|
||||||
mSolo.clickOnText("^Use master password$");
|
mSolo.clickOnText("^Use master password$");
|
||||||
mAsserter.ok(mSolo.searchText("^Remove Master Password$"), "Checking if the master password was disabled by clearing private data", "The master password is not disabled by clearing private data");
|
mAsserter.ok(mSolo.searchText("^Remove Master Password$"), "Checking if the master password was disabled by clearing private data", "The master password is not disabled by clearing private data");
|
||||||
closeTabletKeyboard();
|
clickOnButton("Cancel"); // Close the Master Password menu
|
||||||
mActions.sendSpecialKey(Actions.SpecialKey.BACK);// Close the Master Password menu
|
waitForText("^Settings$");
|
||||||
mSolo.waitForText("^Settings$");
|
|
||||||
mActions.sendSpecialKey(Actions.SpecialKey.BACK);// Close the Settings Menu
|
mActions.sendSpecialKey(Actions.SpecialKey.BACK);// Close the Settings Menu
|
||||||
|
waitForText("Browser Blank Page 01"); // Make sure the Settings Menu has been closed
|
||||||
}
|
}
|
||||||
|
|
||||||
public void verifyLoginPage(String password, String badPassword) {
|
public void verifyLoginPage(String password, String badPassword) {
|
||||||
@ -206,7 +216,7 @@ public class testMasterPassword extends PixelTest {
|
|||||||
mSolo.clickOnButton(item);
|
mSolo.clickOnButton(item);
|
||||||
doorhangerDisplayed(LOGIN_URL);// Check that the doorhanger is displayed again
|
doorhangerDisplayed(LOGIN_URL);// Check that the doorhanger is displayed again
|
||||||
mSolo.clickOnButton(item);
|
mSolo.clickOnButton(item);
|
||||||
mSolo.waitForText("Browser Blank Page 01");
|
waitForText("Browser Blank Page 01");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user