[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser] 37/76: Bug 1759712 - Update tests for search-config changes. r=mkaply, a=test-only
This is an automated email from the git hooks/post-receive script.
richard pushed a commit to branch tor-browser-91.8.0esr-11.0-1
in repository tor-browser.
commit 68f4e938cba3d9af4164c146c364d8c4081660b2
Author: Mark Banner <standard8@xxxxxxxxxxx>
AuthorDate: Tue Mar 15 16:18:49 2022 +0000
Bug 1759712 - Update tests for search-config changes. r=mkaply, a=test-only
---
.../xpcshell/searchconfigs/test_distributions.js | 227 ---------------------
.../tests/xpcshell/searchconfigs/test_google.js | 26 +--
.../tests/xpcshell/searchconfigs/test_mailru.js | 2 +-
.../tests/xpcshell/searchconfigs/test_yandex.js | 2 +-
4 files changed, 7 insertions(+), 250 deletions(-)
diff --git a/toolkit/components/search/tests/xpcshell/searchconfigs/test_distributions.js b/toolkit/components/search/tests/xpcshell/searchconfigs/test_distributions.js
index 01fb6efa8457f..af826efe33c4e 100644
--- a/toolkit/components/search/tests/xpcshell/searchconfigs/test_distributions.js
+++ b/toolkit/components/search/tests/xpcshell/searchconfigs/test_distributions.js
@@ -71,150 +71,6 @@ for (let canonicalId of ["canonical", "canonical-001", "canonical-002"]) {
});
}
-tests.push({
- locale: "ru",
- distribution: "mailru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900201") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900201") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
-tests.push({
- locale: "ru",
- region: "RU",
- distribution: "mailru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900201") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900201") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
-tests.push({
- locale: "az",
- distribution: "okru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900209") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900209") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
-tests.push({
- locale: "en-US",
- distribution: "okru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900205") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900205") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
-tests.push({
- locale: "hy-AM",
- distribution: "okru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900211") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900211") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
-tests.push({
- locale: "kk",
- distribution: "okru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900206") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900206") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
-tests.push({
- locale: "kk",
- region: "KZ",
- distribution: "okru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900206") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900206") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
-tests.push({
- locale: "ro",
- distribution: "okru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900207") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900207") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
-tests.push({
- locale: "ru",
- distribution: "okru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900203") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900203") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
-tests.push({
- locale: "ru",
- region: "RU",
- distribution: "okru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900203") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900203") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
-tests.push({
- locale: "tr",
- distribution: "okru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900210") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900210") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
-tests.push({
- locale: "tr",
- region: "TR",
- distribution: "okru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900210") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900210") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
-tests.push({
- locale: "uk",
- distribution: "okru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900204") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900204") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
-tests.push({
- locale: "uz",
- distribution: "okru-001",
- test: engines =>
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "gp=900208") &&
- hasParams(engines, "Поиск Mail.Ru", "searchbar", "frc=900208") &&
- hasDefault(engines, "Поиск Mail.Ru") &&
- hasEnginesFirst(engines, ["Поиск Mail.Ru"]),
-});
-
tests.push({
locale: "zh-CN",
region: "CN",
@@ -462,89 +318,6 @@ tests.push({
test: engines => hasDefault(engines, "GMX - Recherche web"),
});
-tests.push({
- locale: "ru",
- distribution: "yandex-drp",
- test: engines =>
- hasParams(engines, "Яндекс", "searchbar", "clid=2039342") &&
- // Test that fallback works correct as well.
- hasParams(engines, "Яндекс", "contextmenu", "clid=2039342") &&
- hasDefault(engines, "Яндекс") &&
- hasEnginesFirst(engines, ["Яндекс"]),
-});
-
-tests.push({
- locale: "ru",
- distribution: "yandex-planb",
- test: engines =>
- hasParams(engines, "Яндекс", "searchbar", "clid=1857376") &&
- hasDefault(engines, "Яндекс") &&
- hasEnginesFirst(engines, ["Яндекс"]),
-});
-
-tests.push({
- locale: "ru",
- distribution: "yandex-portals",
- test: engines =>
- hasParams(engines, "Яндекс", "searchbar", "clid=1923034") &&
- hasDefault(engines, "Яндекс") &&
- hasEnginesFirst(engines, ["Яндекс"]),
-});
-
-tests.push({
- locale: "ru",
- distribution: "yandex-ru",
- test: engines =>
- hasParams(engines, "Яндекс", "searchbar", "clid=1923018") &&
- hasDefault(engines, "Яндекс") &&
- hasEnginesFirst(engines, ["Яндекс"]),
-});
-
-tests.push({
- locale: "tr",
- distribution: "yandex-tr",
- test: engines =>
- hasParams(engines, "Yandex", "searchbar", "clid=1953197") &&
- hasDefault(engines, "Yandex") &&
- hasEnginesFirst(engines, ["Yandex"]),
-});
-
-tests.push({
- locale: "tr",
- distribution: "yandex-tr-gezginler",
- test: engines =>
- hasParams(engines, "Yandex", "searchbar", "clid=1945716") &&
- hasDefault(engines, "Yandex") &&
- hasEnginesFirst(engines, ["Yandex"]),
-});
-
-tests.push({
- locale: "tr",
- distribution: "yandex-tr-tamindir",
- test: engines =>
- hasParams(engines, "Yandex", "searchbar", "clid=1945686") &&
- hasDefault(engines, "Yandex") &&
- hasEnginesFirst(engines, ["Yandex"]),
-});
-
-tests.push({
- locale: "uk",
- distribution: "yandex-uk",
- test: engines =>
- hasParams(engines, "Яндекс", "searchbar", "clid=1923018") &&
- hasDefault(engines, "Яндекс") &&
- hasEnginesFirst(engines, ["Яндекс"]),
-});
-
-tests.push({
- locale: "ru",
- distribution: "yandex-ru-mz",
- test: engines =>
- hasParams(engines, "Яндекс", "searchbar", "clid=2320519") &&
- hasDefault(engines, "Яндекс") &&
- hasEnginesFirst(engines, ["Яндекс"]),
-});
-
function hasURLs(engines, engineName, url, suggestURL) {
let engine = engines.find(e => e._name === engineName);
Assert.ok(engine, `Should be able to find ${engineName}`);
diff --git a/toolkit/components/search/tests/xpcshell/searchconfigs/test_google.js b/toolkit/components/search/tests/xpcshell/searchconfigs/test_google.js
index 2a7068c29f0f8..6cc2c2703faed 100644
--- a/toolkit/components/search/tests/xpcshell/searchconfigs/test_google.js
+++ b/toolkit/components/search/tests/xpcshell/searchconfigs/test_google.js
@@ -10,13 +10,6 @@ const test = new SearchConfigTest({
// Included everywhere apart from the exclusions below. These are basically
// just excluding what Yandex and Baidu include.
excluded: [
- {
- regions: ["ru", "tr", "by", "kz"],
- locales: {
- matches: ["ru", "tr", "be", "kk"],
- startsWith: ["en"],
- },
- },
{
regions: ["cn"],
locales: {
@@ -34,10 +27,8 @@ const test = new SearchConfigTest({
{
included: [{ regions: ["us"] }],
domain: "google.com",
- telemetryId: AppConstants.MOZ_APP_VERSION_DISPLAY.endsWith("esr")
- ? "google-b-1-e"
- : "google-b-1-d",
- codes: AppConstants.MOZ_APP_VERSION_DISPLAY.endsWith("esr")
+ telemetryId: AppConstants.IS_ESR ? "google-b-1-e" : "google-b-1-d",
+ codes: AppConstants.IS_ESR
? "client=firefox-b-1-e"
: "client=firefox-b-1-d",
},
@@ -45,20 +36,13 @@ const test = new SearchConfigTest({
excluded: [{ regions: ["us", "by", "kz", "ru", "tr"] }],
included: [{}],
domain: "google.com",
- telemetryId: AppConstants.MOZ_APP_VERSION_DISPLAY.endsWith("esr")
- ? "google-b-e"
- : "google-b-d",
- codes: AppConstants.MOZ_APP_VERSION_DISPLAY.endsWith("esr")
- ? "client=firefox-b-e"
- : "client=firefox-b-d",
+ telemetryId: AppConstants.IS_ESR ? "google-b-e" : "google-b-d",
+ codes: AppConstants.IS_ESR ? "client=firefox-b-e" : "client=firefox-b-d",
},
{
- excluded: [{ regions: ["us"] }],
included: [{ regions: ["by", "kz", "ru", "tr"] }],
domain: "google.com",
- codes: AppConstants.MOZ_APP_VERSION_DISPLAY.endsWith("esr")
- ? "client=firefox-b-e"
- : "client=firefox-b-d",
+ telemetryId: "google-com-nocodes",
},
],
});
diff --git a/toolkit/components/search/tests/xpcshell/searchconfigs/test_mailru.js b/toolkit/components/search/tests/xpcshell/searchconfigs/test_mailru.js
index 2d2a42c19be21..4d413f0b5bcf6 100644
--- a/toolkit/components/search/tests/xpcshell/searchconfigs/test_mailru.js
+++ b/toolkit/components/search/tests/xpcshell/searchconfigs/test_mailru.js
@@ -35,4 +35,4 @@ add_task(async function setup() {
add_task(async function test_searchConfig_mailru() {
await test.run();
-});
+}).skip();
diff --git a/toolkit/components/search/tests/xpcshell/searchconfigs/test_yandex.js b/toolkit/components/search/tests/xpcshell/searchconfigs/test_yandex.js
index 5495c672ac70a..c315165e5fe8a 100644
--- a/toolkit/components/search/tests/xpcshell/searchconfigs/test_yandex.js
+++ b/toolkit/components/search/tests/xpcshell/searchconfigs/test_yandex.js
@@ -114,4 +114,4 @@ add_task(async function setup() {
add_task(async function test_searchConfig_yandex() {
await test.run();
-});
+}).skip();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits