diff options
| author | Jez Ng | 2012-01-15 17:39:58 +0800 | 
|---|---|---|
| committer | Jez Ng | 2012-01-15 18:01:37 +0800 | 
| commit | fbdff8626a8db7be33a6b7790a35e48c4c5231aa (patch) | |
| tree | 9aa312a6869b455cbc54789f07a2c305a128499c /test_harnesses/automated.html | |
| parent | 3ff0518014a51f237d1d98ebc15c0ce4be24c2b5 (diff) | |
| download | vimium-fbdff8626a8db7be33a6b7790a35e48c4c5231aa.tar.bz2 | |
Handle pasted URLs intelligently.
Diffstat (limited to 'test_harnesses/automated.html')
| -rw-r--r-- | test_harnesses/automated.html | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/test_harnesses/automated.html b/test_harnesses/automated.html index 5e3ae93c..764b0d2f 100644 --- a/test_harnesses/automated.html +++ b/test_harnesses/automated.html @@ -250,6 +250,19 @@        ); +      context("Web query parsing", + +        should("Convert query string to valid URL", function() { +          assert.equal("http://www.google.com/", utils.ensureUrl("http://www.google.com/")); +          assert.equal("http://www.google.com/", utils.ensureUrl("    http://www.google.com/     ")); +          assert.equal("http://www.google.com", utils.ensureUrl("www.google.com")); +          assert.equal("http://google.com", utils.ensureUrl("google.com")); +          assert.equal("http://www.google.com/search?q=google", utils.ensureUrl("google")); +          assert.equal("http://www.google.com/search?q=go ogle.com", utils.ensureUrl("go ogle.com")); +        }) + +      ); +        Tests.outputMethod = function(output) {          var newOutput = Array.prototype.join.call(arguments, "\n");          newOutput = newOutput.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"); // escape html | 
