http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/assets/www/lifecycle/index.html ---------------------------------------------------------------------- diff --git a/test/app/src/main/assets/www/lifecycle/index.html b/test/app/src/main/assets/www/lifecycle/index.html new file mode 100755 index 0000000..25fc230 --- /dev/null +++ b/test/app/src/main/assets/www/lifecycle/index.html @@ -0,0 +1,112 @@ +<!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("deviceready").innerHTML = "fired"; + document.getElementById("cordova").innerHTML = cordova.version; + + 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>Cordova: <span id="cordova"> </span></h4> + <h4>Deviceready: <span id="deviceready"> </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-android/blob/3bbc7fb3/test/app/src/main/assets/www/lifecycle/index2.html ---------------------------------------------------------------------- diff --git a/test/app/src/main/assets/www/lifecycle/index2.html b/test/app/src/main/assets/www/lifecycle/index2.html new file mode 100755 index 0000000..9b22a0d --- /dev/null +++ b/test/app/src/main/assets/www/lifecycle/index2.html @@ -0,0 +1,110 @@ +<!-- + 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("deviceready").innerHTML = "fired"; + document.getElementById("cordova").innerHTML = cordova.version; + + 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>Cordova: <span id="cordova"> </span></h4> + <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-android/blob/3bbc7fb3/test/app/src/main/assets/www/main.js ---------------------------------------------------------------------- diff --git a/test/app/src/main/assets/www/main.js b/test/app/src/main/assets/www/main.js new file mode 100755 index 0000000..a242139 --- /dev/null +++ b/test/app/src/main/assets/www/main.js @@ -0,0 +1,27 @@ +/* + 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("deviceready").innerHTML = "fired"; + document.getElementById("cordova").innerHTML = cordova.version; +}; + +function init() { + document.addEventListener("deviceready", deviceInfo, true); +} http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/assets/www/master.css ---------------------------------------------------------------------- diff --git a/test/app/src/main/assets/www/master.css b/test/app/src/main/assets/www/master.css new file mode 100755 index 0000000..c3e3c45 --- /dev/null +++ b/test/app/src/main/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-android/blob/3bbc7fb3/test/app/src/main/assets/www/whitelist/index.html ---------------------------------------------------------------------- diff --git a/test/app/src/main/assets/www/whitelist/index.html b/test/app/src/main/assets/www/whitelist/index.html new file mode 100755 index 0000000..b9596c9 --- /dev/null +++ b/test/app/src/main/assets/www/whitelist/index.html @@ -0,0 +1,45 @@ +<!-- + 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>Cordova: <span id="cordova"> </span></h4> + <h4>Deviceready: <span id="deviceready"> </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-android/blob/3bbc7fb3/test/app/src/main/assets/www/whitelist/index2.html ---------------------------------------------------------------------- diff --git a/test/app/src/main/assets/www/whitelist/index2.html b/test/app/src/main/assets/www/whitelist/index2.html new file mode 100755 index 0000000..5d990ad --- /dev/null +++ b/test/app/src/main/assets/www/whitelist/index2.html @@ -0,0 +1,39 @@ +<!-- + 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>Cordova: <span id="cordova"> </span></h4> + <h4>Deviceready: <span id="deviceready"> </span></h4> + </div> + <div id="info"> + Press "backbutton" + </div> + </body> +</html> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/java/org/apache/cordova/unittests/EmbeddedWebViewActivity.java ---------------------------------------------------------------------- diff --git a/test/app/src/main/java/org/apache/cordova/unittests/EmbeddedWebViewActivity.java b/test/app/src/main/java/org/apache/cordova/unittests/EmbeddedWebViewActivity.java new file mode 100644 index 0000000..2e60ba5 --- /dev/null +++ b/test/app/src/main/java/org/apache/cordova/unittests/EmbeddedWebViewActivity.java @@ -0,0 +1,110 @@ +/* + 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.unittests; + +import android.content.Intent; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.util.Log; + +import org.apache.cordova.ConfigXmlParser; +import org.apache.cordova.CordovaInterfaceImpl; +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.CordovaWebViewImpl; +import org.apache.cordova.PluginManager; +import org.apache.cordova.engine.SystemWebView; +import org.apache.cordova.engine.SystemWebViewEngine; +import org.json.JSONException; + +public class EmbeddedWebViewActivity extends AppCompatActivity { + + public CordovaWebView webInterface; + private CordovaInterfaceImpl cordovaInterface = new CordovaInterfaceImpl(this); + private String TAG = "CordovaTestActivity"; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + //Set up the webview + ConfigXmlParser parser = new ConfigXmlParser(); + parser.parse(this); + + SystemWebView webView = (SystemWebView) findViewById(R.id.cordovaWebView); + webInterface = new CordovaWebViewImpl(new SystemWebViewEngine(webView)); + webInterface.init(cordovaInterface, parser.getPluginEntries(), parser.getPreferences()); + + webView.loadUrl(parser.getLaunchUrl()); + } + + // This is still required by Cordova + @Override + public void onDestroy() + { + super.onDestroy(); + PluginManager pluginManager = webInterface.getPluginManager(); + if(pluginManager != null) + { + pluginManager.onDestroy(); + } + + } + + /** + * Called when an activity you launched exits, giving you the requestCode you started it with, + * the resultCode it returned, and any additional data from it. + * + * @param requestCode The request code originally supplied to startActivityForResult(), + * allowing you to identify who this result came from. + * @param resultCode The integer result code returned by the child activity through its setResult(). + * @param intent An Intent, which can return result data to the caller (various data can be attached to Intent "extras"). + */ + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent intent) { + super.onActivityResult(requestCode, resultCode, intent); + cordovaInterface.onActivityResult(requestCode, resultCode, intent); + } + + /** + * Called by the system when the user grants permissions! + * + * Note: The fragment gets priority over the activity, since the activity doesn't call + * into the parent onRequestPermissionResult, which is why there's no override. + * + * @param requestCode + * @param permissions + * @param grantResults + */ + public void onRequestPermissionsResult(int requestCode, String permissions[], + int[] grantResults) { + try + { + cordovaInterface.onRequestPermissionResult(requestCode, permissions, grantResults); + } + catch (JSONException e) + { + Log.d(TAG, "JSONException: Parameters fed into the method are not valid"); + e.printStackTrace(); + } + + } + +} http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/java/org/apache/cordova/unittests/LifeCyclePlugin.java ---------------------------------------------------------------------- diff --git a/test/app/src/main/java/org/apache/cordova/unittests/LifeCyclePlugin.java b/test/app/src/main/java/org/apache/cordova/unittests/LifeCyclePlugin.java new file mode 100644 index 0000000..deaf74d --- /dev/null +++ b/test/app/src/main/java/org/apache/cordova/unittests/LifeCyclePlugin.java @@ -0,0 +1,49 @@ +/* + 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.unittests; + +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.LOG; + +public class LifeCyclePlugin extends CordovaPlugin { + + static String TAG = "LifeCyclePlugin"; + String calls = ""; + + @Override + public void onStart() { + calls += "start,"; + LOG.d(TAG, "onStart"); + } + @Override + public void onPause(boolean multitasking) { + calls += "pause,"; + LOG.d(TAG, "onPause"); + } + @Override + public void onResume(boolean multitasking) { + calls += "resume,"; + LOG.d(TAG, "onResume"); + } + @Override + public void onStop() { + calls += "stop,"; + LOG.d(TAG, "onStop"); + } +} http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/java/org/apache/cordova/unittests/StandardActivity.java ---------------------------------------------------------------------- diff --git a/test/app/src/main/java/org/apache/cordova/unittests/StandardActivity.java b/test/app/src/main/java/org/apache/cordova/unittests/StandardActivity.java new file mode 100644 index 0000000..9e7cce9 --- /dev/null +++ b/test/app/src/main/java/org/apache/cordova/unittests/StandardActivity.java @@ -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. +*/ + +package org.apache.cordova.unittests; + +import android.os.Bundle; + +import org.apache.cordova.CordovaActivity; + +public class StandardActivity extends CordovaActivity { + + @Override + public void onCreate(Bundle savedInstanceState) + { + super.onCreate(savedInstanceState); + + // enable Cordova apps to be started in the background + Bundle extras = getIntent().getExtras(); + if (extras != null && extras.getBoolean("cdvStartInBackground", false)) { + moveTaskToBack(true); + } + + // Set by <content src="index.html" /> in config.xml + loadUrl(launchUrl); + } +} http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/java/org/apache/cordova/unittests/TestActivity.java ---------------------------------------------------------------------- diff --git a/test/app/src/main/java/org/apache/cordova/unittests/TestActivity.java b/test/app/src/main/java/org/apache/cordova/unittests/TestActivity.java new file mode 100644 index 0000000..024a131 --- /dev/null +++ b/test/app/src/main/java/org/apache/cordova/unittests/TestActivity.java @@ -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. +*/ + +package org.apache.cordova.unittests; + +import android.os.Bundle; + +import org.apache.cordova.CordovaActivity; +import org.apache.cordova.CordovaWebView; + +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.RunnableFuture; + +/** + * The purpose of this activity is to allow the test framework to manipulate the start url, which + * is normally locked down by CordovaActivity to standard users who aren't editing their Java code. + */ + +public class TestActivity extends CordovaActivity { + + public final ArrayBlockingQueue<String> onPageFinishedUrl = new ArrayBlockingQueue<String>(500); + + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // enable Cordova apps to be started in the background + Bundle extras = getIntent().getExtras(); + if (extras != null) { + if (extras.getBoolean("cdvStartInBackground", false)) { + moveTaskToBack(true); + } + launchUrl = extras.getString("startUrl", "index.html"); + } + + // Set by <content src="index.html" /> in config.xml + loadUrl(launchUrl); + } + + @Override + public Object onMessage(String id, Object data) { + if ("onPageFinished".equals(id)) { + onPageFinishedUrl.add((String) data); + } + return super.onMessage(id, data); + } + + public CordovaWebView getWebInterface() { return this.appView; } + +} http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/res/layout/activity_main.xml ---------------------------------------------------------------------- diff --git a/test/app/src/main/res/layout/activity_main.xml b/test/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..8a859fe --- /dev/null +++ b/test/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/activity_main" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingBottom="@dimen/activity_vertical_margin" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin" + tools:context="org.apache.cordova.unittests.EmbeddedWebViewActivity"> + <org.apache.cordova.engine.SystemWebView + android:id="@+id/cordovaWebView" + android:layout_width="fill_parent" + android:layout_height="fill_parent" /> +</RelativeLayout> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/res/mipmap-hdpi/ic_launcher.png ---------------------------------------------------------------------- diff --git a/test/app/src/main/res/mipmap-hdpi/ic_launcher.png b/test/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..cde69bc Binary files /dev/null and b/test/app/src/main/res/mipmap-hdpi/ic_launcher.png differ http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/res/mipmap-mdpi/ic_launcher.png ---------------------------------------------------------------------- diff --git a/test/app/src/main/res/mipmap-mdpi/ic_launcher.png b/test/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..c133a0c Binary files /dev/null and b/test/app/src/main/res/mipmap-mdpi/ic_launcher.png differ http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/res/mipmap-xhdpi/ic_launcher.png ---------------------------------------------------------------------- diff --git a/test/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/test/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..bfa42f0 Binary files /dev/null and b/test/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/res/mipmap-xxhdpi/ic_launcher.png ---------------------------------------------------------------------- diff --git a/test/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/test/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..324e72c Binary files /dev/null and b/test/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png ---------------------------------------------------------------------- diff --git a/test/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/test/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..aee44e1 Binary files /dev/null and b/test/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/res/values-w820dp/dimens.xml ---------------------------------------------------------------------- diff --git a/test/app/src/main/res/values-w820dp/dimens.xml b/test/app/src/main/res/values-w820dp/dimens.xml new file mode 100644 index 0000000..63fc816 --- /dev/null +++ b/test/app/src/main/res/values-w820dp/dimens.xml @@ -0,0 +1,6 @@ +<resources> + <!-- Example customization of dimensions originally defined in res/values/dimens.xml + (such as screen margins) for screens with more than 820dp of available width. This + would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). --> + <dimen name="activity_horizontal_margin">64dp</dimen> +</resources> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/res/values/colors.xml ---------------------------------------------------------------------- diff --git a/test/app/src/main/res/values/colors.xml b/test/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..3ab3e9c --- /dev/null +++ b/test/app/src/main/res/values/colors.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="colorPrimary">#3F51B5</color> + <color name="colorPrimaryDark">#303F9F</color> + <color name="colorAccent">#FF4081</color> +</resources> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/res/values/dimens.xml ---------------------------------------------------------------------- diff --git a/test/app/src/main/res/values/dimens.xml b/test/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000..47c8224 --- /dev/null +++ b/test/app/src/main/res/values/dimens.xml @@ -0,0 +1,5 @@ +<resources> + <!-- Default screen margins, per the Android Design guidelines. --> + <dimen name="activity_horizontal_margin">16dp</dimen> + <dimen name="activity_vertical_margin">16dp</dimen> +</resources> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/res/values/strings.xml ---------------------------------------------------------------------- diff --git a/test/app/src/main/res/values/strings.xml b/test/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..1555791 --- /dev/null +++ b/test/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ +<resources> + <string name="app_name">UnitTests</string> +</resources> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/res/values/styles.xml ---------------------------------------------------------------------- diff --git a/test/app/src/main/res/values/styles.xml b/test/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..5885930 --- /dev/null +++ b/test/app/src/main/res/values/styles.xml @@ -0,0 +1,11 @@ +<resources> + + <!-- Base application theme. --> + <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> + <!-- Customize your theme here. --> + <item name="colorPrimary">@color/colorPrimary</item> + <item name="colorPrimaryDark">@color/colorPrimaryDark</item> + <item name="colorAccent">@color/colorAccent</item> + </style> + +</resources> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/main/res/xml/config.xml ---------------------------------------------------------------------- diff --git a/test/app/src/main/res/xml/config.xml b/test/app/src/main/res/xml/config.xml new file mode 100644 index 0000000..a824011 --- /dev/null +++ b/test/app/src/main/res/xml/config.xml @@ -0,0 +1,44 @@ +<?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. +--> +<widget id="io.cordova.helloCordova" version="2.0.0" xmlns="http://www.w3.org/ns/widgets"> + <name>Hello Cordova</name> + <description> + A sample Apache Cordova application that responds to the deviceready event. + </description> + <author email="[email protected]" href="http://cordova.io"> + Apache Cordova Team + </author> + <access origin="*.apache.org" /> + <access origin="http://*.google.com/*" /> + <access origin="https://*.google.com/*" /> + <access origin="https://*.googleapis.com/*" /> + <access origin="https://*.gstatic.com/*" /> + <content src="index.html" /> + <preference name="errorUrl" value="file:///android_asset/www/htmlnotfound/error.html" /> + <preference name="loglevel" value="DEBUG" /> + <preference name="useBrowserHistory" value="true" /> + <preference name="exit-on-suspend" value="false" /> + <preference name="showTitle" value="true" /> + <preference name="BackgroundColor" value="#000000" /> + <feature name="LifeCycle"> + <param name="android-package" value="org.apache.cordova.unittests.LifeCyclePlugin" /> + <param name="onload" value="true" /> + </feature> +</widget> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/app/src/test/java/org/apache/cordova/unittests/NativeToJsMessageQueueTest.java ---------------------------------------------------------------------- diff --git a/test/app/src/test/java/org/apache/cordova/unittests/NativeToJsMessageQueueTest.java b/test/app/src/test/java/org/apache/cordova/unittests/NativeToJsMessageQueueTest.java new file mode 100644 index 0000000..fb39096 --- /dev/null +++ b/test/app/src/test/java/org/apache/cordova/unittests/NativeToJsMessageQueueTest.java @@ -0,0 +1,126 @@ +package org.apache.cordova.unittests; + +import android.app.Activity; +import android.content.Intent; +import android.view.View; +import android.webkit.ValueCallback; + +import org.apache.cordova.CordovaInterface; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaResourceApi; +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.CordovaWebViewEngine; +import org.apache.cordova.ICordovaCookieManager; +import org.apache.cordova.NativeToJsMessageQueue; +import org.apache.cordova.PluginManager; +import org.apache.cordova.PluginResult; +import org.apache.cordova.engine.SystemWebViewEngine; +import org.json.JSONException; +import org.json.JSONObject; +import org.junit.Before; +import org.junit.Test; + +import java.util.concurrent.ExecutorService; + +import static org.junit.Assert.*; + +public class NativeToJsMessageQueueTest { + + NativeToJsMessageQueue queue = new NativeToJsMessageQueue(); + private String TEST_CALLBACK_ID = "MessageQueueTest"; + + //A queue with no bridges should not work + @Test + public void testEmptyBridge() + { + assertFalse(queue.isBridgeEnabled()); + } + + + //A queue with at least one bridge should work, using Eval Bridge + @Test + public void testEnabledBridge() + { + NativeToJsMessageQueue.BridgeMode bridge; + bridge = new NativeToJsMessageQueue.NoOpBridgeMode(); + queue.addBridgeMode(bridge); + queue.setBridgeMode(0); + assertTrue(queue.isBridgeEnabled()); + } + + //This test is for the undocumented encoding system setup for the bridge + //TODO: Document how the non-Javascript bridges are supposed to work + @Test + public void testPopAndEncode() + { + NativeToJsMessageQueue.BridgeMode bridge; + bridge = new NativeToJsMessageQueue.NoOpBridgeMode(); + queue.addBridgeMode(bridge); + queue.setBridgeMode(0); + + PluginResult result = new PluginResult(PluginResult.Status.OK); + queue.addPluginResult(result, TEST_CALLBACK_ID); + assertFalse(queue.isEmpty()); + String resultString = queue.popAndEncode(false); + String [] results = resultString.split(" "); + assertEquals(TEST_CALLBACK_ID, results[2]); + } + + //This test is for the evalBridge, which directly calls cordova.callbackFromNative, skipping + //platform specific NativeToJs code + @Test + public void testBasicPopAndEncodeAsJs() + { + NativeToJsMessageQueue.BridgeMode bridge; + bridge = new NativeToJsMessageQueue.NoOpBridgeMode(); + queue.addBridgeMode(bridge); + queue.setBridgeMode(0); + + PluginResult result = new PluginResult(PluginResult.Status.OK); + queue.addPluginResult(result, TEST_CALLBACK_ID); + assertFalse(queue.isEmpty()); + String resultString = queue.popAndEncodeAsJs(); + assertTrue(resultString.startsWith("cordova.callbackFromNative")); + } + + //This test is for the evalBridge, which directly calls cordova.callbackFromNative, skipping + //platform specific NativeToJs code + @Test + public void testStringPopAndEncodeAsJs() + { + NativeToJsMessageQueue.BridgeMode bridge; + bridge = new NativeToJsMessageQueue.NoOpBridgeMode(); + queue.addBridgeMode(bridge); + queue.setBridgeMode(0); + + PluginResult result = new PluginResult(PluginResult.Status.OK, "String Plugin Result"); + queue.addPluginResult(result, TEST_CALLBACK_ID); + assertFalse(queue.isEmpty()); + String resultString = queue.popAndEncodeAsJs(); + assertTrue(resultString.startsWith("cordova.callbackFromNative")); + } + + //This test is for the evalBridge, which directly calls cordova.callbackFromNative, skipping + //platform specific NativeToJs code + @Test + public void testJsonPopAndEncodeAsJs() + { + NativeToJsMessageQueue.BridgeMode bridge; + bridge = new NativeToJsMessageQueue.NoOpBridgeMode(); + queue.addBridgeMode(bridge); + queue.setBridgeMode(0); + + JSONObject object = new JSONObject(); + try { + object.put("test", "value"); + } catch (JSONException e) { + e.printStackTrace(); + } + PluginResult result = new PluginResult(PluginResult.Status.OK, object); + queue.addPluginResult(result, TEST_CALLBACK_ID); + assertFalse(queue.isEmpty()); + String resultString = queue.popAndEncodeAsJs(); + assertTrue(resultString.startsWith("cordova.callbackFromNative")); + } + +} http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/assets/www/backbuttonmultipage/index.html ---------------------------------------------------------------------- diff --git a/test/assets/www/backbuttonmultipage/index.html b/test/assets/www/backbuttonmultipage/index.html deleted file mode 100755 index 8739aa0..0000000 --- a/test/assets/www/backbuttonmultipage/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. ---> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Backbutton</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> - -<body onload="init();" id="stage" class="theme"> - <h1>Cordova Android Tests</h1> - <div id="info"> - <h4>Cordova: <span id="cordova"> </span></h4> - <h4>Deviceready: <span id="deviceready"> </span></h4> - </div> - <div id="info"> - <h4>Page 1</h4> - Go to next page.<br> - If returning from previous page, press "backbutton". You should exit this app. - </div> - <a href="sample2.html" class="btn large">Next page</a> -</body> -</html> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/assets/www/backbuttonmultipage/sample2.html ---------------------------------------------------------------------- diff --git a/test/assets/www/backbuttonmultipage/sample2.html b/test/assets/www/backbuttonmultipage/sample2.html deleted file mode 100755 index 0b5be64..0000000 --- a/test/assets/www/backbuttonmultipage/sample2.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. ---> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Backbutton</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> - -<body onload="init();" id="stage" class="theme"> - <h1>Cordova Android Tests</h1> - <div id="info"> - <h4>Cordova: <span id="cordova"> </span></h4> - <h4>Deviceready: <span id="deviceready"> </span></h4> - </div> - <div id="info"> - <h4>Page 2</h4> - Go to next page.<br> - If returning from previous page, press "backbutton". You should go to Page 1. - </div> - <a href="sample3.html" class="btn large">Next page</a> -</body> -</html> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/assets/www/backbuttonmultipage/sample3.html ---------------------------------------------------------------------- diff --git a/test/assets/www/backbuttonmultipage/sample3.html b/test/assets/www/backbuttonmultipage/sample3.html deleted file mode 100755 index 7aa1e3b..0000000 --- a/test/assets/www/backbuttonmultipage/sample3.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. ---> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<title>Backbutton</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> - -<body onload="init();" id="stage" class="theme"> - <h1>Cordova Android Tests</h1> - <div id="info"> - <h4>Cordova: <span id="cordova"> </span></h4> - <h4>Deviceready: <span id="deviceready"> </span></h4> - </div> - <div id="info"> - <h4>Page 3</h4> - Press the 3 buttons below. You should stay on same page.<br> - Press "backbutton" 4 times. This will go back to #test3, #test2, #test1, then return to previous Page 2.<br> - </div> - <a href="sample3.html#test1" class="btn large">page3#test1</a> - <a href="sample3.html#test2" class="btn large">page3#test2</a> - <a href="sample3.html#test3" class="btn large">page3#test3</a> -</body> -</html> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/assets/www/background/index.html ---------------------------------------------------------------------- diff --git a/test/assets/www/background/index.html b/test/assets/www/background/index.html deleted file mode 100755 index 751806b..0000000 --- a/test/assets/www/background/index.html +++ /dev/null @@ -1,103 +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>Background 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("deviceready").innerHTML = "fired"; - document.getElementById("cordova").innerHTML = cordova.version; - - 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.backgroundstatus = status; - } - - function clearStatus() { - console.log("clear()"); - localStorage.backgroundstatus = ""; - document.getElementById('status').innerHTML = ""; - } - -</script> -</head> -<body onload="onLoad()" onunload="onUnLoaded()" id="stage" class="theme"> - <h1>Events</h1> - <div id="info"> - <h4>Cordova: <span id="cordova"> </span></h4> - <h4>Deviceready: <span id="deviceready"> </span></h4> - </div> - <div id="info"> - Press "Home" button, then return to this app to see pause/resume.<br> - There shouldn't be any "Running" entries between pause and resume.<br> - </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.backgroundstatus; - </script> -</body> -</html> - - http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/assets/www/background/index2.html ---------------------------------------------------------------------- diff --git a/test/assets/www/background/index2.html b/test/assets/www/background/index2.html deleted file mode 100755 index fa5a367..0000000 --- a/test/assets/www/background/index2.html +++ /dev/null @@ -1,102 +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>Background 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("deviceready").innerHTML = "fired"; - document.getElementById("cordova").innerHTML = cordova.version; - - 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.backgroundstatus = status; - } - - function clearStatus() { - console.log("clear()"); - localStorage.backgroundstatus = ""; - document.getElementById('status').innerHTML = ""; - } - -</script> -</head> -<body onload="onLoad()" onunload="onUnLoaded()" id="stage" class="theme"> - <h1>Events</h1> - <div id="info"> - <h4>Cordova: <span id="cordova"> </span></h4> - <h4>Deviceready: <span id="deviceready"> </span></h4> - </div> - <div id="info"> - <h4>Press "Back" button to return to Page 1.</h4> - </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.backgroundstatus; - </script> -</body> -</html> - - http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/assets/www/backgroundcolor/index.html ---------------------------------------------------------------------- diff --git a/test/assets/www/backgroundcolor/index.html b/test/assets/www/backgroundcolor/index.html deleted file mode 100755 index 3b09d64..0000000 --- a/test/assets/www/backgroundcolor/index.html +++ /dev/null @@ -1,39 +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>Background Color Test</h1> - <div id="info"> - <h4>Cordova: <span id="cordova"> </span></h4> - <h4>Deviceready: <span id="deviceready"> </span></h4> - </div> - <div id="info"> - Before this page was show, you should have seen the background flash green.</br> - </div> - </body> -</html> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/assets/www/basicauth/index.html ---------------------------------------------------------------------- diff --git a/test/assets/www/basicauth/index.html b/test/assets/www/basicauth/index.html deleted file mode 100755 index 5d2bc51..0000000 --- a/test/assets/www/basicauth/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>Basic Auth</h1> - <div id="info"> - <h4>Cordova: <span id="cordova"> </span></h4> - <h4>Deviceready: <span id="deviceready"> </span></h4> - </div> - <div id="info"> - Loading link below should be successful and show page indicating username=test & password=test. <br> - </div> - <a href="http://browserspy.dk/password-ok.php" class="btn large">Test password</a> - </body> -</html> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/assets/www/cordova_plugins.js ---------------------------------------------------------------------- diff --git a/test/assets/www/cordova_plugins.js b/test/assets/www/cordova_plugins.js deleted file mode 100644 index ecad9f6..0000000 --- a/test/assets/www/cordova_plugins.js +++ /dev/null @@ -1,22 +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. -*/ - -cordova.define('cordova/plugin_list', function(require, exports, module) { - module.exports = []; -}); http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/assets/www/fullscreen/index.html ---------------------------------------------------------------------- diff --git a/test/assets/www/fullscreen/index.html b/test/assets/www/fullscreen/index.html deleted file mode 100755 index ab43cc4..0000000 --- a/test/assets/www/fullscreen/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>Full Screen Test</h1> - <div id="info"> - <h4>Cordova: <span id="cordova"> </span></h4> - <h4>Deviceready: <span id="deviceready"> </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-android/blob/3bbc7fb3/test/assets/www/htmlnotfound/error.html ---------------------------------------------------------------------- diff --git a/test/assets/www/htmlnotfound/error.html b/test/assets/www/htmlnotfound/error.html deleted file mode 100755 index 3852efe..0000000 --- a/test/assets/www/htmlnotfound/error.html +++ /dev/null @@ -1,38 +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>Expected Error</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>Expected Error</h1> - <div id="info"> - <h4>Cordova: <span id="cordova"> </span></h4> - <h4>Deviceready: <span id="deviceready"> </span></h4> - </div> - <div id="info"> - This is an expected error page because the initial href doesn't exist. - </body> -</html> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/assets/www/iframe/index.html ---------------------------------------------------------------------- diff --git a/test/assets/www/iframe/index.html b/test/assets/www/iframe/index.html deleted file mode 100755 index 7953fc2..0000000 --- a/test/assets/www/iframe/index.html +++ /dev/null @@ -1,49 +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>Cordova: <span id="cordova"> </span></h4> - <h4>Deviceready: <span id="deviceready"> </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-android/blob/3bbc7fb3/test/assets/www/iframe/index2.html ---------------------------------------------------------------------- diff --git a/test/assets/www/iframe/index2.html b/test/assets/www/iframe/index2.html deleted file mode 100755 index b1ca1b0..0000000 --- a/test/assets/www/iframe/index2.html +++ /dev/null @@ -1,40 +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>Cordova: <span id="cordova"> </span></h4> - <h4>Deviceready: <span id="deviceready"> </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-android/blob/3bbc7fb3/test/assets/www/index.html ---------------------------------------------------------------------- diff --git a/test/assets/www/index.html b/test/assets/www/index.html deleted file mode 100755 index f55aa0a..0000000 --- a/test/assets/www/index.html +++ /dev/null @@ -1,63 +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(url, opts, className) { - cordova.exec(function() {console.log("Success");}, function(e) {console.log("Error: "+e);}, "Activity", "start", [className, url, opts || {}]); - }; - - localStorage.lifecyclestatus = ""; - localStorage.backgroundstatus = ""; - </script> - - </head> - <body onload="init();" id="stage" class="theme"> - <h1>Cordova Android Native Tests</h1> - <div id="info"> - <h4>Cordova: <span id="cordova"> </span></h4> - <h4>Deviceready: <span id="deviceready"> </span></h4> - </div> - <div id="info"> - <h4>Run each of the test activities below:</h4> - </div> - <button class="btn large" onclick="startActivity('jqmtabbackbutton/index.html');">Backbutton jQM tab</button> - <button class="btn large" onclick="startActivity('backbuttonmultipage/index.html');">Backbutton with multiple pages</button> - <button class="btn large" onclick="startActivity('backgroundcolor/index.html', {backgroundcolor: -16711936});">Background Color</button> - <button class="btn large" onclick="startActivity('basicauth/index.html');">Basic Authentication</button> - <button class="btn large" onclick="startActivity('errorurl/index.html', {testErrorUrl: 'file:///android_asset/www/htmlnotfound/error.html'});">Error URL</button> - <button class="btn large" onclick="startActivity('fullscreen/index.html', {fullscreen: true});">Full Screen</button> - <button class="btn large" onclick="startActivity('htmlnotfound/index.html');">HTML not found</button> - <button class="btn large" onclick="startActivity('iframe/index.html');">IFrame</button> - <button class="btn large" onclick="startActivity('lifecycle/index.html');">Lifecycle</button> - <button class="btn large" onclick="startActivity('menus/index.html', null, 'org.apache.cordova.test.menus');">Menus</button> - <button class="btn large" onclick="startActivity('background/index.html', {keeprunning: false});">No multitasking</button> - <button class="btn large" onclick="startActivity('http://www.google.com', {loadurltimeoutvalue: 10});">Load timeout</button> - <button class="btn large" onclick="startActivity('userwebview/index.html', null, 'org.apache.cordova.test.userwebview');">User WebView/Client/Chrome</button> - <button class="btn large" onclick="startActivity('whitelist/index.html');">Whitelist</button> - <button class="btn large" onclick="startActivity('xhr/index.html');">XHR</button> - </body> -</html> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/3bbc7fb3/test/assets/www/jqmtabbackbutton/index.html ---------------------------------------------------------------------- diff --git a/test/assets/www/jqmtabbackbutton/index.html b/test/assets/www/jqmtabbackbutton/index.html deleted file mode 100755 index 8a4f3ae..0000000 --- a/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-android/blob/3bbc7fb3/test/assets/www/jqmtabbackbutton/tab1.html ---------------------------------------------------------------------- diff --git a/test/assets/www/jqmtabbackbutton/tab1.html b/test/assets/www/jqmtabbackbutton/tab1.html deleted file mode 100755 index 7d3e5a9..0000000 --- a/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-android/blob/3bbc7fb3/test/assets/www/jqmtabbackbutton/tab2.html ---------------------------------------------------------------------- diff --git a/test/assets/www/jqmtabbackbutton/tab2.html b/test/assets/www/jqmtabbackbutton/tab2.html deleted file mode 100755 index ede5596..0000000 --- a/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-android/blob/3bbc7fb3/test/assets/www/jqmtabbackbutton/tab3.html ---------------------------------------------------------------------- diff --git a/test/assets/www/jqmtabbackbutton/tab3.html b/test/assets/www/jqmtabbackbutton/tab3.html deleted file mode 100755 index ef7783c..0000000 --- a/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> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
