You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2019/06/19 15:28:23 UTC

[cordova-plugin-whitelist] branch master updated (e4f17b0 -> 5add264)

This is an automated email from the ASF dual-hosted git repository.

janpio pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-whitelist.git.


    from e4f17b0  test,ci(travis): Tests (extracted from cordova-mobile-spec) (#38)
     new bf8fea5  build: add `.npmignore` to remove unneeded files from npm package
     new ed0206b  build: add `.gitattributes` to force LF (instead of possible CRLF on Windows)
     new d804ef2  chore: manually fix lines breaks to LF
     new e9f6a5c  chore(release): release notes for 1.3.4
     new 5620d36  chore(release): 1.3.4 (version string)
     new 5add264  chore(release): 1.3.5-dev

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitattributes                      |   1 +
 .npmignore                          |  16 ++
 .travis.yml                         | 236 ++++++++++----------
 RELEASENOTES.md                     |  12 +
 package.json                        |   2 +-
 plugin.xml                          |   2 +-
 tests/README.md                     | 106 ++++-----
 tests/package.json                  |   2 +-
 tests/plugin.xml                    | 112 +++++-----
 tests/scripts/remove-access.js      |  36 +--
 tests/src/android/WhitelistAPI.java | 180 +++++++--------
 tests/tests.js                      | 426 ++++++++++++++++++------------------
 tests/www/whitelist.js              |  68 +++---
 13 files changed, 614 insertions(+), 585 deletions(-)
 create mode 100644 .gitattributes
 create mode 100644 .npmignore


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-plugin-whitelist] 01/06: build: add `.npmignore` to remove unneeded files from npm package

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-whitelist.git

commit bf8fea5f8273516995f58e1dbcb45cae6185a248
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed Jun 19 17:17:52 2019 +0200

    build: add `.npmignore` to remove unneeded files from npm package
---
 .npmignore | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/.npmignore b/.npmignore
new file mode 100644
index 0000000..d71cbd7
--- /dev/null
+++ b/.npmignore
@@ -0,0 +1,16 @@
+# CI service configurations
+.travis.yml
+.appveyor.yml
+appveyor.yml
+
+# Testing, code coverage, and linting
+.eslintignore
+.eslintrc.yml
+
+# Git
+.git
+.gitattributes
+.gitignore
+
+# Github
+.github


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-plugin-whitelist] 02/06: build: add `.gitattributes` to force LF (instead of possible CRLF on Windows)

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-whitelist.git

commit ed0206b0e9cd2ccf1bb26fefe19a7742bf0034e5
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed Jun 19 17:18:05 2019 +0200

    build: add `.gitattributes` to force LF (instead of possible CRLF on Windows)
---
 .gitattributes | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..07764a7
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text eol=lf
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-plugin-whitelist] 06/06: chore(release): 1.3.5-dev

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-whitelist.git

commit 5add26478f3ad26baf85ace484243899a76b9e6e
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed Jun 19 17:27:52 2019 +0200

    chore(release): 1.3.5-dev
---
 package.json       | 2 +-
 plugin.xml         | 2 +-
 tests/package.json | 2 +-
 tests/plugin.xml   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/package.json b/package.json
