Backed out changeset 737f45e502ce (bug 1616899) for bc failures on browser_eBay.js . CLOSED TREE

This commit is contained in:
Narcis Beleuzu 2020-06-05 16:12:34 +03:00
Родитель f754421863
Коммит 44a29ec499
16 изменённых файлов: 36 добавлений и 99 удалений

Просмотреть файл

@ -13,8 +13,5 @@
}, },
"searchUrlGetParams": { "searchUrlGetParams": {
"message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.at/sch/{searchTerms}" "message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.at/sch/{searchTerms}"
},
"suggestUrlGetParams": {
"message": "sId=16&fmt=osr&kwd={searchTerms}"
} }
} }

Просмотреть файл

@ -13,8 +13,5 @@
}, },
"searchUrlGetParams": { "searchUrlGetParams": {
"message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.com.au/sch/{searchTerms}" "message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.com.au/sch/{searchTerms}"
},
"suggestUrlGetParams": {
"message": "sId=15&fmt=osr&kwd={searchTerms}"
} }
} }

Просмотреть файл

@ -13,8 +13,5 @@
}, },
"searchUrlGetParams": { "searchUrlGetParams": {
"message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.befr.ebay.be/sch/{searchTerms}" "message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.befr.ebay.be/sch/{searchTerms}"
},
"suggestUrlGetParams": {
"message": "sId=23&fmt=osr&kwd={searchTerms}"
} }
} }

Просмотреть файл

@ -13,8 +13,5 @@
}, },
"searchUrlGetParams": { "searchUrlGetParams": {
"message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.ca/sch/{searchTerms}" "message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.ca/sch/{searchTerms}"
},
"suggestUrlGetParams": {
"message": "sId=2&fmt=osr&kwd={searchTerms}"
} }
} }

Просмотреть файл

@ -13,8 +13,5 @@
}, },
"searchUrlGetParams": { "searchUrlGetParams": {
"message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.ch/sch/{searchTerms}" "message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.ch/sch/{searchTerms}"
},
"suggestUrlGetParams": {
"message": "sId=193&fmt=osr&kwd={searchTerms}"
} }
} }

Просмотреть файл

@ -13,8 +13,5 @@
}, },
"searchUrlGetParams": { "searchUrlGetParams": {
"message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.de/sch/{searchTerms}" "message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.de/sch/{searchTerms}"
},
"suggestUrlGetParams": {
"message": "sId=77&fmt=osr&kwd={searchTerms}"
} }
} }

Просмотреть файл

@ -13,8 +13,5 @@
}, },
"searchUrlGetParams": { "searchUrlGetParams": {
"message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.com/sch/{searchTerms}" "message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.com/sch/{searchTerms}"
},
"suggestUrlGetParams": {
"message": "sId=0&fmt=osr&kwd={searchTerms}"
} }
} }

Просмотреть файл

@ -13,8 +13,5 @@
}, },
"searchUrlGetParams": { "searchUrlGetParams": {
"message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.es/sch/{searchTerms}" "message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.es/sch/{searchTerms}"
},
"suggestUrlGetParams": {
"message": "sId=186&fmt=osr&kwd={searchTerms}"
} }
} }

Просмотреть файл

@ -13,8 +13,5 @@
}, },
"searchUrlGetParams": { "searchUrlGetParams": {
"message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.fr/sch/{searchTerms}" "message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.fr/sch/{searchTerms}"
},
"suggestUrlGetParams": {
"message": "sId=71&fmt=osr&kwd={searchTerms}"
} }
} }

Просмотреть файл

@ -13,8 +13,5 @@
}, },
"searchUrlGetParams": { "searchUrlGetParams": {
"message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.ie/sch/{searchTerms}" "message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.ie/sch/{searchTerms}"
},
"suggestUrlGetParams": {
"message": "sId=205&fmt=osr&kwd={searchTerms}"
} }
} }

Просмотреть файл

@ -13,8 +13,5 @@
}, },
"searchUrlGetParams": { "searchUrlGetParams": {
"message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.it/sch/{searchTerms}" "message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.it/sch/{searchTerms}"
},
"suggestUrlGetParams": {
"message": "sId=101&fmt=osr&kwd={searchTerms}"
} }
} }

Просмотреть файл

@ -13,8 +13,5 @@
}, },
"searchUrlGetParams": { "searchUrlGetParams": {
"message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.nl/sch/{searchTerms}" "message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.nl/sch/{searchTerms}"
},
"suggestUrlGetParams": {
"message": "sId=146&fmt=osr&kwd={searchTerms}"
} }
} }

