Bug 690307 - Add more tests for the localhost + spaces case. r=mak, a=test-only
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 05 Nov 2014 19:08:45 +0000
changeset 235080 443e9311c04601406cf96fbe3d6f03400c223d9b
parent 235079 07c0fd08235f1810449c5f337d23ad50a68fcb0d
child 235081 a8221dcf14d9773e86fa8bd8a78b300fafbdbddd
push id611
push userraliiev@mozilla.com
push dateMon, 05 Jan 2015 23:23:16 +0000
treeherdermozilla-release@345cd3b9c445 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, test-only
bugs690307
milestone35.0a2
Bug 690307 - Add more tests for the localhost + spaces case. r=mak, a=test-only
browser/base/content/test/general/browser_urlbarTrimURLs.js
--- a/browser/base/content/test/general/browser_urlbarTrimURLs.js
+++ b/browser/base/content/test/general/browser_urlbarTrimURLs.js
@@ -52,16 +52,18 @@ function test() {
   testVal("mailto:admin@mozilla.org");
   testVal("gopher://mozilla.org/");
   testVal("about:config");
   testVal("jar:http://mozilla.org/example.jar!/");
   testVal("view-source:http://mozilla.org/");
 
   testVal("http://localhost");
   testVal("http://someotherhostwithnodots");
+  testVal("http://localhost/ foo bar baz");
+  testVal("http://localhost.localdomain/ foo bar baz", "localhost.localdomain/ foo bar baz");
 
   Services.prefs.setBoolPref(prefname, false);
 
   testVal("http://mozilla.org/");
 
   Services.prefs.setBoolPref(prefname, true);
 
   waitForExplicitFinish();