mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 9c6782197172 (bug 783025) because of test failures
This commit is contained in:
parent
36b8cd7b89
commit
a0adbfd4d0
@ -658,7 +658,7 @@ var allTabs = {
|
||||
} catch (e) {}
|
||||
tabstring = tab.label + " " + tab.label.toLocaleLowerCase() + " " + tabstring;
|
||||
for (let i = 0; i < filter.length; i++)
|
||||
matches += tabstring.contains(filter[i]);
|
||||
matches += tabstring.indexOf(filter[i]) > -1;
|
||||
}
|
||||
if (matches < filter.length || tab.hidden) {
|
||||
preview.hidden = true;
|
||||
|
@ -1049,7 +1049,7 @@ var gBrowserInit = {
|
||||
|
||||
// set default character set if provided
|
||||
if ("arguments" in window && window.arguments.length > 1 && window.arguments[1]) {
|
||||
if (window.arguments[1].startsWith("charset=")) {
|
||||
if (window.arguments[1].indexOf("charset=") != -1) {
|
||||
var arrayArgComponents = window.arguments[1].split("=");
|
||||
if (arrayArgComponents) {
|
||||
//we should "inherit" the charset menu setting in a new window
|
||||
@ -2758,7 +2758,7 @@ function getMeOutOfHere() {
|
||||
url = prefs.getComplexValue("browser.startup.homepage",
|
||||
Ci.nsIPrefLocalizedString).data;
|
||||
// If url is a pipe-delimited set of pages, just take the first one.
|
||||
if (url.contains("|"))
|
||||
if (url.indexOf("|") != -1)
|
||||
url = url.split("|")[0];
|
||||
} catch(e) {
|
||||
Components.utils.reportError("Couldn't get homepage pref: " + e);
|
||||
@ -3467,7 +3467,7 @@ function FillHistoryMenu(aParent) {
|
||||
|
||||
function addToUrlbarHistory(aUrlToAdd) {
|
||||
if (aUrlToAdd &&
|
||||
!aUrlToAdd.contains(" ") &&
|
||||
aUrlToAdd.indexOf(" ") == -1 &&
|
||||
!/[\x00-\x1F]/.test(aUrlToAdd))
|
||||
PlacesUIUtils.markPageAsTyped(aUrlToAdd);
|
||||
}
|
||||
|
@ -57,8 +57,8 @@ let RemoteTabViewer = {
|
||||
let item = this._tabsList.getItemAtIndex(i);
|
||||
let hide = false;
|
||||
if (item.getAttribute("type") == "tab") {
|
||||
if (!item.getAttribute("url").toLowerCase().contains(val) &&
|
||||
!item.getAttribute("title").toLowerCase().contains(val))
|
||||
if (item.getAttribute("url").toLowerCase().indexOf(val) == -1 &&
|
||||
item.getAttribute("title").toLowerCase().indexOf(val) == -1)
|
||||
hide = true;
|
||||
else
|
||||
clientTabs++;
|
||||
|
@ -795,7 +795,7 @@
|
||||
// add the scheme and host to the title to prevent spoofing.
|
||||
// XXX https://bugzilla.mozilla.org/show_bug.cgi?id=22183#c239
|
||||
try {
|
||||
if (docElement.getAttribute("chromehidden").contains("location")) {
|
||||
if (docElement.getAttribute("chromehidden").indexOf("location") != -1) {
|
||||
var uri = this.mURIFixup.createExposableURI(
|
||||
aBrowser.currentURI);
|
||||
if (uri.scheme == "about")
|
||||
@ -3750,7 +3750,7 @@
|
||||
} catch (ex) {}
|
||||
|
||||
// valid urls don't contain spaces ' '; if we have a space it isn't a valid url.
|
||||
if (!url || url.contains(" "))
|
||||
if (!url || url.indexOf(" ") != -1)
|
||||
return;
|
||||
|
||||
let bgLoad = Services.prefs.getBoolPref("browser.tabs.loadInBackground");
|
||||
|
@ -13,7 +13,7 @@ function test() {
|
||||
|
||||
function record(aName) {
|
||||
info("got " + aName);
|
||||
if (!actual.contains(aName))
|
||||
if (actual.indexOf(aName) == -1)
|
||||
actual.push(aName);
|
||||
if (actual.length == expected.length) {
|
||||
is(actual.toString(), expected.toString(),
|
||||
|
@ -19,7 +19,7 @@ function afterZoomAndLoad(aCallback, aTab) {
|
||||
value = undefined;
|
||||
oldAPTS.call(FullZoom, value, browser);
|
||||
// Don't reset _applyPrefToSetting until we've seen the about:blank load(s)
|
||||
if (browser && browser.currentURI.spec.startsWith("http:")) {
|
||||
if (browser && (browser.currentURI.spec.indexOf("http:") != -1)) {
|
||||
FullZoom._applyPrefToSetting = oldAPTS;
|
||||
didZoom = true;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ function test() {
|
||||
executeSoon(function () {
|
||||
let consoleListener = {
|
||||
observe: function (m) {
|
||||
if (m.message.contains("NS_ERROR_DOM_BAD_URI")) {
|
||||
if (m.message.indexOf("NS_ERROR_DOM_BAD_URI") > -1) {
|
||||
ok(true, "drop was blocked");
|
||||
executeSoon(finish);
|
||||
}
|
||||
|
@ -756,7 +756,7 @@ function triggerSecondaryCommand(popup, index) {
|
||||
}, false);
|
||||
|
||||
// One down event to open the popup
|
||||
EventUtils.synthesizeKey("VK_DOWN", { altKey: !navigator.platform.contains("Mac") });
|
||||
EventUtils.synthesizeKey("VK_DOWN", { altKey: (navigator.platform.indexOf("Mac") == -1) });
|
||||
}
|
||||
|
||||
function loadURI(uri, callback) {
|
||||
|
@ -143,7 +143,7 @@ function checkOKButton() {
|
||||
|
||||
// This rest of particular test doesn't really apply on Mac, since buttons
|
||||
// aren't focusable by default.
|
||||
if (navigator.platform.contains("Mac")) {
|
||||
if (navigator.platform.indexOf("Mac") != -1) {
|
||||
executeSoon(testCloseBySpace);
|
||||
return;
|
||||
}
|
||||
@ -151,7 +151,7 @@ function checkOKButton() {
|
||||
let displayName = document.getElementById("socialUserDisplayName");
|
||||
|
||||
// Linux has the buttons in the [unshare] [ok] order, so displayName will come first.
|
||||
if (navigator.platform.contains("Linux")) {
|
||||
if (navigator.platform.indexOf("Linux") != -1) {
|
||||
checkNextInTabOrder(displayName, function () {
|
||||
checkNextInTabOrder(undoButton, function () {
|
||||
checkNextInTabOrder(okButton, testCloseBySpace);
|
||||
|
@ -76,7 +76,7 @@ function handleMessageEvents(event) {
|
||||
catch (e) {
|
||||
var bodyInnerHTML = "";
|
||||
}
|
||||
if (cacheCount == 2 || bodyInnerHTML.contains("error")) {
|
||||
if (cacheCount == 2 || (bodyInnerHTML.indexOf("error") != -1)) {
|
||||
clearInterval(intervalID);
|
||||
is(cacheCount, 2, "frame not reloaded successfully");
|
||||
if (cacheCount != 2) {
|
||||
|
@ -466,7 +466,7 @@
|
||||
return selectedVal;
|
||||
// The selection doesn't span the full domain if it doesn't contain a slash and is
|
||||
// followed by some character other than a slash.
|
||||
if (!selectedVal.contains("/")) {
|
||||
if (selectedVal.indexOf("/") == -1) {
|
||||
let remainder = inputVal.replace(selectedVal, "");
|
||||
if (remainder != "" && remainder[0] != "/")
|
||||
return selectedVal;
|
||||
|
Loading…
Reference in New Issue
Block a user