Просмотреть файл

@ -13,8 +13,5 @@
}, },
"searchUrlGetParams": { "searchUrlGetParams": {
"message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.co.uk/sch/{searchTerms}" "message": "ff3=4&toolid=20004&campid=5338192028&customid=&mpre=https://www.ebay.co.uk/sch/{searchTerms}"
},
"suggestUrlGetParams": {
"message": "sId=3&fmt=osr&kwd={searchTerms}"
} }
} }

Просмотреть файл

@ -2,7 +2,7 @@
"name": "__MSG_extensionName__", "name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__", "description": "__MSG_extensionDescription__",
"manifest_version": 2, "manifest_version": 2,
"version": "1.1", "version": "1.0",
"applications": { "applications": {
"gecko": { "gecko": {
"id": "ebay@search.mozilla.org" "id": "ebay@search.mozilla.org"
@ -21,9 +21,7 @@
"name": "__MSG_extensionName__", "name": "__MSG_extensionName__",
"search_url": "__MSG_searchUrl__", "search_url": "__MSG_searchUrl__",
"search_form": "__MSG_searchForm__", "search_form": "__MSG_searchForm__",
"search_url_get_params": "__MSG_searchUrlGetParams__", "search_url_get_params": "__MSG_searchUrlGetParams__"
"suggest_url": "https://autosug.ebay.com/autosug",
"suggest_url_get_params": "__MSG_suggestUrlGetParams__"
} }
} }
} }

Просмотреть файл

@ -531,35 +531,26 @@ class SearchConfigTest {
Got "${searchForm.host}", expected to end with "${rules.domain}".` Got "${searchForm.host}", expected to end with "${rules.domain}".`
); );
let submission = engine.getSubmission("test", URLTYPE_SEARCH_HTML); for (const urlType of [URLTYPE_SUGGEST_JSON, URLTYPE_SEARCH_HTML]) {
const submission = engine.getSubmission("test", urlType);
if (this._config.searchUrlBase) { if (
urlType == URLTYPE_SUGGEST_JSON &&
(this._config.noSuggestionsURL || rules.noSuggestionsURL)
) {
this.assertOk(!submission, "Should not have a submission url");
} else if (this._config.searchUrlBase) {
this.assertEqual( this.assertEqual(
submission.uri.prePath + submission.uri.filePath, submission.uri.prePath + submission.uri.filePath,
this._config.searchUrlBase + rules.searchUrlEnd, this._config.searchUrlBase + rules.searchUrlEnd,
`Should have the correct domain for type: ${URLTYPE_SEARCH_HTML} ${location}.` `Should have the correct domain for type: ${urlType} ${location}.`
); );
} else { } else {
this.assertOk( this.assertOk(
submission.uri.host.endsWith(rules.domain), submission.uri.host.endsWith(rules.domain),
`Should have the correct domain for type: ${URLTYPE_SEARCH_HTML} ${location}. `Should have the correct domain for type: ${urlType} ${location}.
Got "${submission.uri.host}", expected to end with "${rules.domain}".` Got "${submission.uri.host}", expected to end with "${rules.domain}".`
); );
} }
submission = engine.getSubmission("test", URLTYPE_SUGGEST_JSON);
if (this._config.noSuggestionsURL || rules.noSuggestionsURL) {
this.assertOk(!submission, "Should not have a submission url");
} else if (this._config.suggestionUrlBase) {
this.assertEqual(
submission.uri.prePath + submission.uri.filePath,
this._config.suggestionUrlBase,
`Should have the correct domain for type: ${URLTYPE_SUGGEST_JSON} ${location}.`
);
this.assertOk(
submission.uri.query.includes(rules.suggestUrlCode),
`Should have the code in the uri`
);
} }
} }

Просмотреть файл

