You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/01/22 02:57:58 UTC
[34/52] [partial] support for 2.4.0rc1. "vendored" the platform libs
in. added Gord and Braden as contributors. removed dependency on unzip and
axed the old download-cordova code.
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/cordova.js
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/cordova.js b/lib/cordova-android/test/assets/www/cordova.js
new file mode 100755
index 0000000..03dae06
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/cordova.js
@@ -0,0 +1,21 @@
+/*
+ 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.
+*/
+
+document.write('<script type="text/javascript" charset="utf-8" src="../cordova.android.js"></script>');
+document.write('<script type="text/javascript" charset="utf-8" src="cordova.android.js"></script>');
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/fullscreen/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/fullscreen/index.html b/lib/cordova-android/test/assets/www/fullscreen/index.html
new file mode 100755
index 0000000..8fa24da
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/fullscreen/index.html
@@ -0,0 +1,42 @@
+<!--
+ 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.
+-->
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta name="viewport" content="width=320; user-scalable=no" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Cordova Tests</title>
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
+ </head>
+ <body onload="init();" id="stage" class="theme">
+ <h1>Full Screen Test</h1>
+ <div id="info">
+ <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
+ <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
+ <h4>Width: <span id="width"> </span>, Height: <span id="height">
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
+ </div>
+ <div id="info">
+ The app should take over the entire screen. <br>
+ The top Android status bar should not be shown.
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/htmlnotfound/error.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/htmlnotfound/error.html b/lib/cordova-android/test/assets/www/htmlnotfound/error.html
new file mode 100755
index 0000000..c1f1329
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/htmlnotfound/error.html
@@ -0,0 +1,19 @@
+<!--
+ 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.$
+-->
+This is an error page.
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/iframe/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/iframe/index.html b/lib/cordova-android/test/assets/www/iframe/index.html
new file mode 100755
index 0000000..0b3c3d7
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/iframe/index.html
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML>
+<!--
+ 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.$
+-->
+<html>
+ <head>
+ <meta name="viewport" content="width=320; user-scalable=no" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Cordova Tests</title>
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
+ <script>
+ function loadUrl(url) {
+ document.getElementById('iframe').src = url;
+ }</script>
+ </head>
+ <body onload="init();" id="stage" class="theme">
+ <h1>IFrame</h1>
+ <div id="info">
+ <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
+ <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
+ <h4>Width: <span id="width"> </span>, Height: <span id="height">
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
+ </div>
+ <div id="info">
+ Press the two buttons:<br>
+ 1. Google Maps should display in iframe.<br>
+ 2. Page 2 replaces current page.<br>
+ (NOTE: THIS BEHAVIOR IS WRONG - AND NEEDS TO BE FIXED IN FUTURE RELEASE.)
+ </div>
+ <iframe id="iframe" src="" width="90%" height="200px"></iframe>
+ <a href="javascript:" class="btn large" onclick="loadUrl('http://maps.google.com/maps?output=embed');">Google Maps</a>
+ <a href="javascript:" class="btn large" onclick="loadUrl('index2.html');">Page 2</a>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/iframe/index2.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/iframe/index2.html b/lib/cordova-android/test/assets/www/iframe/index2.html
new file mode 100755
index 0000000..abe692b
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/iframe/index2.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>
+<!--
+ 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.$
+-->
+<html>
+ <head>
+ <meta name="viewport" content="width=320; user-scalable=no" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Cordova Tests</title>
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
+ </head>
+ <body onload="init();" id="stage" class="theme">
+ <h1>IFrame window</h1>
+ <div id="info">
+ <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
+ <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
+ <h4>Width: <span id="width"> </span>, Height: <span id="height">
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
+ </div>
+ <div id="info">
+ This should display a Cordova page inside an iframe. The info above should be filled out.
+ (NOTE: THIS DOES NOT WORK AND NEEDS TO BE FIXED IN FUTURE RELEASE.)
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/index.html b/lib/cordova-android/test/assets/www/index.html
new file mode 100755
index 0000000..13f0825
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/index.html
@@ -0,0 +1,68 @@
+<!--
+ 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.
+-->
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta name="viewport" content="width=320; user-scalable=no" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Cordova Tests</title>
+ <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title">
+ <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
+ <script type="text/javascript" charset="utf-8" src="main.js"></script>
+ <script>
+ function startActivity(className) {
+ cordova.exec(function() {console.log("Success");}, function(e) {console.log("Error: "+e);}, "Activity", "start", [className]);
+ };
+
+ localStorage.lifecyclestatus = "";
+ localStorage.backgroundstatus = "";
+ </script>
+
+ </head>
+ <body onload="init();" id="stage" class="theme">
+ <h1>Cordova Android Tests</h1>
+ <div id="info">
+ <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
+ <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
+ <h4>Width: <span id="width"> </span>, Height: <span id="height">
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
+ <h4>Cordova Version: <span id="cordova"> </span></h4>
+ </div>
+ <div id="info">
+ <h4>Run each of the test activities below:</h4>
+ </div>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.jqmtabbackbutton');">Backbutton jQM tab</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.backbuttonmultipage');">Backbutton with multiple pages</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.backgroundcolor');">Background Color</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.basicauth');">Basic Authentication</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.errorurl');">Error URL</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.fullscreen');">Full Screen</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.htmlnotfound');">HTML not found</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.iframe');">IFrame</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.lifecycle');">Lifecycle</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.loading');">Loading indicator</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.menus');">Menus</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.background');">No multitasking</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.splashscreen');">Splash screen</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.timeout');">Load timeout</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.userwebview');">User WebView/Client/Chrome</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.whitelist');">Whitelist</button>
+ <button class="btn large" onclick="startActivity('org.apache.cordova.test.actions.xhr');">XHR</button>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/jqmtabbackbutton/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/jqmtabbackbutton/index.html b/lib/cordova-android/test/assets/www/jqmtabbackbutton/index.html
new file mode 100755
index 0000000..057cea7
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/jqmtabbackbutton/index.html
@@ -0,0 +1,67 @@
+<!--
+ 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.$
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Backbutton</title>
+
+<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
+<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
+<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
+<script type="text/javascript" src="../cordova.js"></script>
+
+<script>
+document.addEventListener("deviceready", onDeviceReady, false);
+
+// Without backbutton handler, each tab loaded will be popped off history until history is empty, then it will exit app.
+function handleBackButton() {
+ alert("Back Button Pressed! - exiting app");
+ navigator.app.exitApp();
+}
+
+function onDeviceReady() {
+ console.log("onDeviceReady()");
+ document.addEventListener("backbutton", handleBackButton, false);
+}
+
+
+</script>
+</head>
+<body>
+<div data-role="page" id="tabTab">
+ <div data-role="header">
+ <h1>Main</h1>
+ </div>
+ <div data-role="content" id="tabContent">
+ To test, press several tabs.<br>
+ The "backbutton" can be pressed any time to exit app.
+ </div>
+ <div data-role="footer" data-position="fixed">
+ <div data-role="navbar">
+ <ul>
+ <li><a href="tab1.html" data-transition="none">Tab 1</a>
+ </li>
+ <li><a href="tab2.html" data-transition="none">Tab 2</a>
+ </li>
+ <li><a href="tab3.html" data-transition="none">Tab 3</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab1.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab1.html b/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab1.html
new file mode 100755
index 0000000..ea7e3a9
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab1.html
@@ -0,0 +1,47 @@
+<!--
+ 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.$
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Tab 1</title>
+
+</head>
+<body>
+<div data-role="page" id="tab1Tab">
+ <div data-role="header">
+ <h1>Tab 1</h1>
+ </div>
+ <div data-role="content" id="tab1Content">
+Tab 1 content.
+ </div>
+ <div data-role="footer" data-position="fixed">
+ <div data-role="navbar">
+ <ul>
+ <li><a href="tab1.html" data-transition="none">Tab 1</a>
+ </li>
+ <li><a href="tab2.html" data-transition="none">Tab 2</a>
+ </li>
+ <li><a href="tab3.html" data-transition="none">Tab 3</a>
+ </li>
+ </ul>
+ </div>
+ <!-- /navbar -->
+ </div>
+ <!-- /footer -->
+</div>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab2.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab2.html b/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab2.html
new file mode 100755
index 0000000..afd7c02
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab2.html
@@ -0,0 +1,48 @@
+<!--
+ 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.$
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Tab 2</title>
+
+
+</head>
+<body>
+<div data-role="page" id="tab2Tab">
+ <div data-role="header">
+ <h1>Tab 2</h1>
+ </div>
+ <div data-role="content" id="tab2Content">
+Tab 2 content.
+ </div>
+ <div data-role="footer" data-position="fixed">
+ <div data-role="navbar">
+ <ul>
+ <li><a href="tab1.html" data-transition="none">Tab 1</a>
+ </li>
+ <li><a href="tab2.html" data-transition="none">Tab 2</a>
+ </li>
+ <li><a href="tab3.html" data-transition="none">Tab 3</a>
+ </li>
+ </ul>
+ </div>
+ <!-- /navbar -->
+ </div>
+ <!-- /footer -->
+</div>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab3.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab3.html b/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab3.html
new file mode 100755
index 0000000..9ed47df
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab3.html
@@ -0,0 +1,48 @@
+<!--
+ 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.$
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Tab 3</title>
+
+
+</head>
+<body>
+<div data-role="page" id="tab3Tab">
+ <div data-role="header">
+ <h1>Tab 3</h1>
+ </div>
+ <div data-role="content" id="tab3Content">
+Tab 3 content.
+ </div>
+ <div data-role="footer" data-position="fixed">
+ <div data-role="navbar">
+ <ul>
+ <li><a href="tab1.html" data-transition="none">Tab 1</a>
+ </li>
+ <li><a href="tab2.html" data-transition="none">Tab 2</a>
+ </li>
+ <li><a href="tab3.html" data-transition="none">Tab 3</a>
+ </li>
+ </ul>
+ </div>
+ <!-- /navbar -->
+ </div>
+ <!-- /footer -->
+</div>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/lifecycle/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/lifecycle/index.html b/lib/cordova-android/test/assets/www/lifecycle/index.html
new file mode 100755
index 0000000..d965924
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/lifecycle/index.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML>
+<!--
+ 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.$
+-->
+<html>
+<head>
+<head>
+<meta http-equiv="Content-type" content="text/html; charset=utf-8">
+<title>Lifecycle Page 1</title>
+<link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
+<script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
+
+<script type="text/javascript" charset="utf-8">
+
+ function onLoad() {
+ console.log("Page1: onload");
+ log("Page1: onload @ " + new Date().toLocaleTimeString());
+ document.addEventListener("deviceready", onDeviceReady, false);
+ }
+
+ function onUnLoaded() {
+ console.log("Page1: onunload");
+ log("Page1: onunload @ " + new Date().toLocaleTimeString());
+ }
+
+ function onDeviceReady() {
+ // Register the event listener
+ document.getElementById("platform").innerHTML = device.platform;
+ document.getElementById("version").innerHTML = device.version;
+ document.getElementById("uuid").innerHTML = device.uuid;
+ document.getElementById("name").innerHTML = device.name;
+ document.getElementById("width").innerHTML = screen.width;
+ document.getElementById("height").innerHTML = screen.height;
+ document.getElementById("colorDepth").innerHTML = screen.colorDepth;
+
+ document.addEventListener("pause", onPause, false);
+ document.addEventListener("resume", onResume, false);
+
+ window.setInterval(function() {
+ log("Page1: Running");
+ }, 2000);
+}
+
+ function onPause() {
+ console.log("Page1: onpause");
+ log("Page1: onpause @ " + new Date().toLocaleTimeString());
+ }
+
+ function onResume() {
+ console.log("Page1: onresume");
+ log("Page1: onresume @ " + new Date().toLocaleTimeString());
+ }
+
+ function log(s) {
+ var el = document.getElementById('status');
+ var status = el.innerHTML + s + "<br>";
+ el.innerHTML = status;
+ localStorage.lifecyclestatus = status;
+ }
+
+ function clearStatus() {
+ console.log("clear()");
+ localStorage.lifecyclestatus = "";
+ document.getElementById('status').innerHTML = "";
+ }
+
+</script>
+</head>
+<body onload="onLoad()" onunload="onUnLoaded()" id="stage" class="theme">
+ <h1>Events</h1>
+ <div id="info">
+ <h4>
+ Platform: <span id="platform"> </span>, Version: <span
+ id="version"> </span>
+ </h4>
+ <h4>
+ UUID: <span id="uuid"> </span>, Name: <span id="name"> </span>
+ </h4>
+ <h4>
+ Width: <span id="width"> </span>, Height: <span id="height">
+ </span>, Color Depth: <span id="colorDepth"></span>
+ </h4>
+ </div>
+ <div id="info">
+ <h4>Test 1</h4>
+ Press "Home" button, then return to this app to see pause/resume.<br>
+ There should be "Running" entries between pause and resume since app continues to run in the background.
+ <h4>Test 2</h4>
+ Press "Load new page" button to load a new Cordova page.<br>
+ When returning, you should see
+ <ul>
+ <li>Page2: onunload</li>
+ <li>Page1: onload</li>
+ <li>Page1: Running</li>
+ </ul>
+ </div>
+ <div id="info">
+ <h4>Info for event testing:</h4>
+ <div id="status"></div>
+ </div>
+
+ <a href="index2.html" class="btn large" >Load new page</a>
+ <a href="javascript:" class="btn large" onclick="clearStatus();">Clear status</a>
+
+ <script>
+ document.getElementById('status').innerHTML = localStorage.lifecyclestatus;
+ </script>
+</body>
+</html>
+
+
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/lifecycle/index2.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/lifecycle/index2.html b/lib/cordova-android/test/assets/www/lifecycle/index2.html
new file mode 100755
index 0000000..bfa3ed8
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/lifecycle/index2.html
@@ -0,0 +1,122 @@
+<!--
+ 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.$
+-->
+<!DOCTYPE HTML>
+<html>
+<head>
+<head>
+<meta http-equiv="Content-type" content="text/html; charset=utf-8">
+<title>Lifecycle Page 2</title>
+<link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
+<script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
+
+<script type="text/javascript" charset="utf-8">
+
+ function onLoad() {
+ console.log("Page2: onload");
+ log("Page2: onload @ " + new Date().toLocaleTimeString());
+ document.addEventListener("deviceready", onDeviceReady, false);
+ }
+
+ function onUnLoaded() {
+ console.log("Page2: onunload");
+ log("Page2: onunload @ " + new Date().toLocaleTimeString());
+ }
+
+ function onDeviceReady() {
+ // Register the event listener
+ document.getElementById("platform").innerHTML = device.platform;
+ document.getElementById("version").innerHTML = device.version;
+ document.getElementById("uuid").innerHTML = device.uuid;
+ document.getElementById("name").innerHTML = device.name;
+ document.getElementById("width").innerHTML = screen.width;
+ document.getElementById("height").innerHTML = screen.height;
+ document.getElementById("colorDepth").innerHTML = screen.colorDepth;
+
+ document.addEventListener("pause", onPause, false);
+ document.addEventListener("resume", onResume, false);
+
+ window.setInterval(function() {
+ log("Page2: Running");
+ }, 2000);
+ }
+
+ function onPause() {
+ console.log("Page2: onpause");
+ log("Page2: onpause @ " + new Date().toLocaleTimeString());
+ }
+
+ function onResume() {
+ console.log("Page2: onresume");
+ log("Page2: onresume @ " + new Date().toLocaleTimeString());
+ }
+
+ function log(s) {
+ var el = document.getElementById('status');
+ var status = el.innerHTML + s + "<br>";
+ el.innerHTML = status;
+ localStorage.lifecyclestatus = status;
+ }
+
+ function clearStatus() {
+ console.log("clear()");
+ localStorage.lifecyclestatus = "";
+ document.getElementById('status').innerHTML = "";
+ }
+
+</script>
+</head>
+<body onload="onLoad()" onunload="onUnLoaded()" id="stage" class="theme">
+ <h1>Events</h1>
+ <div id="info">
+ <h4>
+ Platform: <span id="platform"> </span>, Version: <span
+ id="version"> </span>
+ </h4>
+ <h4>
+ UUID: <span id="uuid"> </span>, Name: <span id="name"> </span>
+ </h4>
+ <h4>
+ Width: <span id="width"> </span>, Height: <span id="height">
+ </span>, Color Depth: <span id="colorDepth"></span>
+ </h4>
+ </div>
+ <div id="info">
+ You should see<br>
+ <ul>
+ <li>Page1: onunload</li>
+ <li>Page2: onload</li>
+ <li>Page2: Running</li>
+ </ul>
+ Press "backbutton" to return to Page 1.
+ </div>
+ <div id="info">
+ <h4>Info for event testing:</h4>
+ <div id="status"></div>
+ </div>
+
+ <a href="index.html" class="btn large" >Load new page</a>
+ <a href="javascript:" class="btn large" onclick="clearStatus();">Clear status</a>
+
+ <script>
+ document.getElementById('status').innerHTML = localStorage.lifecyclestatus;
+ </script>
+</body>
+</html>
+
+
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/main.js
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/main.js b/lib/cordova-android/test/assets/www/main.js
new file mode 100755
index 0000000..aa1b226
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/main.js
@@ -0,0 +1,169 @@
+/*
+ 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 deviceInfo = function() {
+ document.getElementById("platform").innerHTML = device.platform;
+ document.getElementById("version").innerHTML = device.version;
+ document.getElementById("uuid").innerHTML = device.uuid;
+ document.getElementById("name").innerHTML = device.name;
+ document.getElementById("width").innerHTML = screen.width;
+ document.getElementById("height").innerHTML = screen.height;
+ document.getElementById("colorDepth").innerHTML = screen.colorDepth;
+ var el = document.getElementById("cordova");
+ if (el) {
+ el.innerHTML = device.cordova;
+ }
+};
+
+var getLocation = function() {
+ var suc = function(p) {
+ alert(p.coords.latitude + " " + p.coords.longitude);
+ };
+ var locFail = function() {
+ };
+ navigator.geolocation.getCurrentPosition(suc, locFail);
+};
+
+var beep = function() {
+ navigator.notification.beep(2);
+};
+
+var vibrate = function() {
+ navigator.notification.vibrate(0);
+};
+
+function roundNumber(num) {
+ var dec = 3;
+ var result = Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec);
+ return result;
+}
+
+var accelerationWatch = null;
+
+function updateAcceleration(a) {
+ document.getElementById('x').innerHTML = roundNumber(a.x);
+ document.getElementById('y').innerHTML = roundNumber(a.y);
+ document.getElementById('z').innerHTML = roundNumber(a.z);
+}
+
+var toggleAccel = function() {
+ if (accelerationWatch !== null) {
+ navigator.accelerometer.clearWatch(accelerationWatch);
+ updateAcceleration({
+ x : "",
+ y : "",
+ z : ""
+ });
+ accelerationWatch = null;
+ } else {
+ var options = {};
+ options.frequency = 1000;
+ accelerationWatch = navigator.accelerometer.watchAcceleration(
+ updateAcceleration, function(ex) {
+ alert("accel fail (" + ex.name + ": " + ex.message + ")");
+ }, options);
+ }
+};
+
+var preventBehavior = function(e) {
+ e.preventDefault();
+};
+
+function dump_pic(data) {
+ var viewport = document.getElementById('viewport');
+ console.log(data);
+ viewport.style.display = "";
+ viewport.style.position = "absolute";
+ viewport.style.top = "10px";
+ viewport.style.left = "10px";
+ document.getElementById("test_img").src = "data:image/jpeg;base64," + data;
+}
+
+function fail(msg) {
+ alert(msg);
+}
+
+function show_pic() {
+ navigator.camera.getPicture(dump_pic, fail, {
+ quality : 50
+ });
+}
+
+function close() {
+ var viewport = document.getElementById('viewport');
+ viewport.style.position = "relative";
+ viewport.style.display = "none";
+}
+
+function contacts_success(contacts) {
+ alert(contacts.length
+ + ' contacts returned.'
+ + (contacts[2] && contacts[2].name ? (' Third contact is ' + contacts[2].name.formatted)
+ : ''));
+}
+
+function get_contacts() {
+ var obj = new ContactFindOptions();
+ obj.filter = "";
+ obj.multiple = true;
+ navigator.contacts.find(
+ [ "displayName", "name" ], contacts_success,
+ fail, obj);
+}
+
+function check_network() {
+ var networkState = navigator.network.connection.type;
+
+ var states = {};
+ states[Connection.UNKNOWN] = 'Unknown connection';
+ states[Connection.ETHERNET] = 'Ethernet connection';
+ states[Connection.WIFI] = 'WiFi connection';
+ states[Connection.CELL_2G] = 'Cell 2G connection';
+ states[Connection.CELL_3G] = 'Cell 3G connection';
+ states[Connection.CELL_4G] = 'Cell 4G connection';
+ states[Connection.NONE] = 'No network connection';
+
+ confirm('Connection type:\n ' + states[networkState]);
+}
+
+var watchID = null;
+
+function updateHeading(h) {
+ document.getElementById('h').innerHTML = h.magneticHeading;
+}
+
+function toggleCompass() {
+ if (watchID !== null) {
+ navigator.compass.clearWatch(watchID);
+ watchID = null;
+ updateHeading({ magneticHeading : "Off"});
+ } else {
+ var options = { frequency: 1000 };
+ watchID = navigator.compass.watchHeading(updateHeading, function(e) {
+ alert('Compass Error: ' + e.code);
+ }, options);
+ }
+}
+
+function init() {
+ // the next line makes it impossible to see Contacts on the HTC Evo since it
+ // doesn't have a scroll button
+ // document.addEventListener("touchmove", preventBehavior, false);
+ document.addEventListener("deviceready", deviceInfo, true);
+}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/master.css
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/master.css b/lib/cordova-android/test/assets/www/master.css
new file mode 100755
index 0000000..c3e3c45
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/master.css
@@ -0,0 +1,136 @@
+/*
+ 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.
+*/
+
+ body {
+ background:#222 none repeat scroll 0 0;
+ color:#666;
+ font-family:Helvetica;
+ font-size:72%;
+ line-height:1.5em;
+ margin:0;
+ border-top:1px solid #393939;
+ }
+
+ #info{
+ background:#ffa;
+ border: 1px solid #ffd324;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ clear:both;
+ margin:15px 6px 0;
+ width:295px;
+ padding:4px 0px 2px 10px;
+ }
+
+ #info > h4{
+ font-size:.95em;
+ margin:5px 0;
+ }
+
+ #stage.theme{
+ padding-top:3px;
+ }
+
+ /* Definition List */
+ #stage.theme > dl{
+ padding-top:10px;
+ clear:both;
+ margin:0;
+ list-style-type:none;
+ padding-left:10px;
+ overflow:auto;
+ }
+
+ #stage.theme > dl > dt{
+ font-weight:bold;
+ float:left;
+ margin-left:5px;
+ }
+
+ #stage.theme > dl > dd{
+ width:45px;
+ float:left;
+ color:#a87;
+ font-weight:bold;
+ }
+
+ /* Content Styling */
+ #stage.theme > h1, #stage.theme > h2, #stage.theme > p{
+ margin:1em 0 .5em 13px;
+ }
+
+ #stage.theme > h1{
+ color:#eee;
+ font-size:1.6em;
+ text-align:center;
+ margin:0;
+ margin-top:15px;
+ padding:0;
+ }
+
+ #stage.theme > h2{
+ clear:both;
+ margin:0;
+ padding:3px;
+ font-size:1em;
+ text-align:center;
+ }
+
+ /* Stage Buttons */
+ #stage.theme a.btn{
+ border: 1px solid #555;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ text-align:center;
+ display:block;
+ float:left;
+ background:#444;
+ width:150px;
+ color:#9ab;
+ font-size:1.1em;
+ text-decoration:none;
+ padding:1.2em 0;
+ margin:3px 0px 3px 5px;
+ }
+ #stage.theme a.btn.large{
+ width:308px;
+ padding:1.2em 0;
+ }
+
+ /* Stage Buttons */
+ #stage.theme button.btn{
+ border: 1px solid #555;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ text-align:center;
+ display:block;
+ float:left;
+ background:#444;
+ width:150px;
+ color:#9ab;
+ font-size:1.1em;
+ text-decoration:none;
+ padding:1.2em 0;
+ margin:3px 0px 3px 5px;
+ }
+#stage.theme button.btn.large{
+ width:308px;
+ padding:1.2em 0;
+ }
+
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/menus/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/menus/index.html b/lib/cordova-android/test/assets/www/menus/index.html
new file mode 100755
index 0000000..38322bc
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/menus/index.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>
+<!--
+ 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.$
+-->
+<html>
+ <head>
+ <meta name="viewport" content="width=320; user-scalable=no" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Cordova Tests</title>
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
+ </head>
+ <body onload="init();" id="stage" class="theme">
+ <h1>Menu Test</h1>
+ <div id="info">
+ <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
+ <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
+ <h4>Width: <span id="width"> </span>, Height: <span id="height">
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
+ </div>
+ <div id="info">
+ <h4>The menu items should be:</h4>
+ <li>Item1<br>
+ <li>Item2<br>
+ <li>Item3<br>
+ <h4>There is also a context menu. Touch and hold finger here to see:</h4>
+ <li>Context Item1<br>
+ </div>
+
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/splashscreen/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/splashscreen/index.html b/lib/cordova-android/test/assets/www/splashscreen/index.html
new file mode 100755
index 0000000..8d2cd9f
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/splashscreen/index.html
@@ -0,0 +1,40 @@
+<!--
+ 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.$
+-->
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta name="viewport" content="width=320; user-scalable=no" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Cordova Tests</title>
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
+ </head>
+ <body onload="init();" id="stage" class="theme">
+ <h1>Splash Screen Test</h1>
+ <div id="info">
+ <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
+ <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
+ <h4>Width: <span id="width"> </span>, Height: <span id="height">
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
+ </div>
+ <div id="info">
+ You should have seen the splash screen for 2 seconds.</div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/userwebview/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/userwebview/index.html b/lib/cordova-android/test/assets/www/userwebview/index.html
new file mode 100755
index 0000000..51eec6a
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/userwebview/index.html
@@ -0,0 +1,67 @@
+<!--
+ 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.$
+-->
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta name="viewport" content="width=320; user-scalable=no" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Cordova Tests</title>
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
+ </head>
+ <body onload="init();" id="stage" class="theme">
+ <h1>User WebView/Client/Chrome Test</h1>
+ <div id="info">
+ <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
+ <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
+ <h4>Width: <span id="width"> </span>, Height: <span id="height">
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
+ </div>
+ <div id="info">
+ <h4>The following should be seen in LogCat:</h4>
+ <li>userwebview: TestViewClient()<br>
+ <li>userwebview: TestChromeClient()<br>
+ <li>userwebview: onGeolocationPermissionsShowPrompt(file://)<br>
+ <li>userwebview: shouldOverrideUrlLoading(test://this_will_call_shouldOverrideUrlLoading)<br>
+
+ </div>
+ <script>
+ /**
+ * Get current location
+ */
+ console.log("getLocation()");
+
+ // Success callback
+ var success = function(p){
+ console.log("Location = "+p.coords.latitude+","+p.coords.longitude);
+ window.location = "test://this_will_call_shouldOverrideUrlLoading";
+ };
+
+ // Fail callback
+ var fail = function(e){
+ console.log("Error: "+e.code);
+ };
+
+ // Get location
+ navigator.geolocation.getCurrentPosition(success, fail, {enableHighAccuracy: true});
+
+ </script>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/whitelist/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/whitelist/index.html b/lib/cordova-android/test/assets/www/whitelist/index.html
new file mode 100755
index 0000000..cf09d4c
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/whitelist/index.html
@@ -0,0 +1,47 @@
+<!--
+ 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.$
+-->
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta name="viewport" content="width=320; user-scalable=no" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Cordova Tests</title>
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
+ </head>
+ <body onload="init();" id="stage" class="theme">
+ <h1>Whitelist Page 1</h1>
+ <div id="info">
+ <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
+ <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
+ <h4>Width: <span id="width"> </span>, Height: <span id="height">
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
+ </div>
+ <div id="info">
+ Loading Page 2 should be successful.<br>
+ Loading Page 3 should be in web browser.<br>
+ Loading Page 2 with target=_blank should be in web browser? <br>
+ (THIS DOESN'T HAPPEN.) https://issues.apache.org/jira/browse/CB-362
+ </div>
+ <a href="index2.html" class="btn large">Page 2</a>
+ <a href="http://www.google.com" class="btn large">Page 3</a>
+ <a href="index2.html" class="btn large" target="_blank">Page 2 with target=_blank</a>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/whitelist/index2.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/whitelist/index2.html b/lib/cordova-android/test/assets/www/whitelist/index2.html
new file mode 100755
index 0000000..1ba780b
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/whitelist/index2.html
@@ -0,0 +1,41 @@
+<!--
+ 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.$
+-->
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta name="viewport" content="width=320; user-scalable=no" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Cordova Tests</title>
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
+ </head>
+ <body onload="init();" id="stage" class="theme">
+ <h1>Whitelist Page 2</h1>
+ <div id="info">
+ <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
+ <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
+ <h4>Width: <span id="width"> </span>, Height: <span id="height">
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
+ </div>
+ <div id="info">
+ Press "backbutton"
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/assets/www/xhr/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/assets/www/xhr/index.html b/lib/cordova-android/test/assets/www/xhr/index.html
new file mode 100755
index 0000000..9eddb1d
--- /dev/null
+++ b/lib/cordova-android/test/assets/www/xhr/index.html
@@ -0,0 +1,66 @@
+<!--
+ 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.$
+-->
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <meta name="viewport" content="width=320; user-scalable=no" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>Cordova Tests</title>
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
+ <script>
+ function XHR(url) {
+ var xmlhttp = new XMLHttpRequest();
+ xmlhttp.onreadystatechange=function(){
+ if(xmlhttp.readyState === 4){
+ // If success
+ if (xmlhttp.status === 200) {
+ alert("XHR success. Result="+xmlhttp.responseText);
+ }
+ // If error
+ else {
+ alert("XHR error. Status="+xmlhttp.status);
+ }
+ }
+ };
+ console.log("GET "+url);
+ xmlhttp.open("GET", url , true);
+ xmlhttp.send();
+ }
+ </script>
+ </head>
+ <body onload="init();" id="stage" class="theme">
+ <h1>XHR</h1>
+ <div id="info">
+ <h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
+ <h4>UUID: <span id="uuid"> </span>, Name: <span id="name"> </span></h4>
+ <h4>Width: <span id="width"> </span>, Height: <span id="height">
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
+ </div>
+ <div id="info">
+ Press buttons below to test. You should see an alert with results displayed.
+ </div>
+ <a href="javascript:" class="btn large" onclick="XHR('file:///android_asset/www/xhr/index.html')">Load file://</a>
+ <a href="javascript:" class="btn large" onclick="XHR('http://www.google.com');">Load Google</a>
+ <!--
+ <a href="javascript:" class="btn large" onclick="XHR('content://com.android.contacts/data/1');">Load content://</a>
+ -->
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/build.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/build.xml b/lib/cordova-android/test/build.xml
new file mode 100755
index 0000000..edede82
--- /dev/null
+++ b/lib/cordova-android/test/build.xml
@@ -0,0 +1,103 @@
+<?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.
+-->
+<project name="tests" default="help">
+
+ <!-- The local.properties file is created and updated by the 'android' tool.
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+ <property file="local.properties" />
+
+ <!-- The ant.properties file can be created by you. It is only edited by the
+ 'android' tool to add properties to it.
+ This is the place to change some Ant specific build properties.
+ Here are some properties you may want to change/update:
+
+ source.dir
+ The name of the source directory. Default is 'src'.
+ out.dir
+ The name of the output directory. Default is 'bin'.
+
+ For other overridable properties, look at the beginning of the rules
+ files in the SDK, at tools/ant/build.xml
+
+ Properties related to the SDK location or the project target should
+ be updated using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems.
+
+ -->
+ <property file="ant.properties" />
+
+ <!-- The project.properties file is created and updated by the 'android'
+ tool, as well as ADT.
+
+ This contains project specific properties such as project target, and library
+ dependencies. Lower level build properties are stored in ant.properties
+ (or in .classpath for Eclipse projects).
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems. -->
+ <loadproperties srcFile="project.properties" />
+
+ <!-- quick check on sdk.dir -->
+ <fail
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
+ unless="sdk.dir"
+ />
+
+
+<!-- extension targets. Uncomment the ones where you want to do custom work
+ in between standard targets -->
+<!--
+ <target name="-pre-build">
+ </target>
+ <target name="-pre-compile">
+ </target>
+
+ /* This is typically used for code obfuscation.
+ Compiled code location: ${out.classes.absolute.dir}
+ If this is not done in place, override ${out.dex.input.absolute.dir} */
+ <target name="-post-compile">
+ </target>
+-->
+
+ <!-- Import the actual build file.
+
+ To customize existing targets, there are two options:
+ - Customize only one target:
+ - copy/paste the target into this file, *before* the
+ <import> task.
+ - customize it to your needs.
+ - Customize the whole content of build.xml
+ - copy/paste the content of the rules files (minus the top node)
+ into this file, replacing the <import> task.
+ - customize to your needs.
+
+ ***********************
+ ****** IMPORTANT ******
+ ***********************
+ In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+ in order to avoid having your file be overridden by tools such as "android update project"
+ -->
+ <!-- version-tag: 1 -->
+ <import file="${sdk.dir}/tools/ant/build.xml" />
+
+</project>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/proguard.cfg
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/proguard.cfg b/lib/cordova-android/test/proguard.cfg
new file mode 100644
index 0000000..b1cdf17
--- /dev/null
+++ b/lib/cordova-android/test/proguard.cfg
@@ -0,0 +1,40 @@
+-optimizationpasses 5
+-dontusemixedcaseclassnames
+-dontskipnonpubliclibraryclasses
+-dontpreverify
+-verbose
+-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
+
+-keep public class * extends android.app.Activity
+-keep public class * extends android.app.Application
+-keep public class * extends android.app.Service
+-keep public class * extends android.content.BroadcastReceiver
+-keep public class * extends android.content.ContentProvider
+-keep public class * extends android.app.backup.BackupAgentHelper
+-keep public class * extends android.preference.Preference
+-keep public class com.android.vending.licensing.ILicensingService
+
+-keepclasseswithmembernames class * {
+ native <methods>;
+}
+
+-keepclasseswithmembers class * {
+ public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembers class * {
+ public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+-keepclassmembers class * extends android.app.Activity {
+ public void *(android.view.View);
+}
+
+-keepclassmembers enum * {
+ public static **[] values();
+ public static ** valueOf(java.lang.String);
+}
+
+-keep class * implements android.os.Parcelable {
+ public static final android.os.Parcelable$Creator *;
+}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/project.properties
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/project.properties b/lib/cordova-android/test/project.properties
new file mode 100644
index 0000000..8d88a8c
--- /dev/null
+++ b/lib/cordova-android/test/project.properties
@@ -0,0 +1,12 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-17
+android.library.reference.1=../framework
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/res/drawable-hdpi/ic_launcher.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/res/drawable-hdpi/ic_launcher.png b/lib/cordova-android/test/res/drawable-hdpi/ic_launcher.png
new file mode 100755
index 0000000..4d27634
Binary files /dev/null and b/lib/cordova-android/test/res/drawable-hdpi/ic_launcher.png differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/res/drawable-ldpi/ic_launcher.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/res/drawable-ldpi/ic_launcher.png b/lib/cordova-android/test/res/drawable-ldpi/ic_launcher.png
new file mode 100755
index 0000000..cd5032a
Binary files /dev/null and b/lib/cordova-android/test/res/drawable-ldpi/ic_launcher.png differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/res/drawable-mdpi/ic_launcher.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/res/drawable-mdpi/ic_launcher.png b/lib/cordova-android/test/res/drawable-mdpi/ic_launcher.png
new file mode 100755
index 0000000..e79c606
Binary files /dev/null and b/lib/cordova-android/test/res/drawable-mdpi/ic_launcher.png differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/res/drawable/icon.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/res/drawable/icon.png b/lib/cordova-android/test/res/drawable/icon.png
new file mode 100755
index 0000000..697df7f
Binary files /dev/null and b/lib/cordova-android/test/res/drawable/icon.png differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/res/drawable/sandy.jpg
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/res/drawable/sandy.jpg b/lib/cordova-android/test/res/drawable/sandy.jpg
new file mode 100755
index 0000000..c956d30
Binary files /dev/null and b/lib/cordova-android/test/res/drawable/sandy.jpg differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/res/layout/main.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/res/layout/main.xml b/lib/cordova-android/test/res/layout/main.xml
new file mode 100644
index 0000000..9b002ab
--- /dev/null
+++ b/lib/cordova-android/test/res/layout/main.xml
@@ -0,0 +1,31 @@
+<?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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+
+ <org.apache.cordova.CordovaWebView
+ android:id="@+id/cordovaWebView"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" />
+
+
+</LinearLayout>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/res/values/strings.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/res/values/strings.xml b/lib/cordova-android/test/res/values/strings.xml
new file mode 100644
index 0000000..9e13e36
--- /dev/null
+++ b/lib/cordova-android/test/res/values/strings.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">CordovaTests</string>
+</resources>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/res/xml/config.xml b/lib/cordova-android/test/res/xml/config.xml
new file mode 100644
index 0000000..b9ae3a6
--- /dev/null
+++ b/lib/cordova-android/test/res/xml/config.xml
@@ -0,0 +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.
+-->
+<cordova>
+ <!--
+ access elements control the Android whitelist.
+ Domains are assumed blocked unless set otherwise
+ -->
+
+ <access origin="http://127.0.0.1*"/> <!-- allow local pages -->
+
+ <!-- <access origin="https://example.com" /> allow any secure requests to example.com -->
+ <!-- <access origin="https://example.com" subdomains="true" /> such as above, but including subdomains, such as www -->
+ <access origin=".*"/>
+
+ <log level="DEBUG"/>
+ <preference name="useBrowserHistory" value="true" />
+<plugins>
+ <plugin name="App" value="org.apache.cordova.App"/>
+ <plugin name="Activity" value="org.apache.cordova.test.ActivityPlugin"/>
+ <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
+ <plugin name="Device" value="org.apache.cordova.Device"/>
+ <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
+ <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
+ <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
+ <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
+ <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
+ <plugin name="File" value="org.apache.cordova.FileUtils"/>
+ <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
+ <plugin name="Notification" value="org.apache.cordova.Notification"/>
+ <plugin name="Storage" value="org.apache.cordova.Storage"/>
+ <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
+ <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
+ <plugin name="Capture" value="org.apache.cordova.Capture"/>
+ <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
+ <plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
+ <plugin name="Echo" value="org.apache.cordova.Echo" />
+</plugins>
+</cordova>
+
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/res/xml/cordova.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/res/xml/cordova.xml b/lib/cordova-android/test/res/xml/cordova.xml
new file mode 100755
index 0000000..4aebda4
--- /dev/null
+++ b/lib/cordova-android/test/res/xml/cordova.xml
@@ -0,0 +1,37 @@
+<?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.
+-->
+<cordova>
+ <!--
+ access elements control the Android whitelist.
+ Domains are assumed blocked unless set otherwise
+ -->
+
+ <access origin="http://127.0.0.1*"/> <!-- allow local pages -->
+
+ <!-- <access origin="https://example.com" /> allow any secure requests to example.com -->
+ <!-- <access origin="https://example.com" subdomains="true" /> such as above, but including subdomains, such as www -->
+ <!-- <access origin=".*"/> Allow all domains, suggested development use only -->
+
+ <log level="DEBUG"/>
+ <preference name="useBrowserHistory" value="true" />
+</cordova>
+
+
+
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/res/xml/plugins.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/res/xml/plugins.xml b/lib/cordova-android/test/res/xml/plugins.xml
new file mode 100644
index 0000000..17074ef
--- /dev/null
+++ b/lib/cordova-android/test/res/xml/plugins.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<plugins>
+ <plugin name="App" value="org.apache.cordova.App"/>
+ <plugin name="Activity" value="org.apache.cordova.test.ActivityPlugin"/>
+ <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
+ <plugin name="Device" value="org.apache.cordova.Device"/>
+ <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
+ <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
+ <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
+ <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
+ <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
+ <plugin name="File" value="org.apache.cordova.FileUtils"/>
+ <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
+ <plugin name="Notification" value="org.apache.cordova.Notification"/>
+ <plugin name="Storage" value="org.apache.cordova.Storage"/>
+ <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
+ <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
+ <plugin name="Capture" value="org.apache.cordova.Capture"/>
+ <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
+ <plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
+</plugins>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d61deccd/lib/cordova-android/test/src/org/apache/cordova/test/ActivityPlugin.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/src/org/apache/cordova/test/ActivityPlugin.java b/lib/cordova-android/test/src/org/apache/cordova/test/ActivityPlugin.java
new file mode 100755
index 0000000..805454a
--- /dev/null
+++ b/lib/cordova-android/test/src/org/apache/cordova/test/ActivityPlugin.java
@@ -0,0 +1,81 @@
+/*
+ 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.api.LOG;
+import org.json.JSONArray;
+import org.json.JSONException;
+
+import android.content.Intent;
+
+import org.apache.cordova.api.Plugin;
+import org.apache.cordova.api.PluginResult;
+
+/**
+ * This class provides a service.
+ */
+public class ActivityPlugin extends Plugin {
+
+ static String TAG = "ActivityPlugin";
+
+ /**
+ * Constructor.
+ */
+ public ActivityPlugin() {
+ }
+
+ /**
+ * Executes the request and returns PluginResult.
+ *
+ * @param action The action to execute.
+ * @param args JSONArry of arguments for the plugin.
+ * @param callbackId The callback id used when calling back into JavaScript.
+ * @return A PluginResult object with a status and message.
+ */
+ @Override
+ public PluginResult execute(String action, JSONArray args, String callbackId) {
+ PluginResult.Status status = PluginResult.Status.OK;
+ String result = "";
+
+ try {
+ if (action.equals("start")) {
+ this.startActivity(args.getString(0));
+ }
+ return new PluginResult(status, result);
+ } catch (JSONException e) {
+ return new PluginResult(PluginResult.Status.JSON_EXCEPTION);
+ }
+ }
+
+ // --------------------------------------------------------------------------
+ // LOCAL METHODS
+ // --------------------------------------------------------------------------
+
+ public void startActivity(String className) {
+ try {
+ Intent intent = new Intent().setClass(this.ctx.getActivity(), Class.forName(className));
+ LOG.d(TAG, "Starting activity %s", className);
+ this.ctx.getActivity().startActivity(intent);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ LOG.e(TAG, "Error starting activity %s", className);
+ }
+ }
+
+}