зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1251098 - pwmgr: Enable test_recipe_login_fields.html in e10s. r=dolske
MozReview-Commit-ID: G0446CyBc4D --HG-- rename : toolkit/components/passwordmgr/test/mochitest.ini => toolkit/components/passwordmgr/test/mochitest/mochitest.ini rename : toolkit/components/passwordmgr/test/test_recipe_login_fields.html => toolkit/components/passwordmgr/test/mochitest/test_recipe_login_fields.html
This commit is contained in:
Родитель
b0a3337efd
Коммит
dd41ede7e4
|
@ -7,7 +7,7 @@
|
|||
if CONFIG['MOZ_BUILD_APP'] == 'browser':
|
||||
DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
|
||||
|
||||
MOCHITEST_MANIFESTS += ['test/mochitest.ini']
|
||||
MOCHITEST_MANIFESTS += ['test/mochitest.ini', 'test/mochitest/mochitest.ini']
|
||||
MOCHITEST_CHROME_MANIFESTS += ['test/chrome/chrome.ini']
|
||||
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
|
||||
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
|
||||
|
|
|
@ -71,8 +71,6 @@ skip-if = os == "linux" || toolkit == 'android' # bug 934057
|
|||
skip-if = os == "linux" || toolkit == 'android' #TIMED_OUT
|
||||
[test_prompt_async.html]
|
||||
skip-if = toolkit == 'android' #TIMED_OUT
|
||||
[test_recipe_login_fields.html]
|
||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g'
|
||||
[test_xhr.html]
|
||||
skip-if = toolkit == 'android' #TIMED_OUT
|
||||
[test_xhr_2.html]
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
[DEFAULT]
|
||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g'
|
||||
support-files =
|
||||
../pwmgr_common.js
|
||||
|
||||
[test_recipe_login_fields.html]
|
|
@ -10,15 +10,15 @@
|
|||
<script type="application/javascript;version=1.8">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
let parentScriptURL = SimpleTest.getTestFileURL("pwmgr_common.js");
|
||||
mm = SpecialPowers.loadChromeScript(parentScriptURL);
|
||||
const PWMGR_COMMON_URL = SimpleTest.getTestFileURL("pwmgr_common.js");
|
||||
let pwmgrCommonScript = SpecialPowers.loadChromeScript(PWMGR_COMMON_URL);
|
||||
|
||||
// Tell the parent to setup test logins.
|
||||
mm.sendAsyncMessage("setupParent");
|
||||
pwmgrCommonScript.sendAsyncMessage("setupParent");
|
||||
|
||||
// When the setup is done, load a recipe for this test.
|
||||
mm.addMessageListener("doneSetup", function doneSetup() {
|
||||
mm.sendAsyncMessage("loadRecipes", {
|
||||
pwmgrCommonScript.addMessageListener("doneSetup", function doneSetup() {
|
||||
pwmgrCommonScript.sendAsyncMessage("loadRecipes", {
|
||||
siteRecipes: [{
|
||||
hosts: ["mochi.test:8888"],
|
||||
usernameSelector: "input[name='uname1']",
|
||||
|
@ -27,7 +27,7 @@ mm.addMessageListener("doneSetup", function doneSetup() {
|
|||
});
|
||||
});
|
||||
|
||||
mm.addMessageListener("loadedRecipes", function loadedRecipes() {
|
||||
pwmgrCommonScript.addMessageListener("loadedRecipes", function loadedRecipes() {
|
||||
// Append the form dynamically so autofill is triggered after setup above.
|
||||
document.getElementById("content").innerHTML += `
|
||||
<!-- form with recipe for the username and password -->
|
||||
|
@ -45,6 +45,7 @@ let fillCount = 0;
|
|||
function reportFill(element, expected) {
|
||||
ok(expected, `${element.name} was filled`);
|
||||
if (++fillCount == EXPECTED_FILLS) {
|
||||
pwmgrCommonScript.destroy();
|
||||
SimpleTest.finish();
|
||||
} else if (fillCount == 2) {
|
||||
document.getElementById("content").innerHTML = `
|
Загрузка…
Ссылка в новой задаче