@ -69,7 +69,6 @@ const test = new SearchConfigTest({
], ],
}, },
searchUrlBase: "https://rover.ebay.com/rover/1/", searchUrlBase: "https://rover.ebay.com/rover/1/",
suggestionUrlBase: "https://autosug.ebay.com/autosug",
details: [ details: [
{ {
// Note: These should be based on region, but we don't currently enforce that. // Note: These should be based on region, but we don't currently enforce that.
@ -86,7 +85,6 @@ const test = new SearchConfigTest({
}, },
], ],
searchUrlEnd: "1553-53471-19255-0/1", searchUrlEnd: "1553-53471-19255-0/1",
suggestUrlCode: "sId=23",
}, },
{ {
domain: "ebay.at", domain: "ebay.at",
@ -98,7 +96,6 @@ const test = new SearchConfigTest({
}, },
], ],
searchUrlEnd: "5221-53469-19255-0/1", searchUrlEnd: "5221-53469-19255-0/1",
suggestUrlCode: "sId=16",
}, },
{ {
domain: "ebay.ca", domain: "ebay.ca",
@ -127,7 +124,6 @@ const test = new SearchConfigTest({
}, },
], ],
searchUrlEnd: "706-53473-19255-0/1", searchUrlEnd: "706-53473-19255-0/1",
suggestUrlCode: "sId=2",
}, },
{ {
domain: "ebay.ch", domain: "ebay.ch",
@ -155,7 +151,6 @@ const test = new SearchConfigTest({
}, },
], ],
searchUrlEnd: "5222-53480-19255-0/1", searchUrlEnd: "5222-53480-19255-0/1",
suggestUrlCode: "sId=193",
}, },
{ {
domain: "ebay.com", domain: "ebay.com",
@ -167,7 +162,6 @@ const test = new SearchConfigTest({
], ],
excluded: [{ regions: ["au", "be", "ca", "ch", "gb", "ie", "nl"] }], excluded: [{ regions: ["au", "be", "ca", "ch", "gb", "ie", "nl"] }],
searchUrlEnd: "711-53200-19255-0/1", searchUrlEnd: "711-53200-19255-0/1",
suggestUrlCode: "sId=0",
}, },
{ {
domain: "ebay.com.au", domain: "ebay.com.au",
@ -179,7 +173,6 @@ const test = new SearchConfigTest({
}, },
], ],
searchUrlEnd: "705-53470-19255-0/1", searchUrlEnd: "705-53470-19255-0/1",
suggestUrlCode: "sId=15",
}, },
{ {
domain: "ebay.ie", domain: "ebay.ie",
@ -194,7 +187,6 @@ const test = new SearchConfigTest({
}, },
], ],
searchUrlEnd: "5282-53468-19255-0/1", searchUrlEnd: "5282-53468-19255-0/1",
suggestUrlCode: "sId=205",
}, },
{ {
domain: "ebay.co.uk", domain: "ebay.co.uk",
@ -210,7 +202,6 @@ const test = new SearchConfigTest({
], ],
excluded: [{ regions: ["au", "ie"] }], excluded: [{ regions: ["au", "ie"] }],
searchUrlEnd: "710-53481-19255-0/1", searchUrlEnd: "710-53481-19255-0/1",
suggestUrlCode: "sId=3",
}, },
{ {
domain: "ebay.de", domain: "ebay.de",
@ -222,7 +213,6 @@ const test = new SearchConfigTest({
], ],
excluded: [{ regions: ["at", "ch"] }], excluded: [{ regions: ["at", "ch"] }],
searchUrlEnd: "707-53477-19255-0/1", searchUrlEnd: "707-53477-19255-0/1",
suggestUrlCode: "sId=77",
}, },
{ {
domain: "ebay.es", domain: "ebay.es",
@ -235,7 +225,6 @@ const test = new SearchConfigTest({
}, },
], ],
searchUrlEnd: "1185-53479-19255-0/1", searchUrlEnd: "1185-53479-19255-0/1",
suggestUrlCode: "sId=186",
}, },
{ {
domain: "ebay.fr", domain: "ebay.fr",
@ -247,7 +236,6 @@ const test = new SearchConfigTest({
], ],
excluded: [{ regions: ["be", "ca", "ch"] }], excluded: [{ regions: ["be", "ca", "ch"] }],
searchUrlEnd: "709-53476-19255-0/1", searchUrlEnd: "709-53476-19255-0/1",
suggestUrlCode: "sId=71",
}, },
{ {
domain: "ebay.it", domain: "ebay.it",
@ -258,7 +246,6 @@ const test = new SearchConfigTest({
}, },
], ],
searchUrlEnd: "724-53478-19255-0/1", searchUrlEnd: "724-53478-19255-0/1",
suggestUrlCode: "sId=101",
}, },
{ {
domain: "ebay.nl", domain: "ebay.nl",
@ -274,9 +261,9 @@ const test = new SearchConfigTest({
], ],
excluded: [{ regions: ["be"] }], excluded: [{ regions: ["be"] }],
searchUrlEnd: "1346-53482-19255-0/1", searchUrlEnd: "1346-53482-19255-0/1",
suggestUrlCode: "sId=146",
}, },
], ],
noSuggestionsURL: true,
}); });
add_task(async function setup() { add_task(async function setup() {