Bug 652186 - Fix test with URL containing backslashes r?mak
MozReview-Commit-ID: EngcHqZkSeH
--- a/browser/base/content/test/general/browser_urlbarDecode.js
+++ b/browser/base/content/test/general/browser_urlbarDecode.js
@@ -79,19 +79,19 @@ function* checkInput(inputStr) {
input: inputStr,
};
for (let key in params) {
params[key] = encodeURIComponent(params[key]);
}
let expectedURL = "moz-action:" + type + "," + JSON.stringify(params);
Assert.equal(item.getAttribute("url"), expectedURL, "url");
- Assert.equal(item.getAttribute("title"), inputStr, "title");
+ Assert.equal(item.getAttribute("title"), inputStr.replace("\\","/"), "title");
Assert.equal(item.getAttribute("text"), inputStr, "text");
let itemTypeStr = item.getAttribute("type");
let itemTypes = itemTypeStr.split(" ").sort();
Assert.equal(itemTypes.toString(),
["action", "heuristic", "visiturl"].toString(),
"type");
- Assert.equal(item._title.textContent, "Visit " + inputStr, "Visible title");
+ Assert.equal(item._title.textContent, "Visit " + inputStr.replace("\\","/"), "Visible title");
}