You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2014/02/07 21:02:56 UTC

[1/2] spec commit: CB-5991: Test path matching in whitelist implementations

Updated Branches:
  refs/heads/master 7bf74ba1d -> 223ec76fe


CB-5991: Test path matching in whitelist implementations


Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/a8e4f69f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/a8e4f69f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/a8e4f69f

Branch: refs/heads/master
Commit: a8e4f69f2dd74f56cb0f09587309de1a24c2806d
Parents: 7bf74ba
Author: Ian Clelland <ic...@chromium.org>
Authored: Fri Feb 7 14:57:16 2014 -0500
Committer: Ian Clelland <ic...@chromium.org>
Committed: Fri Feb 7 14:57:16 2014 -0500

----------------------------------------------------------------------
 autotest/tests/whitelist.tests.js | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/a8e4f69f/autotest/tests/whitelist.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/whitelist.tests.js b/autotest/tests/whitelist.tests.js
index 6035191..33a678d 100644
--- a/autotest/tests/whitelist.tests.js
+++ b/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() {


[2/2] spec commit: CB-5395: Add tests for case-sensitivity of whitelist

Posted by ia...@apache.org.
CB-5395: Add tests for case-sensitivity of whitelist


Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/223ec76f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/223ec76f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/223ec76f

Branch: refs/heads/master
Commit: 223ec76fe64c865776bac635b7ad2fe53be1bdbe
Parents: a8e4f69
Author: Ian Clelland <ic...@chromium.org>
Authored: Fri Feb 7 14:59:37 2014 -0500
Committer: Ian Clelland <ic...@chromium.org>
Committed: Fri Feb 7 14:59:37 2014 -0500

----------------------------------------------------------------------
 autotest/tests/whitelist.tests.js | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/223ec76f/autotest/tests/whitelist.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/whitelist.tests.js b/autotest/tests/whitelist.tests.js
index 33a678d..fde24cc 100644
--- a/autotest/tests/whitelist.tests.js
+++ b/autotest/tests/whitelist.tests.js
@@ -110,6 +110,13 @@ describe('Whitelist API (cordova.whitelist)', function () {
         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/', ['*.apache.org']);
+        itShouldMatch('http://WWw.apache.org/', ['*.apache.org']);
+        itShouldMatch('http://www.apache.org/', ['*.APACHE.ORG']);
+        itShouldMatch('HTTP://www.apache.org/', ['*.apache.org']);
+        itShouldMatch('HTTP://www.apache.org/', ['http://*.apache.org']);
+        itShouldMatch('http://www.apache.org/', ['HTTP://*.apache.org']);
+
         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/*']);