summaryrefslogtreecommitdiffstats
path: root/toolkit/components/filepicker
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-25 15:07:00 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:55:19 +0200
commiteb70e6e3d0bff11c25f14b1196025791bf2308fb (patch)
tree5ef4ce17db83c74d7b05ec12c8f59e095a6dd5bd /toolkit/components/filepicker
parent32ead795290b3399d56b4708fc75b77d296f6a1a (diff)
downloadUXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.gz
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.lz
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.xz
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.zip
Issue #439 - Remove tests from toolkit/
Diffstat (limited to 'toolkit/components/filepicker')
-rw-r--r--toolkit/components/filepicker/moz.build24
-rw-r--r--toolkit/components/filepicker/test/unit/.eslintrc.js7
-rw-r--r--toolkit/components/filepicker/test/unit/test_filecomplete.js45
-rw-r--r--toolkit/components/filepicker/test/unit/xpcshell.ini7
4 files changed, 9 insertions, 74 deletions
diff --git a/toolkit/components/filepicker/moz.build b/toolkit/components/filepicker/moz.build
index 0990cb00f..961912068 100644
--- a/toolkit/components/filepicker/moz.build
+++ b/toolkit/components/filepicker/moz.build
@@ -4,22 +4,16 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+XPIDL_SOURCES += ['nsIFileView.idl']
+
XPIDL_MODULE = 'filepicker'
-XPIDL_SOURCES += [
- 'nsIFileView.idl',
-]
-SOURCES += [
- 'nsFileView.cpp',
-]
-EXTRA_COMPONENTS += [
- 'nsFilePicker.js',
-]
-EXTRA_PP_COMPONENTS += [
- 'nsFilePicker.manifest',
-]
-XPCSHELL_TESTS_MANIFESTS += [
- 'test/unit/xpcshell.ini',
-]
+
+SOURCES += ['nsFileView.cpp']
+
+EXTRA_COMPONENTS += ['nsFilePicker.js']
+
+EXTRA_PP_COMPONENTS += ['nsFilePicker.manifest']
+
FINAL_LIBRARY = 'xul'
JAR_MANIFESTS += ['jar.mn']
diff --git a/toolkit/components/filepicker/test/unit/.eslintrc.js b/toolkit/components/filepicker/test/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2..000000000
--- a/toolkit/components/filepicker/test/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/filepicker/test/unit/test_filecomplete.js b/toolkit/components/filepicker/test/unit/test_filecomplete.js
deleted file mode 100644
index d1e18d533..000000000
--- a/toolkit/components/filepicker/test/unit/test_filecomplete.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// Start by getting an empty directory.
-var dir = do_get_profile();
-dir.append("temp");
-dir.create(dir.DIRECTORY_TYPE, -1);
-var path = dir.path + "/";
-
-// Now create some sample entries.
-var file = dir.clone();
-file.append("test_file");
-file.create(file.NORMAL_FILE_TYPE, -1);
-file = dir.clone();
-file.append("other_file");
-file.create(file.NORMAL_FILE_TYPE, -1);
-dir.append("test_dir");
-dir.create(dir.DIRECTORY_TYPE, -1);
-
-var gListener = {
- onSearchResult: function(aSearch, aResult) {
- // Check that we got same search string back.
- do_check_eq(aResult.searchString, "test");
- // Check that the search succeeded.
- do_check_eq(aResult.searchResult, aResult.RESULT_SUCCESS);
- // Check that we got two results.
- do_check_eq(aResult.matchCount, 2);
- // Check that the first result is the directory we created.
- do_check_eq(aResult.getValueAt(0), "test_dir");
- // Check that the first result has directory style.
- do_check_eq(aResult.getStyleAt(0), "directory");
- // Check that the second result is the file we created.
- do_check_eq(aResult.getValueAt(1), "test_file");
- // Check that the second result has file style.
- do_check_eq(aResult.getStyleAt(1), "file");
- }
-};
-
-function run_test()
-{
- Components.classes["@mozilla.org/autocomplete/search;1?name=file"]
- .getService(Components.interfaces.nsIAutoCompleteSearch)
- .startSearch("test", path, null, gListener);
-}
diff --git a/toolkit/components/filepicker/test/unit/xpcshell.ini b/toolkit/components/filepicker/test/unit/xpcshell.ini
deleted file mode 100644
index 1a0a002dc..000000000
--- a/toolkit/components/filepicker/test/unit/xpcshell.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[DEFAULT]
-head =
-tail =
-skip-if = toolkit == 'android'
-
-[test_filecomplete.js]
-skip-if = os != 'linux'