summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/test/browser/browser_bug557943.js
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-07-06 15:53:52 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-07-06 15:53:52 +0200
commit941e54654eabed0a3568f7fefe424a45aa02eddb (patch)
tree49aa02b174c428962d99142d8061267bfcd79e69 /toolkit/mozapps/extensions/test/browser/browser_bug557943.js
parentad9ee72dcd7981bc47b3844a224d69fadfdfd8ef (diff)
parent0daa12376295d5d796256a116eb2a348a3a9273f (diff)
downloadUXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar
UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.gz
UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.lz
UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.xz
UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.zip
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into _testBranch_test_1
Diffstat (limited to 'toolkit/mozapps/extensions/test/browser/browser_bug557943.js')
-rw-r--r--toolkit/mozapps/extensions/test/browser/browser_bug557943.js80
1 files changed, 0 insertions, 80 deletions
diff --git a/toolkit/mozapps/extensions/test/browser/browser_bug557943.js b/toolkit/mozapps/extensions/test/browser/browser_bug557943.js
deleted file mode 100644
index 94a8b6f49..000000000
--- a/toolkit/mozapps/extensions/test/browser/browser_bug557943.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-// Bug 557943 - Searching for addons can result in wrong results
-
-var gManagerWindow;
-var gProvider;
-
-function test() {
- waitForExplicitFinish();
-
- gProvider = new MockProvider();
-
- gProvider.createAddons([{
- id: "addon1@tests.mozilla.org",
- name: "Microsoft .NET Framework Assistant",
- description: "",
- version: "6.66"
- }, {
- id: "addon2@tests.mozilla.org",
- name: "AwesomeNet Addon",
- description: ""
- }, {
- id: "addon3@tests.mozilla.org",
- name: "Dictionnaire MySpell en Francais (réforme 1990)",
- description: ""
- }]);
-
- open_manager("addons://list/extension", function(aWindow) {
- gManagerWindow = aWindow;
- run_next_test();
- });
-}
-
-function end_test() {
- close_manager(gManagerWindow, function() {
- finish();
- });
-}
-
-
-function perform_search(aQuery, aCallback) {
- waitForFocus(function() {
- var searchBox = gManagerWindow.document.getElementById("header-search");
- searchBox.value = aQuery;
-
- EventUtils.synthesizeMouseAtCenter(searchBox, { }, gManagerWindow);
- EventUtils.synthesizeKey("VK_RETURN", { }, gManagerWindow);
- wait_for_view_load(gManagerWindow, function() {
- var list = gManagerWindow.document.getElementById("search-list");
- var rows = list.getElementsByTagName("richlistitem");
- aCallback(rows);
- });
- }, gManagerWindow);
-}
-
-
-add_test(function() {
- perform_search(".net", function(aRows) {
- is(aRows.length, 1, "Should only get one result");
- is(aRows[0].mAddon.id, "addon1@tests.mozilla.org", "Should get expected addon as only result");
- run_next_test();
- });
-});
-
-add_test(function() {
- perform_search("réf", function(aRows) {
- is(aRows.length, 1, "Should only get one result");
- is(aRows[0].mAddon.id, "addon3@tests.mozilla.org", "Should get expected addon as only result");
- run_next_test();
- });
-});
-
-add_test(function() {
- perform_search("javascript:void()", function(aRows) {
- is(aRows.length, 0, "Should not get any results");
- run_next_test();
- });
-});