Commit 969dbdee authored by Jan Wilken Dörrie's avatar Jan Wilken Dörrie Committed by Commit Bot

[Passwords] Re-enable Password Check Reauth Test on CrOS

Bug: 1120688
Change-Id: I11080aa3c7a258c124193940e8897be4ff780491
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2396124Reviewed-by: default avatardpapad <dpapad@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806586}
parent 6f1bcac9
...@@ -16,6 +16,7 @@ import {makeCompromisedCredential, makePasswordCheckStatus} from 'chrome://test ...@@ -16,6 +16,7 @@ import {makeCompromisedCredential, makePasswordCheckStatus} from 'chrome://test
import {getSyncAllPrefs,simulateSyncStatus} from 'chrome://test/settings/sync_test_util.m.js'; import {getSyncAllPrefs,simulateSyncStatus} from 'chrome://test/settings/sync_test_util.m.js';
import {TestOpenWindowProxy} from 'chrome://test/settings/test_open_window_proxy.js'; import {TestOpenWindowProxy} from 'chrome://test/settings/test_open_window_proxy.js';
import {TestPasswordManagerProxy} from 'chrome://test/settings/test_password_manager_proxy.js'; import {TestPasswordManagerProxy} from 'chrome://test/settings/test_password_manager_proxy.js';
import {eventToPromise} from 'chrome://test/test_util.m.js';
// clang-format on // clang-format on
...@@ -1191,7 +1192,7 @@ suite('PasswordsCheckSection', function() { ...@@ -1191,7 +1192,7 @@ suite('PasswordsCheckSection', function() {
checkPasswordSection.$$('settings-password-check-edit-dialog'))); checkPasswordSection.$$('settings-password-check-edit-dialog')));
}); });
if (cr.isChromeOS) { if (isChromeOS) {
// Verify that getPlaintext succeeded after auth token resolved // Verify that getPlaintext succeeded after auth token resolved
test('showHidePasswordMenuItemAuth', async function() { test('showHidePasswordMenuItemAuth', async function() {
passwordManager.data.leakedCredentials = passwordManager.data.leakedCredentials =
...@@ -1206,7 +1207,8 @@ suite('PasswordsCheckSection', function() { ...@@ -1206,7 +1207,8 @@ suite('PasswordsCheckSection', function() {
// Open the more actions menu and click 'Show Password'. // Open the more actions menu and click 'Show Password'.
node.$.more.click(); node.$.more.click();
checkPasswordSection.$.menuShowPassword.click(); checkPasswordSection.$.menuShowPassword.click();
await passwordManager.whenCalled('getPlaintextCompromisedPassword'); // Wait for the more actions menu to disappear before proceeding.
await eventToPromise('close', checkPasswordSection.$.moreActionsMenu);
// Verify that password field didn't change // Verify that password field didn't change
assertEquals('password', node.$.leakedPassword.type); assertEquals('password', node.$.leakedPassword.type);
...@@ -1214,7 +1216,6 @@ suite('PasswordsCheckSection', function() { ...@@ -1214,7 +1216,6 @@ suite('PasswordsCheckSection', function() {
passwordManager.plaintextPassword_ = 'test4'; passwordManager.plaintextPassword_ = 'test4';
node.tokenRequestManager.resolve(); node.tokenRequestManager.resolve();
passwordManager.resetResolver('getPlaintextCompromisedPassword');
await passwordManager.whenCalled('getPlaintextCompromisedPassword'); await passwordManager.whenCalled('getPlaintextCompromisedPassword');
assertEquals('text', node.$.leakedPassword.type); assertEquals('text', node.$.leakedPassword.type);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment