Skip to content
Browse files

CB-5991: Test path matching in whitelist implementations

  • Loading branch information...
1 parent 7bf74ba commit a8e4f69f2dd74f56cb0f09587309de1a24c2806d @clelland clelland committed Feb 7, 2014
Showing with 7 additions and 0 deletions.
  1. +7 −0 autotest/tests/whitelist.tests.js
View
7 autotest/tests/whitelist.tests.js
@@ -109,6 +109,13 @@ describe('Whitelist API (cordova.whitelist)', function () {
itShouldNotMatch('http://www.apache.org:foo/', ['http://www.apache.org:81/*']);
itShouldNotMatch('http://www.apache.org:81@www.apache.org/', ['http://www.apache.org:81/*']);
itShouldNotMatch('http://www.apache.org:81@www.evil.com/', ['http://www.apache.org:81/*']);
+
+ itShouldMatch('http://www.apache.org/foo/', ['*://*.apache.org/foo/*']);
+ itShouldMatch('http://www.apache.org/foo/bar', ['*://*.apache.org/foo/*']);
+ itShouldNotMatch('http://www.apache.org/bar/foo/', ['*://*.apache.org/foo/*']);
+ itShouldNotMatch('http://www.apache.org/Foo/', ['*://*.apache.org/foo/*']);
+ itShouldNotMatch('http://www.apache.org/Foo/bar', ['*://*.apache.org/foo/*']);
+
});
describe("Test function", function() {

0 comments on commit a8e4f69

Please sign in to comment.
Something went wrong with that request. Please try again.