diff options
Diffstat (limited to 'toolkit/components/formautofill/test/browser')
6 files changed, 0 insertions, 169 deletions
diff --git a/toolkit/components/formautofill/test/browser/.eslintrc.js b/toolkit/components/formautofill/test/browser/.eslintrc.js deleted file mode 100644 index 7c8021192..000000000 --- a/toolkit/components/formautofill/test/browser/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = { - "extends": [ - "../../../../../testing/mochitest/browser.eslintrc.js" - ] -}; diff --git a/toolkit/components/formautofill/test/browser/browser.ini b/toolkit/components/formautofill/test/browser/browser.ini deleted file mode 100644 index dff9c3381..000000000 --- a/toolkit/components/formautofill/test/browser/browser.ini +++ /dev/null @@ -1,10 +0,0 @@ -[DEFAULT] -# The following files starting with ".." are installed in the current folder. -support-files = - ../head_common.js - ../loader_common.js - head.js - loader.js - -[browser_infrastructure.js] -[browser_ui_requestAutocomplete.js] diff --git a/toolkit/components/formautofill/test/browser/browser_infrastructure.js b/toolkit/components/formautofill/test/browser/browser_infrastructure.js deleted file mode 100644 index af27cfdb5..000000000 --- a/toolkit/components/formautofill/test/browser/browser_infrastructure.js +++ /dev/null @@ -1,48 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ */ - -/* - * Tests the local testing infrastructure. - */ - -"use strict"; - -/** - * Tests the truth assertion function. - */ -add_task(function* test_assert_truth() { - Assert.ok(1 != 2); -}); - -/** - * Tests the equality assertion function. - */ -add_task(function* test_assert_equality() { - Assert.equal(1 + 1, 2); -}); - -/** - * Uses some of the utility functions provided by the framework. - */ -add_task(function* test_utility_functions() { - // The "print" function is useful to log information that is not known before. - let randomString = "R" + Math.floor(Math.random() * 10); - Output.print("The random contents will be '" + randomString + "'."); - - // Create the text file with the random contents. - let path = yield TestUtils.getTempFile("test-infrastructure.txt"); - yield OS.File.writeAtomic(path, new TextEncoder().encode(randomString)); - - // Test a few utility functions. - yield TestUtils.waitForTick(); - yield TestUtils.waitMs(50); - - let promiseMyNotification = TestUtils.waitForNotification("my-topic"); - Services.obs.notifyObservers(null, "my-topic", ""); - yield promiseMyNotification; - - // Check the file size. The file will be deleted automatically later. - Assert.equal((yield OS.File.stat(path)).size, randomString.length); -}); - -add_task(terminationTaskFn); diff --git a/toolkit/components/formautofill/test/browser/browser_ui_requestAutocomplete.js b/toolkit/components/formautofill/test/browser/browser_ui_requestAutocomplete.js deleted file mode 100644 index 2a7b58f12..000000000 --- a/toolkit/components/formautofill/test/browser/browser_ui_requestAutocomplete.js +++ /dev/null @@ -1,48 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ */ - -/* - * Tests the requestAutocomplete user interface. - */ - -"use strict"; - -/** - * Open the requestAutocomplete UI and test that selecting a profile results in - * the correct data being sent back to the opener. - */ -add_task(function* test_select_profile() { - // Request an e-mail address. - let { uiWindow, promiseResult } = yield FormAutofillTest.showUI( - TestData.requestEmailOnly); - - // Accept the dialog. - let acceptButton = uiWindow.document.getElementById("accept"); - EventUtils.synthesizeMouseAtCenter(acceptButton, {}, uiWindow); - - let result = yield promiseResult; - Assert.equal(result.fields.length, 1); - Assert.equal(result.fields[0].section, ""); - Assert.equal(result.fields[0].addressType, ""); - Assert.equal(result.fields[0].contactType, ""); - Assert.equal(result.fields[0].fieldName, "email"); - Assert.equal(result.fields[0].value, "email@example.org"); -}); - -/** - * Open the requestAutocomplete UI and cancel the dialog. - */ -add_task(function* test_cancel() { - // Request an e-mail address. - let { uiWindow, promiseResult } = yield FormAutofillTest.showUI( - TestData.requestEmailOnly); - - // Cancel the dialog. - let acceptButton = uiWindow.document.getElementById("cancel"); - EventUtils.synthesizeMouseAtCenter(acceptButton, {}, uiWindow); - - let result = yield promiseResult; - Assert.ok(result.canceled); -}); - -add_task(terminationTaskFn); diff --git a/toolkit/components/formautofill/test/browser/head.js b/toolkit/components/formautofill/test/browser/head.js deleted file mode 100644 index 882f3fd5e..000000000 --- a/toolkit/components/formautofill/test/browser/head.js +++ /dev/null @@ -1,18 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ */ - -/* - * Initialization specific to Form Autofill mochitest-browser tests. - */ - -"use strict"; - -// We cannot start initialization from "loader.js" like we do in the xpcshell -// and mochitest-chrome frameworks, thus we load the script here. -Services.scriptloader.loadSubScript(getRootDirectory(gTestPath) + "loader.js", - this); - -// The testing framework is fully initialized at this point, you can add -// mochitest-browser specific test initialization here. If you need shared -// functions or initialization that are not specific to mochitest-browser, -// consider adding them to "head_common.js" in the parent folder instead. diff --git a/toolkit/components/formautofill/test/browser/loader.js b/toolkit/components/formautofill/test/browser/loader.js deleted file mode 100644 index bfd5b9ee0..000000000 --- a/toolkit/components/formautofill/test/browser/loader.js +++ /dev/null @@ -1,38 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ */ - -/* - * Infrastructure for the mochitest-browser tests located in this folder. - * - * See "loader_common.js" in the parent folder for a general overview. - * - * Unless you are adding new features to the framework, you shouldn't have to - * modify this file. Use "head_common.js" or "head.js" for shared code. - */ - -"use strict"; - -Services.scriptloader.loadSubScript(getRootDirectory(gTestPath) + - "loader_common.js", this); - -// Define output functions so they look the same across all frameworks. -var Output = { - print: info, -}; - -// Define assertion functions so they look the same across all frameworks. -var Assert = { - ok: _mochitestAssert.ok, - equal: _mochitestAssert.equal, -}; - -// Define task registration functions, see description in "loader_common.js". -var add_task_in_parent_process = add_task; -var add_task_in_child_process = function () {}; -var add_task_in_both_processes = add_task; - -Services.scriptloader.loadSubScript(getRootDirectory(gTestPath) + - "head_common.js", this); - -// Reminder: unless you are adding new features to the framework, you shouldn't -// have to modify this file. Use "head_common.js" or "head.js" for shared code. |