index 41af367..aa6d650 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova-plugin-whitelist",
-  "version": "1.3.4",
+  "version": "1.3.5-dev",
   "description": "Cordova Whitelist Plugin",
   "cordova": {
     "platforms": [
diff --git a/plugin.xml b/plugin.xml
index 1fce219..08de994 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -20,7 +20,7 @@
 
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
            id="cordova-plugin-whitelist"
-      version="1.3.4">
+      version="1.3.5-dev">
     <name>Whitelist</name>
     <description>Cordova Network Whitelist Plugin</description>
     <license>Apache 2.0</license>
diff --git a/tests/package.json b/tests/package.json
index bf18bc1..d8bdd2d 100644
--- a/tests/package.json
+++ b/tests/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova-plugin-whitelist-tests",
-  "version": "1.3.4",
+  "version": "1.3.5-dev",
   "description": "",
   "cordova": {
     "id": "cordova-plugin-whitelist-tests",
diff --git a/tests/plugin.xml b/tests/plugin.xml
index dbb33b6..53955f5 100644
--- a/tests/plugin.xml
+++ b/tests/plugin.xml
@@ -21,7 +21,7 @@
 
 <plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
            id="cordova-plugin-whitelist-tests"
-      version="1.3.4">
+      version="1.3.5-dev">
     <name>Cordova Plugin Whitelist Tests</name>
     <license>Apache 2.0</license>
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-plugin-whitelist] 05/06: chore(release): 1.3.4 (version string)

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-whitelist.git

commit 5620d36aacab70ee5f1390a4b751a5b27eed8a47
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed Jun 19 17:26:34 2019 +0200

    chore(release): 1.3.4 (version string)
---
 package.json       | 2 +-
 plugin.xml         | 2 +-
 tests/package.json | 2 +-
 tests/plugin.xml   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/package.json b/package.json
index 00ada32..41af367 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova-plugin-whitelist",
-  "version": "1.3.4-dev",
+  "version": "1.3.4",
   "description": "Cordova Whitelist Plugin",
   "cordova": {
     "platforms": [
diff --git a/plugin.xml b/plugin.xml
index 7bbb8a6..1fce219 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -20,7 +20,7 @@
 
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
            id="cordova-plugin-whitelist"
-      version="1.3.4-dev">
+      version="1.3.4">
     <name>Whitelist</name>
     <description>Cordova Network Whitelist Plugin</description>
     <license>Apache 2.0</license>
diff --git a/tests/package.json b/tests/package.json
index f0b4839..bf18bc1 100644
--- a/tests/package.json
+++ b/tests/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova-plugin-whitelist-tests",
-  "version": "1.3.4-dev",
+  "version": "1.3.4",
   "description": "",
   "cordova": {
     "id": "cordova-plugin-whitelist-tests",
diff --git a/tests/plugin.xml b/tests/plugin.xml
index 3862b98..dbb33b6 100644
--- a/tests/plugin.xml
+++ b/tests/plugin.xml
@@ -21,7 +21,7 @@
 
 <plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
            id="cordova-plugin-whitelist-tests"
-      version="1.3.4-dev">
+      version="1.3.4">
     <name>Cordova Plugin Whitelist Tests</name>
     <license>Apache 2.0</license>
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-plugin-whitelist] 04/06: chore(release): release notes for 1.3.4

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-whitelist.git

commit e9f6a5c4db8950aacc874324d921e4d0082a41d7
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed Jun 19 17:26:34 2019 +0200

    chore(release): release notes for 1.3.4
---
 RELEASENOTES.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 718fa05..31a58c8 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -20,6 +20,18 @@
 -->
 # Release Notes
 
+### 1.3.4 (Jun 19, 2019)
+
+-   chore: manually fix lines breaks to LF ([`d804ef2`](https://github.com/apache/cordova-plugin-whitelist/commit/d804ef2))
+-   build: add `.gitattributes` to force LF (instead of possible CRLF on Windows) ([`ed0206b`](https://github.com/apache/cordova-plugin-whitelist/commit/ed0206b))
+-   build: add `.npmignore` to remove unneeded files from npm package ([`bf8fea5`](https://github.com/apache/cordova-plugin-whitelist/commit/bf8fea5))
+-   test,ci(travis): Tests (extracted from cordova-mobile-spec) ([#38](https://github.com/apache/cordova-plugin-whitelist/issues/38)) ([`e4f17b0`](https://github.com/apache/cordova-plugin-whitelist/commit/e4f17b0))
+-   docs: Added information on allow-navigation preceding allow-intent ([#41](https://github.com/apache/cordova-plugin-whitelist/issues/41)) ([`7725fed`](https://github.com/apache/cordova-plugin-whitelist/commit/7725fed))
+-   chore(github): Add or update GitHub pull request and issue template ([`86b3ee1`](https://github.com/apache/cordova-plugin-whitelist/commit/86b3ee1))
+-   fix: Remove information about cordova-android ([#27](https://github.com/apache/cordova-plugin-whitelist/issues/27)) ([`34ed9d0`](https://github.com/apache/cordova-plugin-whitelist/commit/34ed9d0))
+-   docs: remove JIRA link ([`fa78675`](https://github.com/apache/cordova-plugin-whitelist/commit/fa78675))
+-   docs: Clarify unconfigured Intent Whitelist behaviour ([#26](https://github.com/apache/cordova-plugin-whitelist/issues/26)) ([`8d3f86b`](https://github.com/apache/cordova-plugin-whitelist/commit/8d3f86b))
+
 ### 1.3.3 (Nov 06, 2017)
 * [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`.
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-plugin-whitelist] 03/06: chore: manually fix lines breaks to LF

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-whitelist.git

commit d804ef21738c2081f23ffdf38be7045e6c5b9f1c
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed Jun 19 17:22:34 2019 +0200

    chore: manually fix lines breaks to LF
---
 .travis.yml                         | 236 ++++++++++----------
 tests/README.md                     | 106 ++++-----
 tests/plugin.xml                    | 112 +++++-----
 tests/scripts/remove-access.js      |  36 +--
 tests/src/android/WhitelistAPI.java | 180 +++++++--------
 tests/tests.js                      | 426 ++++++++++++++++++------------------
 tests/www/whitelist.js              |  68 +++---
 7 files changed, 582 insertions(+), 582 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 91848c9..7e5e760 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,118 +1,118 @@
-# This Travis configuration file is built after a Cordova Paramedic 
-# specific template with minimal modifications and adaptations:
-# https://github.com/apache/cordova-paramedic/blob/master/.travis.yml
-
-sudo: false
-
-addons:
-  jwt:
-    # SAUCE_ACCESS_KEY
-    secure: "lXoPl/RjXnA5FocMLhpA4nFtzH/VaX6oMDG4H/uNAKBusTpQiVmmnXkZhv6ERsuuHHMUfZn/29m2On1J4hv8x+u5XpBjkTe0/5umYARTuyWXfnMmILNVNKZr7qmaiFBXI1LrnEoNqgbKR1ZqoN6bMrPZEWRr7AFVgwkRsWRoeTc="
-
-env:
-  global:
-    - SAUCE_USERNAME=snay
-    - TRAVIS_NODE_VERSION=6
-    - ANDROID_API_LEVEL=28
-    - ANDROID_BUILD_TOOLS_VERSION=28.0.3
-
-language: node_js
-node_js: 6
-
-# yaml anchor/alias: https://medium.com/@tommyvn/travis-yml-dry-with-anchors-8b6a3ac1b027
-
-_ios: &_ios
-  os: osx
-  osx_image: xcode10.2
-
-_android: &_android
-  language: android
-  os: linux
-  jdk: oraclejdk8
-  android:
-    components:
-      - tools
-      - build-tools-$ANDROID_BUILD_TOOLS_VERSION
-      - android-$ANDROID_API_LEVEL
-    licenses:
-      - 'android-sdk-preview-license-.+'
-      - 'android-sdk-license-.+'
-      - 'google-gdk-license-.+'
-
-matrix:
-  include:   
-    # local tests, without saucelabs
-    - env: PLATFORM=local/browser
-      <<: *_ios
-    - env: PLATFORM=local/ios-10.0
-      <<: *_ios
-
-    # many tests with saucelabs
-    - env: PLATFORM=browser-chrome
-    - env: PLATFORM=browser-firefox
-    - env: PLATFORM=browser-safari
-    - env: PLATFORM=browser-edge
-
-    - env: PLATFORM=ios-11.3
-      <<: *_ios
-    - env: PLATFORM=ios-12.0
-      <<: *_ios
-    - env: PLATFORM=ios-12.2
-      <<: *_ios
-
-    - env: PLATFORM=android-6.0
-      <<: *_android
-    - env: PLATFORM=android-7.0
-      <<: *_android
-    - env: PLATFORM=android-7.1
-      <<: *_android
-    - env: PLATFORM=android-8.0
-      <<: *_android
-    - env: PLATFORM=android-8.1
-      <<: *_android
-    - env: PLATFORM=android-9.0
-      <<: *_android
-
-before_install:
-  # manually install Node for `language: android`
-  - if [[ "$PLATFORM" =~ android ]]; then nvm install $TRAVIS_NODE_VERSION; fi 
-  - node --version
-  - if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi
-  - if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi
-  - npm install -g cordova
-  # install paramedic if not running on paramedic repo
-  - if ! [[ "$TRAVIS_REPO_SLUG" =~ cordova-paramedic ]]; then npm install -g github:apache/cordova-paramedic; fi 
-
-install:
-  - npm install
-
-before_script:
-  - |
-    if [[ "$TRAVIS_REPO_SLUG" =~ cordova-paramedic ]]; then 
-      # when used in the cordova-paramedic repo
-      TEST_COMMAND="npm run eslint"
-      PARAMEDIC_PLUGIN_TO_TEST="./spec/testable-plugin/"
-      PARAMEDIC_COMMAND="node main.js"
-    else 
-      # when used in any other (plugin) repo
-      TEST_COMMAND="npm test"
-      PARAMEDIC_PLUGIN_TO_TEST=$(pwd)
-      PARAMEDIC_COMMAND="cordova-paramedic"
-    fi
-  - PARAMEDIC_BUILDNAME=travis-$TRAVIS_REPO_SLUG-$TRAVIS_JOB_NUMBER
-  - |
-    echo "Variables now are set to:"
-    echo "TEST_COMMAND=$TEST_COMMAND"
-    echo "ADDITIONAL_TESTS=$ADDITIONAL_TESTS"
-    echo "PARAMEDIC_COMMAND=$PARAMEDIC_COMMAND"
-    echo "PLATFORM=$PLATFORM"
-    echo "PARAMEDIC_PLUGIN_TO_TEST=$PARAMEDIC_PLUGIN_TO_TEST"
-    echo "PARAMEDIC_BUILDNAME=$PARAMEDIC_BUILDNAME"
-
-script:
-  - $TEST_COMMAND
-  - if [[ "$ADDITIONAL_TESTS_DIR" != "" ]]; then
-      cd $ADDITIONAL_TESTS_DIR && npm install && npm test;
-    else 
-      $PARAMEDIC_COMMAND --config ./pr/$PLATFORM --plugin $PARAMEDIC_PLUGIN_TO_TEST --buildName $PARAMEDIC_BUILDNAME; 
-    fi
+# This Travis configuration file is built after a Cordova Paramedic 
+# specific template with minimal modifications and adaptations:
+# https://github.com/apache/cordova-paramedic/blob/master/.travis.yml
+
+sudo: false
+
+addons:
+  jwt:
+    # SAUCE_ACCESS_KEY
+    secure: "lXoPl/RjXnA5FocMLhpA4nFtzH/VaX6oMDG4H/uNAKBusTpQiVmmnXkZhv6ERsuuHHMUfZn/29m2On1J4hv8x+u5XpBjkTe0/5umYARTuyWXfnMmILNVNKZr7qmaiFBXI1LrnEoNqgbKR1ZqoN6bMrPZEWRr7AFVgwkRsWRoeTc="
+
+env:
+  global:
+    - SAUCE_USERNAME=snay
+    - TRAVIS_NODE_VERSION=6
+    - ANDROID_API_LEVEL=28
+    - ANDROID_BUILD_TOOLS_VERSION=28.0.3
+
+language: node_js
+node_js: 6
+
+# yaml anchor/alias: https://medium.com/@tommyvn/travis-yml-dry-with-anchors-8b6a3ac1b027
+
+_ios: &_ios
+  os: osx
+  osx_image: xcode10.2
+
+_android: &_android
+  language: android
+  os: linux
+  jdk: oraclejdk8
+  android:
+    components:
+      - tools
+      - build-tools-$ANDROID_BUILD_TOOLS_VERSION
+      - android-$ANDROID_API_LEVEL
+    licenses:
+      - 'android-sdk-preview-license-.+'
+      - 'android-sdk-license-.+'
+      - 'google-gdk-license-.+'
+
+matrix:
+  include:   
+    # local tests, without saucelabs
+    - env: PLATFORM=local/browser
+      <<: *_ios
+    - env: PLATFORM=local/ios-10.0
+      <<: *_ios
+
+    # many tests with saucelabs
+    - env: PLATFORM=browser-chrome
+    - env: PLATFORM=browser-firefox
+    - env: PLATFORM=browser-safari
+    - env: PLATFORM=browser-edge
+
+    - env: PLATFORM=ios-11.3
+      <<: *_ios
+    - env: PLATFORM=ios-12.0
+      <<: *_ios
+    - env: PLATFORM=ios-12.2
+      <<: *_ios
+
+    - env: PLATFORM=android-6.0
+      <<: *_android
+    - env: PLATFORM=android-7.0
+      <<: *_android
+    - env: PLATFORM=android-7.1
+      <<: *_android
+    - env: PLATFORM=android-8.0
+      <<: *_android
+    - env: PLATFORM=android-8.1
+      <<: *_android
+    - env: PLATFORM=android-9.0
+      <<: *_android
+
+before_install:
+  # manually install Node for `language: android`
+  - if [[ "$PLATFORM" =~ android ]]; then nvm install $TRAVIS_NODE_VERSION; fi 
+  - node --version
+  - if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi
+  - if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi
+  - npm install -g cordova
+  # install paramedic if not running on paramedic repo
+  - if ! [[ "$TRAVIS_REPO_SLUG" =~ cordova-paramedic ]]; then npm install -g github:apache/cordova-paramedic; fi 
+
+install:
+  - npm install
+
+before_script:
+  - |
+    if [[ "$TRAVIS_REPO_SLUG" =~ cordova-paramedic ]]; then 
+      # when used in the cordova-paramedic repo
+      TEST_COMMAND="npm run eslint"
+      PARAMEDIC_PLUGIN_TO_TEST="./spec/testable-plugin/"
+      PARAMEDIC_COMMAND="node main.js"
+    else 
+      # when used in any other (plugin) repo
+      TEST_COMMAND="npm test"
+      PARAMEDIC_PLUGIN_TO_TEST=$(pwd)
+      PARAMEDIC_COMMAND="cordova-paramedic"
+    fi
+  - PARAMEDIC_BUILDNAME=travis-$TRAVIS_REPO_SLUG-$TRAVIS_JOB_NUMBER
+  - |
+    echo "Variables now are set to:"
+    echo "TEST_COMMAND=$TEST_COMMAND"
+    echo "ADDITIONAL_TESTS=$ADDITIONAL_TESTS"
+    echo "PARAMEDIC_COMMAND=$PARAMEDIC_COMMAND"
+    echo "PLATFORM=$PLATFORM"
+    echo "PARAMEDIC_PLUGIN_TO_TEST=$PARAMEDIC_PLUGIN_TO_TEST"
+    echo "PARAMEDIC_BUILDNAME=$PARAMEDIC_BUILDNAME"
+
+script:
+  - $TEST_COMMAND
+  - if [[ "$ADDITIONAL_TESTS_DIR" != "" ]]; then
+      cd $ADDITIONAL_TESTS_DIR && npm install && npm test;
+    else 
+      $PARAMEDIC_COMMAND --config ./pr/$PLATFORM --plugin $PARAMEDIC_PLUGIN_TO_TEST --buildName $PARAMEDIC_BUILDNAME; 
+    fi
diff --git a/tests/README.md b/tests/README.md
index 4eeae3b..cbd65d6 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -1,53 +1,53 @@
----
- license: Licensed to the Apache Software Foundation (ASF) under one
-         or more contributor license agreements.  See the NOTICE file
-         distributed with this work for additional information
-         regarding copyright ownership.  The ASF licenses this file
-         to you under the Apache License, Version 2.0 (the
-         "License"); you may not use this file except in compliance
-         with the License.  You may obtain a copy of the License at
-
-           http://www.apache.org/licenses/LICENSE-2.0
-
-         Unless required by applicable law or agreed to in writing,
-         software distributed under the License is distributed on an
-         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-         KIND, either express or implied.  See the License for the
-         specific language governing permissions and limitations
-         under the License.
----
-
-# cordova-plugin-whitelist-tests
-
-This are an [optional JavaScript interface](#whitelist) to the core Cordova Whitelist functionality and the test plugin that uses it to test cordova-plugin-whitelist.
-
-## Whitelist
-
-> The `whitelist` object provides an interface for testing whether arbitrary
-> URLs are allowed by the currently active configuration, or would be allowed
-> by a given set of whitelist patterns.
-
-### Methods
-
-- cordova.whitelist.match
-- cordova.whitelist.test
-
-#### cordova.whitelist.match
-
-Indicates whether a given URL would be allowed by a set of Whitelist URL
-patterns.
-
-    cordova.whitelist.match(url, patterns, callback);
-
-`callback` will be invoked with a boolean argument indicating whether the
-url matches the set of patterns.
-
-#### cordova.whitelist.test
-
-Indicates whether a given URL would be allowed by the current application
-configuration.
-
-    cordova.whitelist.test(url, callback);
-
-`callback` will be invoked with a boolean argument indicating whether the
-url is currently whitelisted.
+---
+ license: Licensed to the Apache Software Foundation (ASF) under one
+         or more contributor license agreements.  See the NOTICE file
+         distributed with this work for additional information
+         regarding copyright ownership.  The ASF licenses this file
+         to you under the Apache License, Version 2.0 (the
+         "License"); you may not use this file except in compliance
+         with the License.  You may obtain a copy of the License at
+
+           http://www.apache.org/licenses/LICENSE-2.0
+
+         Unless required by applicable law or agreed to in writing,
+         software distributed under the License is distributed on an
+         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+         KIND, either express or implied.  See the License for the
+         specific language governing permissions and limitations
+         under the License.
+---
+
+# cordova-plugin-whitelist-tests
+
+This are an [optional JavaScript interface](#whitelist) to the core Cordova Whitelist functionality and the test plugin that uses it to test cordova-plugin-whitelist.
+
+## Whitelist
+
+> The `whitelist` object provides an interface for testing whether arbitrary
+> URLs are allowed by the currently active configuration, or would be allowed
+> by a given set of whitelist patterns.
+
+### Methods
+
+- cordova.whitelist.match
+- cordova.whitelist.test
+
+#### cordova.whitelist.match
+
+Indicates whether a given URL would be allowed by a set of Whitelist URL
+patterns.
+
+    cordova.whitelist.match(url, patterns, callback);
+
+`callback` will be invoked with a boolean argument indicating whether the
+url matches the set of patterns.
+
+#### cordova.whitelist.test
+
+Indicates whether a given URL would be allowed by the current application
+configuration.
+
+    cordova.whitelist.test(url, callback);
+
+`callback` will be invoked with a boolean argument indicating whether the
+url is currently whitelisted.
diff --git a/tests/plugin.xml b/tests/plugin.xml
index bd4dc99..3862b98 100644
--- a/tests/plugin.xml
+++ b/tests/plugin.xml
@@ -1,56 +1,56 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-
-<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
-           id="cordova-plugin-whitelist-tests"
-      version="1.3.4-dev">
-    <name>Cordova Plugin Whitelist Tests</name>
-    <license>Apache 2.0</license>
-
-    <js-module src="tests.js" name="tests">
-    </js-module>
-    
-    <js-module src="www/whitelist.js" name="whitelist">
-        <clobbers target="cordova.whitelist" />
-    </js-module>
-
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="/*">
-            <feature name="WhitelistAPI" >
-                <param name="android-package" value="org.apache.cordova.test.WhitelistAPI"/>
-            </feature>
-        </config-file>
-
-        <source-file src="src/android/WhitelistAPI.java" target-dir="src/org/apache/cordova/test" />
-
-        <!-- remove <access origin="*" /> -->
-        <hook type="after_prepare" src="scripts/remove-access.js"/>
-
-        <!-- add whitelist configuration the tests test for -->
-        <config-file target="config.xml" parent="/*">
-            <allow-navigation href="http://*.apache.org" />
-            <allow-navigation href="https://*.apache.org" />
-        </config-file>
-
-    </platform>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
+           id="cordova-plugin-whitelist-tests"
+      version="1.3.4-dev">
+    <name>Cordova Plugin Whitelist Tests</name>
+    <license>Apache 2.0</license>
+
+    <js-module src="tests.js" name="tests">
+    </js-module>
+    
+    <js-module src="www/whitelist.js" name="whitelist">
+        <clobbers target="cordova.whitelist" />
+    </js-module>
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="res/xml/config.xml" parent="/*">
+            <feature name="WhitelistAPI" >
+                <param name="android-package" value="org.apache.cordova.test.WhitelistAPI"/>
+            </feature>
+        </config-file>
+
+        <source-file src="src/android/WhitelistAPI.java" target-dir="src/org/apache/cordova/test" />
+
+        <!-- remove <access origin="*" /> -->
+        <hook type="after_prepare" src="scripts/remove-access.js"/>
+
+        <!-- add whitelist configuration the tests test for -->
+        <config-file target="config.xml" parent="/*">
+            <allow-navigation href="http://*.apache.org" />
+            <allow-navigation href="https://*.apache.org" />
+        </config-file>
+
+    </platform>
+
+</plugin>
diff --git a/tests/scripts/remove-access.js b/tests/scripts/remove-access.js
index 402c2de..4d0d4ed 100644
--- a/tests/scripts/remove-access.js
+++ b/tests/scripts/remove-access.js
@@ -1,19 +1,19 @@
-var fs = require('fs');
-var path = require('path');
-var rootdir = "";
-var file = path.join(rootdir, "platforms/android/app/src/main/res/xml/config.xml");
-
-fs.readFile( file, "utf8", function( err, data )
-{
-    if (err)
-        return console.log( err );
-
-    var result = data;
-    result = result.replace( "<access origin=\"*\" />", "" );
-
-    fs.writeFile( file, result, "utf8", function( err )
-    {
-        if (err)
-            return console.log( err );
-    } );
+var fs = require('fs');
+var path = require('path');
+var rootdir = "";
+var file = path.join(rootdir, "platforms/android/app/src/main/res/xml/config.xml");
+
+fs.readFile( file, "utf8", function( err, data )
+{
+    if (err)
+        return console.log( err );
+
+    var result = data;
+    result = result.replace( "<access origin=\"*\" />", "" );
+
+    fs.writeFile( file, result, "utf8", function( err )
+    {
+        if (err)
+            return console.log( err );
+    } );
 } );
\ No newline at end of file
diff --git a/tests/src/android/WhitelistAPI.java b/tests/src/android/WhitelistAPI.java
index 1ada69f..934ffb9 100644
--- a/tests/src/android/WhitelistAPI.java
+++ b/tests/src/android/WhitelistAPI.java
@@ -1,90 +1,90 @@
-/*
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
-*/
-package org.apache.cordova.test;
-
-import org.apache.cordova.Whitelist;
-import org.apache.cordova.Config;
-
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.PluginResult;
-import org.json.JSONArray;
-import org.json.JSONException;
-
-import org.apache.cordova.PluginManager;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-public class WhitelistAPI extends CordovaPlugin {
-    /**
-     * Executes the request and returns PluginResult.
-     *
-     * @param action            The action to execute.
-     * @param args              JSONArry of arguments for the plugin.
-     * @param callbackContext   The callback id used when calling back into JavaScript.
-     * @return                  True if the action was valid, false if not.
-     */
-    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
-        if (action.equals("URLMatchesPatterns")) {
-            String url = args.getString(0);
-            JSONArray patterns = args.getJSONArray(1);
-            Whitelist whitelist = new Whitelist();
-            for (int i=0; i < patterns.length(); i++) {
-                String pattern = patterns.getString(i);
-                whitelist.addWhiteListEntry(pattern, false);
-            }
-            boolean isAllowed = whitelist.isUrlWhiteListed(url);
-            callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, isAllowed));
-            return true;
-        } else if (action.equals("URLIsAllowed")) {
-            String url = args.getString(0);
-            /* This code exists for compatibility between 3.x and 4.x versions of Cordova.
-             * Previously the CordovaWebView class had a method, getWhitelist, which would
-             * return a Whitelist object. Since the fixed whitelist is removed in Cordova 4.x,
-             * the correct call now is to shouldAllowRequest from the plugin manager.
-             */
-            Boolean isAllowed = null;
-            try {
-                Method isUrlWhiteListed = Config.class.getDeclaredMethod("isUrlWhitelisted", String.class);
-                isAllowed = (Boolean)isUrlWhiteListed.invoke(url);
-            } catch (NoSuchMethodException e) {
-            } catch (IllegalAccessException e) {
-            } catch (InvocationTargetException e) {
-            }
-            if (isAllowed == null) {
-                try {
-                    Method gpm = webView.getClass().getMethod("getPluginManager");
-                    PluginManager pm = (PluginManager)gpm.invoke(webView);
-                    Method isAllowedMethod = pm.getClass().getMethod("shouldAllowRequest", String.class);
-                    isAllowed = (Boolean)isAllowedMethod.invoke(pm, url);
-                    if (isAllowed == null) {
-                        isAllowed = false;
-                    }
-                } catch (NoSuchMethodException e) {
-                } catch (IllegalAccessException e) {
-                } catch (InvocationTargetException e) {
-                }
-            }
-
-            callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, isAllowed));
-            return true;
-        }
-        return false;
-    }
-}
+/*
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+*/
+package org.apache.cordova.test;
+
+import org.apache.cordova.Whitelist;
+import org.apache.cordova.Config;
+
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.PluginResult;
+import org.json.JSONArray;
+import org.json.JSONException;
+
+import org.apache.cordova.PluginManager;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+public class WhitelistAPI extends CordovaPlugin {
+    /**
+     * Executes the request and returns PluginResult.
+     *
+     * @param action            The action to execute.
+     * @param args              JSONArry of arguments for the plugin.
+     * @param callbackContext   The callback id used when calling back into JavaScript.
+     * @return                  True if the action was valid, false if not.
+     */
+    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
+        if (action.equals("URLMatchesPatterns")) {
+            String url = args.getString(0);
+            JSONArray patterns = args.getJSONArray(1);
+            Whitelist whitelist = new Whitelist();
+            for (int i=0; i < patterns.length(); i++) {
+                String pattern = patterns.getString(i);
+                whitelist.addWhiteListEntry(pattern, false);
+            }
+            boolean isAllowed = whitelist.isUrlWhiteListed(url);
+            callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, isAllowed));
+            return true;
+        } else if (action.equals("URLIsAllowed")) {
+            String url = args.getString(0);
+            /* This code exists for compatibility between 3.x and 4.x versions of Cordova.
+             * Previously the CordovaWebView class had a method, getWhitelist, which would
+             * return a Whitelist object. Since the fixed whitelist is removed in Cordova 4.x,
+             * the correct call now is to shouldAllowRequest from the plugin manager.
+             */
+            Boolean isAllowed = null;
+            try {
+                Method isUrlWhiteListed = Config.class.getDeclaredMethod("isUrlWhitelisted", String.class);
+                isAllowed = (Boolean)isUrlWhiteListed.invoke(url);
+            } catch (NoSuchMethodException e) {
+            } catch (IllegalAccessException e) {
+            } catch (InvocationTargetException e) {
+            }
+            if (isAllowed == null) {
+                try {
+                    Method gpm = webView.getClass().getMethod("getPluginManager");
+                    PluginManager pm = (PluginManager)gpm.invoke(webView);
+                    Method isAllowedMethod = pm.getClass().getMethod("shouldAllowRequest", String.class);
+                    isAllowed = (Boolean)isAllowedMethod.invoke(pm, url);
+                    if (isAllowed == null) {
+                        isAllowed = false;
+                    }
+                } catch (NoSuchMethodException e) {
+                } catch (IllegalAccessException e) {
+                } catch (InvocationTargetException e) {
+                }
+            }
+
+            callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, isAllowed));
+            return true;
+        }
+        return false;
+    }
+}
diff --git a/tests/tests.js b/tests/tests.js
index 7378abe..b8d0b51 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -1,214 +1,214 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-exports.defineAutoTests = function () {
-
-    var isAndroid = (cordova.platformId === "android");
-
-    describe('Whitelist API (cordova.whitelist)', function () {
-
-        it("should exist", function () {
-            expect(cordova.whitelist).toBeDefined();
-        });
-
-        describe("Match function (cordova.whitelist.match) that checks URLs against patterns", function () {
-            function expectMatchWithResult(result) {
-                return (function (url, patterns, description) {
-                    description = description || ((result ? "should accept " : "should reject ") + url + " for " + JSON.stringify(patterns));
-                    this.result = result;
-
-                    describe("Match function", function () {
-                        if (!isAndroid) {
-                            pending("Whitelist Plugin only exists for Android");
-                        }
-
-                        // Timeout is 7.5 seconds to allow physical devices enough
-                        // time to query the response. This is important for some
-                        // Android devices.
-                        var originalTimeout,
-                            cb;
-
-                        beforeEach(function (done) {
-                            originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
-                            jasmine.DEFAULT_TIMEOUT_INTERVAL = 7500;
-                            
-                            cb = jasmine.createSpy('spy').and.callFake(function () {
-                                done();
-                            });
-                            cordova.whitelist.match(url, patterns, cb);
-                        });
-
-                        afterEach(function () {
-                            jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
-                        });
-
-                        it(description, function () {
-                            expect(cb).toHaveBeenCalledWith(result);
-                        });
-                    });
-                });
-            }
-
-            var itShouldMatch = expectMatchWithResult(true);
-            var itShouldNotMatch = expectMatchWithResult(false);
-
-            it("should exist", function () {
-                expect(cordova.whitelist.match).toBeDefined();
-                expect(typeof cordova.whitelist.match).toBe("function");
-            });
-
-            itShouldMatch('http://www.apache.org/',     ['*'],  "should accept any domain for *");
-            itShouldNotMatch('http://www.apache.org/',  [],     "should not accept any domain for []");
-
-            itShouldMatch('http://apache.org/',                                             ['http://*.apache.org']);
-            itShouldMatch('http://www.apache.org/',                                         ['http://*.apache.org']);
-            itShouldMatch('http://www.apache.org/some/path',                                ['http://*.apache.org']);
-            itShouldMatch('http://some.domain.under.apache.org/',                           ['http://*.apache.org']);
-            itShouldMatch('http://user:pass@apache.org/',                                   ['http://*.apache.org']);
-            itShouldMatch('http://user:pass@www.apache.org/',                               ['http://*.apache.org']);
-            itShouldMatch('http://www.apache.org/?some=params',                             ['http://*.apache.org']);
-            itShouldNotMatch('http://apache.com/',                                          ['http://*.apache.org']);
-            itShouldNotMatch('http://www.evil.com/?url=www.apache.org',                     ['http://*.apache.org']);
-            itShouldNotMatch('http://www.evil.com/?url=http://www.apache.org',              ['http://*.apache.org']);
-            itShouldNotMatch('http://www.evil.com/?url=http%3A%2F%2Fwww%2Eapache%2Eorg',    ['http://*.apache.org']);
-            itShouldNotMatch('https://apache.org/',                                         ['http://*.apache.org']);
-            itShouldNotMatch('http://www.apache.org:pass@evil.com/',                        ['http://*.apache.org']);
-            itShouldNotMatch('http://www.apache.org.evil.com/',                             ['http://*.apache.org']);
-
-            itShouldMatch('http://www.apache.org/',     ['http://*.apache.org', 'https://*.apache.org']);
-            itShouldMatch('https://www.apache.org/',    ['http://*.apache.org', 'https://*.apache.org']);
-            itShouldNotMatch('ftp://www.apache.org/',   ['http://*.apache.org', 'https://*.apache.org']);
-            itShouldNotMatch('http://www.apache.com/',  ['http://*.apache.org', 'https://*.apache.org']);
-
-            itShouldMatch('http://www.apache.org/',         ['http://www.apache.org']);
-            itShouldNotMatch('http://build.apache.org/',    ['http://www.apache.org']);
-            itShouldNotMatch('http://apache.org/',          ['http://www.apache.org']);
-
-            itShouldMatch('http://www.apache.org/',             ['http://*/*']);
-            itShouldMatch('http://www.apache.org/foo/bar.html', ['http://*/*']);
-
-            itShouldMatch('http://www.apache.org/foo',          ['http://*/foo*']);
-            itShouldMatch('http://www.apache.org/foo/bar.html', ['http://*/foo*']);
-            itShouldNotMatch('http://www.apache.org/',          ['http://*/foo*']);
-
-            itShouldMatch('file:///foo', ['file:///*']);
-
-            itShouldMatch('file:///foo',                ['file:///foo*']);
-            itShouldMatch('file:///foo/bar.html',       ['file:///foo*']);
-            itShouldNotMatch('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/*']);
-            itShouldMatch('https://www.apache.org/',    ['*://www.apache.org/*']);
-            itShouldMatch('ftp://www.apache.org/',      ['*://www.apache.org/*']);
-            itShouldMatch('file://www.apache.org/',     ['*://www.apache.org/*']);
-            if (cordova.platformId == 'android')
-                itShouldMatch('content://www.apache.org/', ['*://www.apache.org/*']);
-            itShouldMatch('foo://www.apache.org/',      ['*://www.apache.org/*']);
-            itShouldNotMatch('http://www.apache.com/',  ['*://www.apache.org/*']);
-
-            itShouldMatch('http://www.apache.org/',     ['*.apache.org']);
-            itShouldMatch('https://www.apache.org/',    ['*.apache.org']);
-            itShouldNotMatch('ftp://www.apache.org/',   ['*.apache.org']);
-
-            itShouldMatch('http://www.apache.org:81/',                          ['http://www.apache.org:81/*']);
-            itShouldMatch('http://user:pass@www.apache.org:81/foo/bar.html',    ['http://www.apache.org:81/*']);
-            itShouldNotMatch('http://www.apache.org:80/',                       ['http://www.apache.org:81/*']);
-            itShouldNotMatch('http://www.apache.org/',                          ['http://www.apache.org:81/*']);
-            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/', ['*.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/*']);
-            itShouldNotMatch('http://www.apache.org/Foo/',      ['*://*.apache.org/foo/*']);
-            itShouldNotMatch('http://www.apache.org/Foo/bar',   ['*://*.apache.org/foo/*']);
-        });
-
-        describe("Test function (cordova.whitelist.test) that checks against config.xml", function () {
-            function expectTestWithResult(result) {
-                return (function (url, description) {
-                    description = description || ((result ? "should accept " : "should reject ") + url);
-
-                    describe("Test function", function () {
-                        if (!isAndroid) {
-                            pending("Whitelist Plugin only exists for Android");
-                        }
-
-                        var cb,
-                            originalTimeout;
-
-                        beforeEach(function (done) {
-                            originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
-                            jasmine.DEFAULT_TIMEOUT_INTERVAL = 7500;
-                            cb = jasmine.createSpy('spy').and.callFake(function (){
-                                done();
-                            });
-                            cordova.whitelist.test(url, cb);
-                        });
-
-                        afterEach(function () {
-                            jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
-                        });
-
-                        it(description, function () {
-                            expect(cb).toHaveBeenCalledWith(result);
-                        });
-                    });
-                });
-            }
-
-            var itShouldAccept = expectTestWithResult(true);
-            var itShouldReject = expectTestWithResult(false);
-
-            it("should exist", function () {
-                expect(cordova.whitelist.test).toBeDefined();
-                expect(typeof cordova.whitelist.test).toBe("function");
-            });
-
-            itShouldAccept('http://apache.org');
-            itShouldAccept('http://apache.org/');
-            itShouldAccept('http://www.apache.org/');
-            itShouldAccept('http://www.apache.org/some/path');
-            itShouldAccept('http://some.domain.under.apache.org/');
-            itShouldAccept('http://user:pass@apache.org/');
-            itShouldAccept('http://user:pass@www.apache.org/');
-            itShouldAccept('https://www.apache.org/');
-
-            itShouldReject('ftp://www.apache.org/');
-            itShouldReject('http://www.apache.com/');
-            itShouldReject('http://www.apache.org:pass@evil.com/');
-            itShouldReject('http://www.apache.org.evil.com/');
-
-            itShouldAccept('file:///foo');
-            if (cordova.platformId == 'android')
-                itShouldReject('content:///foo');
-        });
-    });
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+exports.defineAutoTests = function () {
+
+    var isAndroid = (cordova.platformId === "android");
+
+    describe('Whitelist API (cordova.whitelist)', function () {
+
+        it("should exist", function () {
+            expect(cordova.whitelist).toBeDefined();
+        });
+
+        describe("Match function (cordova.whitelist.match) that checks URLs against patterns", function () {
+            function expectMatchWithResult(result) {
+                return (function (url, patterns, description) {
+                    description = description || ((result ? "should accept " : "should reject ") + url + " for " + JSON.stringify(patterns));
+                    this.result = result;
+
+                    describe("Match function", function () {
+                        if (!isAndroid) {
+                            pending("Whitelist Plugin only exists for Android");
+                        }
+
+                        // Timeout is 7.5 seconds to allow physical devices enough
+                        // time to query the response. This is important for some
+                        // Android devices.
+                        var originalTimeout,
+                            cb;
+
+                        beforeEach(function (done) {
+                            originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
+                            jasmine.DEFAULT_TIMEOUT_INTERVAL = 7500;
+                            
+                            cb = jasmine.createSpy('spy').and.callFake(function () {
+                                done();
+                            });
+                            cordova.whitelist.match(url, patterns, cb);
+                        });
+
+                        afterEach(function () {
+                            jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
+                        });
+
+                        it(description, function () {
+                            expect(cb).toHaveBeenCalledWith(result);
+                        });
+                    });
+                });
+            }
+
+            var itShouldMatch = expectMatchWithResult(true);
+            var itShouldNotMatch = expectMatchWithResult(false);
+
+            it("should exist", function () {
+                expect(cordova.whitelist.match).toBeDefined();
+                expect(typeof cordova.whitelist.match).toBe("function");
+            });
+
+            itShouldMatch('http://www.apache.org/',     ['*'],  "should accept any domain for *");
+            itShouldNotMatch('http://www.apache.org/',  [],     "should not accept any domain for []");
+
+            itShouldMatch('http://apache.org/',                                             ['http://*.apache.org']);
+            itShouldMatch('http://www.apache.org/',                                         ['http://*.apache.org']);
+            itShouldMatch('http://www.apache.org/some/path',                                ['http://*.apache.org']);
+            itShouldMatch('http://some.domain.under.apache.org/',                           ['http://*.apache.org']);
+            itShouldMatch('http://user:pass@apache.org/',                                   ['http://*.apache.org']);
+            itShouldMatch('http://user:pass@www.apache.org/',                               ['http://*.apache.org']);
+            itShouldMatch('http://www.apache.org/?some=params',                             ['http://*.apache.org']);
+            itShouldNotMatch('http://apache.com/',                                          ['http://*.apache.org']);
+            itShouldNotMatch('http://www.evil.com/?url=www.apache.org',                     ['http://*.apache.org']);
+            itShouldNotMatch('http://www.evil.com/?url=http://www.apache.org',              ['http://*.apache.org']);
+            itShouldNotMatch('http://www.evil.com/?url=http%3A%2F%2Fwww%2Eapache%2Eorg',    ['http://*.apache.org']);
+            itShouldNotMatch('https://apache.org/',                                         ['http://*.apache.org']);
+            itShouldNotMatch('http://www.apache.org:pass@evil.com/',                        ['http://*.apache.org']);
+            itShouldNotMatch('http://www.apache.org.evil.com/',                             ['http://*.apache.org']);
+
+            itShouldMatch('http://www.apache.org/',     ['http://*.apache.org', 'https://*.apache.org']);
+            itShouldMatch('https://www.apache.org/',    ['http://*.apache.org', 'https://*.apache.org']);
+            itShouldNotMatch('ftp://www.apache.org/',   ['http://*.apache.org', 'https://*.apache.org']);
+            itShouldNotMatch('http://www.apache.com/',  ['http://*.apache.org', 'https://*.apache.org']);
+
+            itShouldMatch('http://www.apache.org/',         ['http://www.apache.org']);
+            itShouldNotMatch('http://build.apache.org/',    ['http://www.apache.org']);
+            itShouldNotMatch('http://apache.org/',          ['http://www.apache.org']);
+
+            itShouldMatch('http://www.apache.org/',             ['http://*/*']);
+            itShouldMatch('http://www.apache.org/foo/bar.html', ['http://*/*']);
+
+            itShouldMatch('http://www.apache.org/foo',          ['http://*/foo*']);
+            itShouldMatch('http://www.apache.org/foo/bar.html', ['http://*/foo*']);
+            itShouldNotMatch('http://www.apache.org/',          ['http://*/foo*']);
+
+            itShouldMatch('file:///foo', ['file:///*']);
+
+            itShouldMatch('file:///foo',                ['file:///foo*']);
+            itShouldMatch('file:///foo/bar.html',       ['file:///foo*']);
+            itShouldNotMatch('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/*']);
+            itShouldMatch('https://www.apache.org/',    ['*://www.apache.org/*']);
+            itShouldMatch('ftp://www.apache.org/',      ['*://www.apache.org/*']);
+            itShouldMatch('file://www.apache.org/',     ['*://www.apache.org/*']);
+            if (cordova.platformId == 'android')
+                itShouldMatch('content://www.apache.org/', ['*://www.apache.org/*']);
+            itShouldMatch('foo://www.apache.org/',      ['*://www.apache.org/*']);
+            itShouldNotMatch('http://www.apache.com/',  ['*://www.apache.org/*']);
+
+            itShouldMatch('http://www.apache.org/',     ['*.apache.org']);
+            itShouldMatch('https://www.apache.org/',    ['*.apache.org']);
+            itShouldNotMatch('ftp://www.apache.org/',   ['*.apache.org']);
+
+            itShouldMatch('http://www.apache.org:81/',                          ['http://www.apache.org:81/*']);
+            itShouldMatch('http://user:pass@www.apache.org:81/foo/bar.html',    ['http://www.apache.org:81/*']);
+            itShouldNotMatch('http://www.apache.org:80/',                       ['http://www.apache.org:81/*']);
+            itShouldNotMatch('http://www.apache.org/',                          ['http://www.apache.org:81/*']);
+            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/', ['*.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/*']);
+            itShouldNotMatch('http://www.apache.org/Foo/',      ['*://*.apache.org/foo/*']);
+            itShouldNotMatch('http://www.apache.org/Foo/bar',   ['*://*.apache.org/foo/*']);
+        });
+
+        describe("Test function (cordova.whitelist.test) that checks against config.xml", function () {
+            function expectTestWithResult(result) {
+                return (function (url, description) {
+                    description = description || ((result ? "should accept " : "should reject ") + url);
+
+                    describe("Test function", function () {
+                        if (!isAndroid) {
+                            pending("Whitelist Plugin only exists for Android");
+                        }
+
+                        var cb,
+                            originalTimeout;
+
+                        beforeEach(function (done) {
+                            originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
+                            jasmine.DEFAULT_TIMEOUT_INTERVAL = 7500;
+                            cb = jasmine.createSpy('spy').and.callFake(function (){
+                                done();
+                            });
+                            cordova.whitelist.test(url, cb);
+                        });
+
+                        afterEach(function () {
+                            jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
+                        });
+
+                        it(description, function () {
+                            expect(cb).toHaveBeenCalledWith(result);
+                        });
+                    });
+                });
+            }
+
+            var itShouldAccept = expectTestWithResult(true);
+            var itShouldReject = expectTestWithResult(false);
+
+            it("should exist", function () {
+                expect(cordova.whitelist.test).toBeDefined();
+                expect(typeof cordova.whitelist.test).toBe("function");
+            });
+
+            itShouldAccept('http://apache.org');
+            itShouldAccept('http://apache.org/');
+            itShouldAccept('http://www.apache.org/');
+            itShouldAccept('http://www.apache.org/some/path');
+            itShouldAccept('http://some.domain.under.apache.org/');
+            itShouldAccept('http://user:pass@apache.org/');
+            itShouldAccept('http://user:pass@www.apache.org/');
+            itShouldAccept('https://www.apache.org/');
+
+            itShouldReject('ftp://www.apache.org/');
+            itShouldReject('http://www.apache.com/');
+            itShouldReject('http://www.apache.org:pass@evil.com/');
+            itShouldReject('http://www.apache.org.evil.com/');
+
+            itShouldAccept('file:///foo');
+            if (cordova.platformId == 'android')
+                itShouldReject('content:///foo');
+        });
+    });
 }
\ No newline at end of file
diff --git a/tests/www/whitelist.js b/tests/www/whitelist.js
index 33c43f7..b342c0f 100644
--- a/tests/www/whitelist.js
+++ b/tests/www/whitelist.js
@@ -1,34 +1,34 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var argscheck = require('cordova/argscheck'),
-    exec = require('cordova/exec');
-
-module.exports = {
-    match: function(url, patterns, callback) {
-        //argscheck.checkArgs('fF', 'Whitelist.match', arguments);
-        exec(callback, callback, "WhitelistAPI", "URLMatchesPatterns", [url, patterns]);
-    },
-    test: function(url, callback) {
-        //argscheck.checkArgs('fF', 'Whitelist.test', arguments);
-        exec(callback, callback, "WhitelistAPI", "URLIsAllowed", [url]);
-    }
-}
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var argscheck = require('cordova/argscheck'),
+    exec = require('cordova/exec');
+
+module.exports = {
+    match: function(url, patterns, callback) {
+        //argscheck.checkArgs('fF', 'Whitelist.match', arguments);
+        exec(callback, callback, "WhitelistAPI", "URLMatchesPatterns", [url, patterns]);
+    },
+    test: function(url, callback) {
+        //argscheck.checkArgs('fF', 'Whitelist.test', arguments);
+        exec(callback, callback, "WhitelistAPI", "URLIsAllowed", [url]);
+    }
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org