You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/07/05 14:48:15 UTC
[34/51] [partial] Merge master2->master
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/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
deleted file mode 100755
index 03dae06..0000000
--- a/lib/cordova-android/test/assets/www/cordova.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- 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/ac0c95be/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
deleted file mode 100755
index 8fa24da..0000000
--- a/lib/cordova-android/test/assets/www/fullscreen/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
- 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/ac0c95be/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
deleted file mode 100755
index c1f1329..0000000
--- a/lib/cordova-android/test/assets/www/htmlnotfound/error.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!--
- 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/ac0c95be/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
deleted file mode 100755
index 0b3c3d7..0000000
--- a/lib/cordova-android/test/assets/www/iframe/index.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!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/ac0c95be/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
deleted file mode 100755
index abe692b..0000000
--- a/lib/cordova-android/test/assets/www/iframe/index2.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!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/ac0c95be/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
deleted file mode 100755
index 13f0825..0000000
--- a/lib/cordova-android/test/assets/www/index.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!--
- 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/ac0c95be/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
deleted file mode 100755
index 057cea7..0000000
--- a/lib/cordova-android/test/assets/www/jqmtabbackbutton/index.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!--
- 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/ac0c95be/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
deleted file mode 100755
index ea7e3a9..0000000
--- a/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab1.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!--
- 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/ac0c95be/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
deleted file mode 100755
index afd7c02..0000000
--- a/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab2.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!--
- 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/ac0c95be/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
deleted file mode 100755
index 9ed47df..0000000
--- a/lib/cordova-android/test/assets/www/jqmtabbackbutton/tab3.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!--
- 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/ac0c95be/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
deleted file mode 100755
index d965924..0000000
--- a/lib/cordova-android/test/assets/www/lifecycle/index.html
+++ /dev/null
@@ -1,126 +0,0 @@
-<!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/ac0c95be/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
deleted file mode 100755
index bfa3ed8..0000000
--- a/lib/cordova-android/test/assets/www/lifecycle/index2.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!--
- 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/ac0c95be/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
deleted file mode 100755
index aa1b226..0000000
--- a/lib/cordova-android/test/assets/www/main.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- 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/ac0c95be/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
deleted file mode 100755
index c3e3c45..0000000
--- a/lib/cordova-android/test/assets/www/master.css
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- 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/ac0c95be/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
deleted file mode 100755
index 38322bc..0000000
--- a/lib/cordova-android/test/assets/www/menus/index.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!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/ac0c95be/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
deleted file mode 100755
index 8d2cd9f..0000000
--- a/lib/cordova-android/test/assets/www/splashscreen/index.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--
- 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/ac0c95be/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
deleted file mode 100755
index 51eec6a..0000000
--- a/lib/cordova-android/test/assets/www/userwebview/index.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!--
- 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/ac0c95be/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
deleted file mode 100755
index cf09d4c..0000000
--- a/lib/cordova-android/test/assets/www/whitelist/index.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!--
- 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/ac0c95be/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
deleted file mode 100755
index 1ba780b..0000000
--- a/lib/cordova-android/test/assets/www/whitelist/index2.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
- 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/ac0c95be/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
deleted file mode 100755
index 9eddb1d..0000000
--- a/lib/cordova-android/test/assets/www/xhr/index.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!--
- 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/ac0c95be/lib/cordova-android/test/build.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/build.xml b/lib/cordova-android/test/build.xml
deleted file mode 100755
index edede82..0000000
--- a/lib/cordova-android/test/build.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?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/ac0c95be/lib/cordova-android/test/proguard.cfg
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/proguard.cfg b/lib/cordova-android/test/proguard.cfg
deleted file mode 100644
index b1cdf17..0000000
--- a/lib/cordova-android/test/proguard.cfg
+++ /dev/null
@@ -1,40 +0,0 @@
--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/ac0c95be/lib/cordova-android/test/project.properties
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/project.properties b/lib/cordova-android/test/project.properties
deleted file mode 100644
index 8d88a8c..0000000
--- a/lib/cordova-android/test/project.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-# 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/ac0c95be/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
deleted file mode 100755
index 4d27634..0000000
Binary files a/lib/cordova-android/test/res/drawable-hdpi/ic_launcher.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/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
deleted file mode 100755
index cd5032a..0000000
Binary files a/lib/cordova-android/test/res/drawable-ldpi/ic_launcher.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/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
deleted file mode 100755
index e79c606..0000000
Binary files a/lib/cordova-android/test/res/drawable-mdpi/ic_launcher.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/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
deleted file mode 100755
index 697df7f..0000000
Binary files a/lib/cordova-android/test/res/drawable/icon.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/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
deleted file mode 100755
index c956d30..0000000
Binary files a/lib/cordova-android/test/res/drawable/sandy.jpg and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/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
deleted file mode 100644
index 9b002ab..0000000
--- a/lib/cordova-android/test/res/layout/main.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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/ac0c95be/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
deleted file mode 100644
index 9e13e36..0000000
--- a/lib/cordova-android/test/res/values/strings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?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/ac0c95be/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
deleted file mode 100644
index 675aeb5..0000000
--- a/lib/cordova-android/test/res/xml/config.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?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="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" />
- <plugin name="Globalization" value="org.apache.cordova.Globalization"/>
- <plugin name="InAppBrowser" value="org.apache.cordova.InAppBrowser"/>
-</plugins>
-</cordova>
-
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/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
deleted file mode 100755
index 0c1d1da..0000000
--- a/lib/cordova-android/test/src/org/apache/cordova/test/ActivityPlugin.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- 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.CordovaArgs;
-import org.apache.cordova.api.LOG;
-import org.json.JSONArray;
-import org.json.JSONException;
-
-import android.content.Intent;
-
-import org.apache.cordova.api.CallbackContext;
-import org.apache.cordova.api.CordovaPlugin;
-import org.apache.cordova.api.PluginResult;
-
-/**
- * This class provides a service.
- */
-public class ActivityPlugin extends CordovaPlugin {
-
- 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.
- */
- public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) {
- PluginResult result = new PluginResult(PluginResult.Status.OK, "");
- try {
- if (action.equals("start")) {
- this.startActivity(args.getString(0));
- callbackContext.sendPluginResult(result);
- callbackContext.success();
- return true;
- }
- } catch (JSONException e) {
- result = new PluginResult(PluginResult.Status.JSON_EXCEPTION, "JSON Exception");
- callbackContext.sendPluginResult(result);
- return false;
- }
- return false;
- }
-
- // --------------------------------------------------------------------------
- // LOCAL METHODS
- // --------------------------------------------------------------------------
-
- public void startActivity(String className) {
- try {
- Intent intent = new Intent().setClass(this.cordova.getActivity(), Class.forName(className));
- LOG.d(TAG, "Starting activity %s", className);
- this.cordova.getActivity().startActivity(intent);
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- LOG.e(TAG, "Error starting activity %s", className);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/test/src/org/apache/cordova/test/BackButtonMultiPageTest.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/test/src/org/apache/cordova/test/BackButtonMultiPageTest.java b/lib/cordova-android/test/src/org/apache/cordova/test/BackButtonMultiPageTest.java
deleted file mode 100644
index 6d4a7ac..0000000
--- a/lib/cordova-android/test/src/org/apache/cordova/test/BackButtonMultiPageTest.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package org.apache.cordova.test;
-/*
- *
- * 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.
- *
-*/
-
-
-import org.apache.cordova.CordovaWebView;
-import org.apache.cordova.test.actions.backbuttonmultipage;
-
-import android.test.ActivityInstrumentationTestCase2;
-import android.view.KeyEvent;
-import android.view.inputmethod.BaseInputConnection;
-import android.widget.FrameLayout;
-import android.widget.LinearLayout;
-
-public class BackButtonMultiPageTest extends ActivityInstrumentationTestCase2<backbuttonmultipage> {
-
- private int TIMEOUT = 1000;
- backbuttonmultipage testActivity;
- private FrameLayout containerView;
- private LinearLayout innerContainer;
- private CordovaWebView testView;
-
-
- public BackButtonMultiPageTest() {
- super("org.apache.cordova.test", backbuttonmultipage.class);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- testActivity = this.getActivity();
- containerView = (FrameLayout) testActivity.findViewById(android.R.id.content);
- innerContainer = (LinearLayout) containerView.getChildAt(0);
- testView = (CordovaWebView) innerContainer.getChildAt(0);
- }
-
- public void testPreconditions(){
- assertNotNull(innerContainer);
- assertNotNull(testView);
- }
-
- public void testViaHref() {
- testView.sendJavascript("window.location = 'sample2.html';");
- sleep();
- String url = testView.getUrl();
- assertTrue(url.endsWith("sample2.html"));
- testView.sendJavascript("window.location = 'sample3.html';");
- sleep();
- url = testView.getUrl();
- assertTrue(url.endsWith("sample3.html"));
- boolean didGoBack = testView.backHistory();
- sleep();
- url = testView.getUrl();
- assertTrue(url.endsWith("sample2.html"));
- assertTrue(didGoBack);
- didGoBack = testView.backHistory();
- sleep();
- url = testView.getUrl();
- assertTrue(url.endsWith("index.html"));
- assertTrue(didGoBack);
- }
-
- public void testViaLoadUrl() {
- testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
- sleep();
- String url = testView.getUrl();
- assertTrue(url.endsWith("sample2.html"));
- testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
- sleep();
- url = testView.getUrl();
- assertTrue(url.endsWith("sample3.html"));
- boolean didGoBack = testView.backHistory();
- sleep();
- url = testView.getUrl();
- assertTrue(url.endsWith("sample2.html"));
- assertTrue(didGoBack);
- didGoBack = testView.backHistory();
- sleep();
- url = testView.getUrl();
- assertTrue(url.endsWith("index.html"));
- assertTrue(didGoBack);
- }
-
- public void testViaBackButtonOnView() {
- testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
- sleep();
- String url = testView.getUrl();
- assertTrue(url.endsWith("sample2.html"));
- testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
- sleep();
- url = testView.getUrl();
- assertTrue(url.endsWith("sample3.html"));
- BaseInputConnection viewConnection = new BaseInputConnection(testView, true);
- KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK);
- KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
- viewConnection.sendKeyEvent(backDown);
- viewConnection.sendKeyEvent(backUp);
- sleep();
- url = testView.getUrl();
- assertTrue(url.endsWith("sample2.html"));
- viewConnection.sendKeyEvent(backDown);
- viewConnection.sendKeyEvent(backUp);
- sleep();
- url = testView.getUrl();
- assertTrue(url.endsWith("index.html"));
- }
-
- public void testViaBackButtonOnLayout() {
- testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample2.html");
- sleep();
- String url = testView.getUrl();
- assertTrue(url.endsWith("sample2.html"));
- testView.loadUrl("file:///android_asset/www/backbuttonmultipage/sample3.html");
- sleep();
- url = testView.getUrl();
- assertTrue(url.endsWith("sample3.html"));
- BaseInputConnection viewConnection = new BaseInputConnection(containerView, true);
- KeyEvent backDown = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK);
- KeyEvent backUp = new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK);
- viewConnection.sendKeyEvent(backDown);
- viewConnection.sendKeyEvent(backUp);
- sleep();
- url = testView.getUrl();
- assertTrue(url.endsWith("sample2.html"));
- viewConnection.sendKeyEvent(backDown);
- viewConnection.sendKeyEvent(backUp);
- sleep();
- url = testView.getUrl();
- assertTrue(url.endsWith("index.html"));
- }
-
- private void sleep() {
- try {
- Thread.sleep(TIMEOUT);
- } catch (InterruptedException e) {
- fail("Unexpected Timeout");
- }
- }
-
-}
-