Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B8CE81193E for ; Tue, 26 Aug 2014 15:53:15 +0000 (UTC) Received: (qmail 72351 invoked by uid 500); 26 Aug 2014 15:53:15 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 72325 invoked by uid 500); 26 Aug 2014 15:53:15 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 72316 invoked by uid 99); 26 Aug 2014 15:53:15 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Aug 2014 15:53:15 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 59DE0A034E3; Tue, 26 Aug 2014 15:53:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: marcelk@apache.org To: commits@cordova.apache.org Message-Id: <9c65db31d93441feb3b497fdc8fd7aac@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: spec commit: CB-7380 update tests for file URL Date: Tue, 26 Aug 2014 15:53:15 +0000 (UTC) Repository: cordova-mobile-spec Updated Branches: refs/heads/master 82c92e2f5 -> 25ce0e4a8 CB-7380 update tests for file URL It was previously checking that a file URL would fail, but file URLs should always be accepted otherwise local loading into the webview won't work. So the file URL test was broken into 2 separate tests. The first was changed to expect success on an empty whitelist against a file URL, and the pattern match part of the original file URL test was put in a second (new) test to use an HTTP URL. 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/25ce0e4a Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/25ce0e4a Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/25ce0e4a Branch: refs/heads/master Commit: 25ce0e4a8b4df629204a83ed958e19dcc92e5c26 Parents: 82c92e2 Author: Marcel Kinard Authored: Tue Aug 26 11:45:19 2014 -0400 Committer: Marcel Kinard Committed: Tue Aug 26 11:51:17 2014 -0400 ---------------------------------------------------------------------- www/autotest/tests/whitelist.tests.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/25ce0e4a/www/autotest/tests/whitelist.tests.js ---------------------------------------------------------------------- diff --git a/www/autotest/tests/whitelist.tests.js b/www/autotest/tests/whitelist.tests.js index 2790d52..876d632 100644 --- a/www/autotest/tests/whitelist.tests.js +++ b/www/autotest/tests/whitelist.tests.js @@ -87,7 +87,8 @@ describe('Whitelist API (cordova.whitelist)', function () { itShouldMatch('file:///foo', ['file:///foo*']); itShouldMatch('file:///foo/bar.html', ['file:///foo*']); - itShouldNotMatch('file:///etc/foo', ['file:///foo*']); + itShouldMatch('file:///foo.html', [ ]); + itShouldNotMatch('http://www.apache.org/etc/foo', ['http://www.apache.org/foo*']); itShouldNotMatch('http://www.apache.org/foo', ['file:///foo*']); itShouldMatch('http://www.apache.org/', ['*://www.apache.org/*']);