mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Backed out changeset f0ba03f01bb7 (bug 1605494) for causing failures in browser_osAuthDialog.js CLOSED TREE
--HG-- extra : rebase_source : 85f6968ea201b69862fef763b86ddd1f495fbc5b extra : amend_source : a4608e5508a660f9009614d1c4bf9f3f5f8d0b78
This commit is contained in:
parent
7e00a110ab
commit
49781453d1
@ -3,9 +3,9 @@ support-files =
|
||||
head.js
|
||||
|
||||
# Run first so content events from previous tests won't trickle in.
|
||||
# Skip ASAN and debug since waiting for content events is already slow.
|
||||
# Skip ASAN since waiting for content events is already slow.
|
||||
[browser_aaa_eventTelemetry_run_first.js]
|
||||
skip-if = asan || debug
|
||||
skip-if = asan || (os == 'linux') # bug 1605494 is more prevalent on linux
|
||||
[browser_breachAlertDismissals.js]
|
||||
skip-if = asan || debug || verify # bug 1574023
|
||||
[browser_breachAlertShowingForAddedLogin.js]
|
||||
@ -30,9 +30,11 @@ skip-if = (os != "win" && os != "mac") # import is only available on Windows and
|
||||
[browser_openPreferences.js]
|
||||
[browser_openPreferencesExternal.js]
|
||||
[browser_openSite.js]
|
||||
skip-if = !debug # test relies on edit mode which is only testable in debug builds
|
||||
[browser_osAuthDialog.js]
|
||||
skip-if = (os == 'linux') # bug 1527745
|
||||
skip-if = ((os == 'linux') || !debug) # bug 1527745
|
||||
[browser_sessionRestore.js]
|
||||
skip-if = debug # Bug 1576876
|
||||
[browser_tabKeyNav.js]
|
||||
[browser_updateLogin.js]
|
||||
skip-if = !debug # test relies on edit mode which is only testable in debug builds
|
||||
|
@ -138,7 +138,7 @@ add_task(async function test_login_item() {
|
||||
|
||||
let onDeletePromise;
|
||||
if (OSKeyStoreTestUtils.canTestOSKeyStoreLogin()) {
|
||||
// Can only test Edit mode in official builds
|
||||
// Can only test Edit mode in debug builds
|
||||
onDeletePromise = waitForDelete();
|
||||
await deleteFirstLoginAfterEdit();
|
||||
await onDeletePromise;
|
||||
|
@ -25,16 +25,16 @@ add_task(async function test_showLoginItemErrors() {
|
||||
);
|
||||
LOGIN_TO_UPDATE = Services.logins.addLogin(LOGIN_TO_UPDATE);
|
||||
EXPECTED_ERROR_MESSAGE = "This login already exists.";
|
||||
const LOGIN_UPDATES = {
|
||||
origin: "https://example.com",
|
||||
password: "my1GoodPassword",
|
||||
username: "user1",
|
||||
};
|
||||
|
||||
await SpecialPowers.spawn(
|
||||
browser,
|
||||
[[LoginHelper.loginToVanillaObject(LOGIN_TO_UPDATE), LOGIN_UPDATES]],
|
||||
async ([loginToUpdate, loginUpdates]) => {
|
||||
[
|
||||
[
|
||||
LoginHelper.loginToVanillaObject(LOGIN_TO_UPDATE),
|
||||
OSKeyStoreTestUtils.canTestOSKeyStoreLogin(),
|
||||
],
|
||||
],
|
||||
async ([loginToUpdate, canTestOSKeyStoreLogin]) => {
|
||||
const loginItem = Cu.waiveXrays(
|
||||
content.document.querySelector("login-item")
|
||||
);
|
||||
@ -48,6 +48,12 @@ add_task(async function test_showLoginItemErrors() {
|
||||
const createButton = loginList._createLoginButton;
|
||||
createButton.click();
|
||||
|
||||
const loginUpdates = {
|
||||
origin: "https://example.com",
|
||||
password: "my1GoodPassword",
|
||||
username: "user1",
|
||||
};
|
||||
|
||||
const event = Cu.cloneInto(
|
||||
{
|
||||
bubbles: true,
|
||||
@ -102,20 +108,12 @@ add_task(async function test_showLoginItemErrors() {
|
||||
loginItemErrorMessage.hidden,
|
||||
"The error message should no longer be visible."
|
||||
);
|
||||
}
|
||||
);
|
||||
if (!OSKeyStoreTestUtils.canTestOSKeyStoreLogin()) {
|
||||
// The rest of the test uses Edit mode which causes an OS prompt in official builds.
|
||||
return;
|
||||
}
|
||||
let reauthObserved = OSKeyStoreTestUtils.waitForOSKeyStoreLogin(true);
|
||||
await SpecialPowers.spawn(
|
||||
browser,
|
||||
[[LoginHelper.loginToVanillaObject(LOGIN_TO_UPDATE), LOGIN_UPDATES]],
|
||||
async ([loginToUpdate, loginUpdates]) => {
|
||||
const loginItem = Cu.waiveXrays(
|
||||
content.document.querySelector("login-item")
|
||||
);
|
||||
|
||||
if (!canTestOSKeyStoreLogin) {
|
||||
// The rest of the test uses Edit mode which causes an OS prompt in opt builds.
|
||||
return;
|
||||
}
|
||||
|
||||
const editButton = loginItem.shadowRoot.querySelector(".edit-button");
|
||||
editButton.click();
|
||||
|
||||
@ -132,9 +130,6 @@ add_task(async function test_showLoginItemErrors() {
|
||||
new content.CustomEvent("AboutLoginsUpdateLogin", updateEvent)
|
||||
);
|
||||
|
||||
const loginItemErrorMessage = Cu.waiveXrays(
|
||||
loginItem.shadowRoot.querySelector(".error-message")
|
||||
);
|
||||
const loginAlreadyExistsErrorShownAfterUpdate = await ContentTaskUtils.waitForCondition(
|
||||
() => {
|
||||
return !loginItemErrorMessage.hidden;
|
||||
@ -147,8 +142,5 @@ add_task(async function test_showLoginItemErrors() {
|
||||
);
|
||||
}
|
||||
);
|
||||
info("making sure os auth dialog is shown");
|
||||
await reauthObserved;
|
||||
info("saw os auth dialog");
|
||||
EXPECTED_ERROR_MESSAGE = null;
|
||||
});
|
||||
|
@ -25,8 +25,8 @@ add_task(async function test_sort_order_persisted() {
|
||||
async function(browser) {
|
||||
await ContentTask.spawn(
|
||||
browser,
|
||||
[TEST_LOGIN1.guid, TEST_LOGIN2.guid],
|
||||
async function([testLogin1Guid, testLogin2Guid]) {
|
||||
[TEST_LOGIN1, TEST_LOGIN2],
|
||||
async function([testLogin1, testLogin2]) {
|
||||
let loginList = Cu.waiveXrays(
|
||||
content.document.querySelector("login-list")
|
||||
);
|
||||
@ -39,7 +39,7 @@ add_task(async function test_sort_order_persisted() {
|
||||
loginList._list.querySelector(
|
||||
".login-list-item[data-guid]:not([hidden])"
|
||||
).dataset.guid,
|
||||
testLogin2Guid,
|
||||
testLogin2.guid,
|
||||
"the first login should be TEST_LOGIN2 since they are sorted by origin"
|
||||
);
|
||||
|
||||
@ -51,7 +51,7 @@ add_task(async function test_sort_order_persisted() {
|
||||
loginList._list.querySelector(
|
||||
".login-list-item[data-guid]:not([hidden])"
|
||||
).dataset.guid,
|
||||
testLogin1Guid,
|
||||
testLogin1.guid,
|
||||
"the first login should be TEST_LOGIN1 since it has the most recent timePasswordChanged value"
|
||||
);
|
||||
}
|
||||
@ -65,9 +65,7 @@ add_task(async function test_sort_order_persisted() {
|
||||
url: "about:logins",
|
||||
},
|
||||
async function(browser) {
|
||||
await ContentTask.spawn(browser, TEST_LOGIN1.guid, async function(
|
||||
testLogin1Guid
|
||||
) {
|
||||
await ContentTask.spawn(browser, TEST_LOGIN1, async function(testLogin1) {
|
||||
let loginList = Cu.waiveXrays(
|
||||
content.document.querySelector("login-list")
|
||||
);
|
||||
@ -80,7 +78,7 @@ add_task(async function test_sort_order_persisted() {
|
||||
loginList._list.querySelector(
|
||||
".login-list-item[data-guid]:not([hidden])"
|
||||
).dataset.guid,
|
||||
testLogin1Guid,
|
||||
testLogin1.guid,
|
||||
"the first login should still be TEST_LOGIN1 since it has the most recent timePasswordChanged value"
|
||||
);
|
||||
});
|
||||
|
@ -22,30 +22,6 @@ add_task(async function test_launch_login_item() {
|
||||
);
|
||||
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
|
||||
await SpecialPowers.spawn(browser, [], async () => {
|
||||
let loginItem = Cu.waiveXrays(content.document.querySelector("login-item"));
|
||||
let originInput = loginItem.shadowRoot.querySelector("a[name='origin']");
|
||||
let EventUtils = ContentTaskUtils.getEventUtils(content);
|
||||
// Use synthesizeMouseAtCenter to generate an event that more closely resembles the
|
||||
// properties of the event object that will be seen when the user clicks the element
|
||||
// (.click() sets originalTarget while synthesizeMouse has originalTarget as a Restricted object).
|
||||
await EventUtils.synthesizeMouseAtCenter(originInput, {}, content);
|
||||
});
|
||||
|
||||
info("waiting for new tab to get opened");
|
||||
let newTab = await promiseNewTab;
|
||||
ok(true, "New tab opened to " + TEST_LOGIN1.origin);
|
||||
BrowserTestUtils.removeTab(newTab);
|
||||
|
||||
if (!OSKeyStoreTestUtils.canTestOSKeyStoreLogin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
promiseNewTab = BrowserTestUtils.waitForNewTab(
|
||||
gBrowser,
|
||||
TEST_LOGIN1.origin + "/"
|
||||
);
|
||||
let reauthObserved = OSKeyStoreTestUtils.waitForOSKeyStoreLogin(true);
|
||||
await SpecialPowers.spawn(browser, [], async () => {
|
||||
let loginItem = Cu.waiveXrays(content.document.querySelector("login-item"));
|
||||
@ -70,7 +46,7 @@ add_task(async function test_launch_login_item() {
|
||||
});
|
||||
|
||||
info("waiting for new tab to get opened");
|
||||
newTab = await promiseNewTab;
|
||||
let newTab = await promiseNewTab;
|
||||
ok(true, "New tab opened to " + TEST_LOGIN1.origin);
|
||||
|
||||
let modifiedLogin = TEST_LOGIN1.clone();
|
||||
|
@ -30,10 +30,6 @@ add_task(async function test_show_logins() {
|
||||
});
|
||||
|
||||
add_task(async function test_login_item() {
|
||||
if (!OSKeyStoreTestUtils.canTestOSKeyStoreLogin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
async function test_discard_dialog(login, exitPointSelector) {
|
||||
let loginItem = Cu.waiveXrays(content.document.querySelector("login-item"));
|
||||
let loginList = Cu.waiveXrays(content.document.querySelector("login-list"));
|
||||
|
@ -20,11 +20,6 @@ ChromeUtils.defineModuleGetter(
|
||||
"AppConstants",
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"UpdateUtils",
|
||||
"resource://gre/modules/UpdateUtils.jsm"
|
||||
);
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
this,
|
||||
"nativeOSKeyStore",
|
||||
@ -176,11 +171,7 @@ var OSKeyStore = {
|
||||
|
||||
let unlockPromise;
|
||||
if (typeof reauth == "string") {
|
||||
// Only allow for local builds
|
||||
if (
|
||||
UpdateUtils.getUpdateChannel(false) == "default" &&
|
||||
this._testReauth
|
||||
) {
|
||||
if (AppConstants.DEBUG && this._testReauth) {
|
||||
unlockPromise = this._reauthInTests();
|
||||
} else if (
|
||||
AppConstants.platform == "win" ||
|
||||
|
@ -9,11 +9,6 @@ ChromeUtils.import("resource:///modules/OSKeyStore.jsm", this);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"UpdateUtils",
|
||||
"resource://gre/modules/UpdateUtils.jsm"
|
||||
);
|
||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
const { TestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/TestUtils.jsm"
|
||||
@ -44,10 +39,7 @@ var OSKeyStoreTestUtils = {
|
||||
*/
|
||||
canTestOSKeyStoreLogin() {
|
||||
// Skip on Linux due to bug 1527745.
|
||||
return (
|
||||
UpdateUtils.getUpdateChannel(false) == "default" &&
|
||||
AppConstants.platform != "linux"
|
||||
);
|
||||
return AppConstants.DEBUG && AppConstants.platform != "linux";
|
||||
},
|
||||
|
||||
// Wait for the observer message that simulates login success of failure.
|
||||
|
@ -8,6 +8,7 @@ skip-if = toolkit == 'android'
|
||||
[test_HomePage_ignore.js]
|
||||
[test_LiveBookmarkMigrator.js]
|
||||
[test_osKeyStore.js]
|
||||
skip-if = !debug # test relies on osKeyStore reauth which is only testable in debug builds
|
||||
[test_Sanitizer_interrupted.js]
|
||||
[test_SitePermissions.js]
|
||||
[test_SiteDataManager.js]
|
||||
|
Loading…
Reference in New Issue
Block a user