mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1108382 - Part 5: Do not use non-standard flag argument of String.prototype.replace in docshell/test/unit/. r=gavin
This commit is contained in:
parent
e52cf55788
commit
1067bb7e38
@ -621,14 +621,14 @@ function do_single_test_run() {
|
||||
if (couldDoKeywordLookup) {
|
||||
if (expectKeywordLookup) {
|
||||
if (!affectedByWhitelist || (affectedByWhitelist && !inWhitelist)) {
|
||||
let urlparamInput = encodeURIComponent(sanitize(testInput)).replace("%20", "+", "g");
|
||||
let urlparamInput = encodeURIComponent(sanitize(testInput)).replace(/%20/g, "+");
|
||||
// If the input starts with `?`, then info.preferredURI.spec will omit it
|
||||
// In order to test this behaviour, remove `?` only if it is the first character
|
||||
if (urlparamInput.startsWith("%3F")) {
|
||||
urlparamInput = urlparamInput.replace("%3F", "");
|
||||
}
|
||||
let searchURL = kSearchEngineURL.replace("{searchTerms}", urlparamInput);
|
||||
let spec = info.preferredURI.spec.replace("%27", "'", "g");
|
||||
let spec = info.preferredURI.spec.replace(/%27/g, "'");
|
||||
do_check_eq(spec, searchURL);
|
||||
} else {
|
||||
do_check_eq(info.preferredURI, null);
|
||||
|
Loading…
Reference in New Issue
Block a user