You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2013/06/07 00:27:08 UTC
[11/19] removed tests, use mobile spec if you want to test
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/events/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/events/index.html b/windows8/test/events/index.html
deleted file mode 100644
index d2ad8d4..0000000
--- a/windows8/test/events/index.html
+++ /dev/null
@@ -1,110 +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=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
- <title>Cordova Mobile Spec</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
- <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
- var deviceReady = false;
-
- function interceptBackbutton() {
- eventOutput("Back button intercepted");
- }
- function interceptMenubutton() {
- eventOutput("Menu button intercepted");
- }
- function interceptSearchbutton() {
- eventOutput("Search button intercepted");
- }
- function interceptResume() {
- eventOutput("Resume event intercepted");
- }
- function interceptPause() {
- eventOutput("Pause event intercepted");
- }
- function interceptOnline() {
- eventOutput("Online event intercepted");
- }
- function interceptOffline() {
- eventOutput("Offline event intercepted");
- }
-
- var eventOutput = function(s) {
- var el = document.getElementById("results");
- el.innerHTML = el.innerHTML + s + "<br>";
- };
-
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
- document.addEventListener("deviceready", function() {
- deviceReady = true;
- console.log("Device="+device.platform+" "+device.version);
- eventOutput("deviceready event: "+device.platform+" "+device.version);
- }, false);
- window.setTimeout(function() {
- if (!deviceReady) {
- alert("Error: Apache Cordova did not initialize. Demo will not run correctly.");
- }
- },1000);
- }
-
-</script>
-
- </head>
- <body onload="init();" id="stage" class="theme">
-
- <h1>Events</h1>
- <div id="info">
- <b>Results:</b><br>
- <span id="results"></span>
- </div>
- <input type="text" value="Type here to test events when fields are focused" />
- <h2>Action</h2>
- <div class="btn large" onclick="document.addEventListener('backbutton', interceptBackbutton, false);">Intercept backbutton</div>
- <div class="btn large" onclick="document.removeEventListener('backbutton', interceptBackbutton, false);">Stop intercept of backbutton</div>
- <div class="btn large" onclick="document.addEventListener('menubutton', interceptMenubutton, false);">Intercept menubutton</div>
- <div class="btn large" onclick="document.removeEventListener('menubutton', interceptMenubutton, false);">Stop intercept of menubutton</div>
- <div class="btn large" onclick="document.addEventListener('searchbutton', interceptSearchbutton, false);">Intercept searchbutton</div>
- <div class="btn large" onclick="document.removeEventListener('searchbutton', interceptSearchbutton, false);">Stop intercept of searchbutton</div>
- <div class="btn large" onclick="document.addEventListener('resume', interceptResume, false);">Intercept resume</div>
- <div class="btn large" onclick="document.removeEventListener('resume', interceptResume, false);">Stop intercept of resume</div>
- <div class="btn large" onclick="document.addEventListener('pause', interceptPause, false);">Intercept pause</div>
- <div class="btn large" onclick="document.removeEventListener('pause', interceptPause, false);">Stop intercept of pause</div>
- <div class="btn large" onclick="document.addEventListener('online', interceptOnline, false);">Intercept online</div>
- <div class="btn large" onclick="document.removeEventListener('online', interceptOnline, false);">Stop intercept of online</div>
- <div class="btn large" onclick="document.addEventListener('offline', interceptOffline, false);">Intercept offline</div>
- <div class="btn large" onclick="document.removeEventListener('offline', interceptOffline, false);">Stop intercept of offline</div>
-
- <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/images/logo.png
----------------------------------------------------------------------
diff --git a/windows8/test/images/logo.png b/windows8/test/images/logo.png
deleted file mode 100644
index 86a48a8..0000000
Binary files a/windows8/test/images/logo.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/images/smalllogo.png
----------------------------------------------------------------------
diff --git a/windows8/test/images/smalllogo.png b/windows8/test/images/smalllogo.png
deleted file mode 100644
index 0e648ef..0000000
Binary files a/windows8/test/images/smalllogo.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/images/splashscreen.png
----------------------------------------------------------------------
diff --git a/windows8/test/images/splashscreen.png b/windows8/test/images/splashscreen.png
deleted file mode 100644
index d1e6c98..0000000
Binary files a/windows8/test/images/splashscreen.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/images/storelogo.png
----------------------------------------------------------------------
diff --git a/windows8/test/images/storelogo.png b/windows8/test/images/storelogo.png
deleted file mode 100644
index dd00478..0000000
Binary files a/windows8/test/images/storelogo.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/inappbrowser/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/inappbrowser/index.html b/windows8/test/inappbrowser/index.html
deleted file mode 100644
index 1840c17..0000000
--- a/windows8/test/inappbrowser/index.html
+++ /dev/null
@@ -1,230 +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=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
- <title>Cordova Mobile Spec</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
- <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
-
-
- <script type="text/javascript" charset="utf-8">
-
- var deviceReady = false;
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
- document.addEventListener("deviceready", function() {
- deviceReady = true;
- console.log("Device="+device.platform+" "+device.version);
- }, false);
- function updateUserAgent() {
- document.getElementById("user-agent").textContent = navigator.userAgent;
- }
- updateUserAgent();
- window.setInterval(updateUserAgent, 1500);
- window.setTimeout(function() {
- if (!deviceReady) {
- alert("Error: Apache Cordova did not initialize. Demo will not run correctly.");
- }
- },1000);
- }
-
- function doOpen(url, target, params, numExpectedRedirects) {
- numExpectedRedirects = numExpectedRedirects || 0;
- var iab = window.open(url, target, params);
- if (!iab) {
- alert('window.open returned ' + iab);
- return;
- }
- var counts;
- var lastLoadStartURL;
- var wasReset = false;
- function reset() {
- counts = {
- 'loaderror': 0,
- 'loadstart': 0,
- 'loadstop': 0,
- 'exit': 0
- };
- lastLoadStartURL = '';
- }
- reset();
-
- function logEvent(e) {
- console.log('IAB event=' + JSON.stringify(e));
- counts[e.type]++;
- // Verify that event.url gets updated on redirects.
- if (e.type == 'loadstart') {
- if (e.url == lastLoadStartURL) {
- alert('Unexpected: loadstart fired multiple times for the same URL.');
- }
- lastLoadStartURL = e.url;
- }
- // Verify the right number of loadstart events were fired.
- if (e.type == 'loadstop' || e.type == 'loaderror') {
- if (e.url != lastLoadStartURL) {
- alert('Unexpected: ' + e.type + ' event.url != loadstart\'s event.url');
- }
- if (numExpectedRedirects === 0 && counts['loadstart'] !== 1) {
- // Do allow a loaderror without a loadstart (e.g. in the case of an invalid URL).
- if (!(e.type == 'loaderror' && counts['loadstart'] === 0)) {
- alert('Unexpected: got multiple loadstart events. (' + counts['loadstart'] + ')');
- }
- } else if (numExpectedRedirects > 0 && counts['loadstart'] < (numExpectedRedirects+1)) {
- alert('Unexpected: should have got at least ' + (numExpectedRedirects+1) + ' loadstart events, but got ' + counts['loadstart']);
- }
- wasReset = true;
- numExpectedRedirects = 0;
- reset();
- }
- // Verify that loadend / loaderror was called.
- if (e.type == 'exit') {
- var numStopEvents = counts['loadstop'] + counts['loaderror'];
- if (numStopEvents === 0 && !wasReset) {
- alert('Unexpected: browser closed without a loadstop or loaderror.')
- } else if (numStopEvents > 1) {
- alert('Unexpected: got multiple loadstop/loaderror events.');
- }
- }
- }
- iab.addEventListener('loaderror', logEvent, false);
- iab.addEventListener('loadstart', logEvent, false);
- iab.addEventListener('loadstop', logEvent, false);
- iab.addEventListener('exit', logEvent, false);
-
- return iab;
- }
-
- function openWithStyle(url, cssUrl, useCallback) {
- var iab = doOpen(url, '_blank', 'location=yes');
- var callback = function(results) {
- if (results && results.length === 0) {
- alert('Results verified');
- } else {
- console.log(results);
- alert('Got: ' + typeof(results) + '\n' + JSON.stringify(results));
- }
- };
- if (cssUrl) {
- iab.addEventListener('loadstop', function(event) {
- iab.insertCSS({file: cssUrl}, useCallback && callback);
- });
- } else {
- iab.addEventListener('loadstop', function(event) {
- iab.insertCSS({code:'#style-update-literal { \ndisplay: block !important; \n}'},
- useCallback && callback);
- });
- }
- }
-
- function openWithScript(url, jsUrl, useCallback) {
- var iab = doOpen(url, '_blank', 'location=yes');
- if (jsUrl) {
- iab.addEventListener('loadstop', function(event) {
- iab.executeScript({file: jsUrl}, useCallback && function(results) {
- if (results && results.length === 0) {
- alert('Results verified');
- } else {
- console.log(results);
- alert('Got: ' + typeof(results) + '\n' + JSON.stringify(results));
- }
- });
- });
- } else {
- iab.addEventListener('loadstop', function(event) {
- var code = '(function(){\n' +
- ' var header = document.getElementById("header");\n' +
- ' header.innerHTML = "Script literal successfully injected";\n' +
- ' return "abc";\n' +
- '})()';
- iab.executeScript({code:code}, useCallback && function(results) {
- if (results && results.length === 1 && results[0] === 'abc') {
- alert('Results verified');
- } else {
- console.log(results);
- alert('Got: ' + typeof(results) + '\n' + JSON.stringify(results));
- }
- });
- });
- }
- }
- </script>
- </head>
- <body onload="init();" id="stage" class="theme">
-
- <h1>InAppBrowser</h1>
- <div id="info">
- Make sure http://www.google.com is white listed. </br>
- Make sure http://www.apple.com is not in the white list.</br> In iOS, starred <span style="vertical-align:super">*</span> tests will leave the app with no way to return. </br>
- <h4>User-Agent: <span id="user-agent"> </span></h4>
- </div>
- <div onclick="backHome();">Back</div>
- <h1>Local URL</h1>
- <div class="btn large" onclick="doOpen('local.html');">Default: CordovaWebView</div>
- <div class="btn large" onclick="doOpen('local.html', '_self');">Target=Self: CordovaWebView</div>
- <div class="btn large" onclick="doOpen('local.html', '_system');">Target=System: Error</div>
- <div class="btn large" onclick="doOpen('local.html', '_blank');">Target=Blank: InAppBrowser</div>
- <div class="btn large" onclick="doOpen('local.html', 'random_string');">Target=Random: InAppBrowser</div>
- <div class="btn large" onclick="doOpen('local.html', 'random_string', 'location=no');">Target=Random, no location bar: InAppBrowser</div>
- <h1>White Listed URL</h1>
- <div class="btn large" onclick="doOpen('http://www.google.com');">Default: CordovaWebView<span style="vertical-align:super">*</span></div>
- <div class="btn large" onclick="doOpen('http://www.google.com', '_self');">Target=Self: CordovaWebView<span style="vertical-align:super">*</span></div>
- <div class="btn large" onclick="doOpen('http://www.google.com', '_system');">Target=System: System Browser</div>
- <div class="btn large" onclick="doOpen('http://www.google.com', '_blank');">Target=Blank: InAppBrowser</div>
- <div class="btn large" onclick="doOpen('http://www.google.com', 'random_string');">Target=Random: InAppBrowser</div>
- <div class="btn large" onclick="doOpen('http://www.google.com', 'random_string', 'location=no');">Target=Random, no location bar: InAppBrowser</div>
- <h1>Non White Listed URL</h1>
- <div class="btn large" onclick="doOpen('http://www.apple.com');">Default: InAppBrowser</div>
- <div class="btn large" onclick="doOpen('http://www.apple.com', '_self');">Target=Self: InAppBrowser</div>
- <div class="btn large" onclick="doOpen('http://www.apple.com', '_system');">Target=System: System</div>
- <div class="btn large" onclick="doOpen('http://www.apple.com', '_blank');">Target=Blank: InAppBrowser</div>
- <div class="btn large" onclick="doOpen('http://www.apple.com', 'random_string');">Target=Random: InAppBrowser</div>
- <div class="btn large" onclick="doOpen('http://www.apple.com', 'random_string', 'location=no');">Target=Random, no location bar: InAppBrowser</div>
- <h1>Page with redirect</h1>
- <div class="btn large" onclick="doOpen('http://google.com', 'random_string', '', 1);">http://google.com (should 301)</div>
- <div class="btn large" onclick="doOpen('http://goo.gl/pUFqg', 'random_string', '', 2);">http://www.zhihu.com/answer/16714076 (should 302)</div>
- <h1>PDF URL</h1>
- <div class="btn large" onclick="doOpen('http://www.stluciadance.com/prospectus_file/sample.pdf');">Remote URL</div>
- <div class="btn large" onclick="doOpen('local.pdf', '_blank');">Local URL</div>
- <h1>INVALID URL</h1>
- <div class="btn large" onclick="doOpen('x-ttp://www.invalid.com/', '_blank');">Invalid Scheme</div>
- <div class="btn large" onclick="doOpen('http://www.inv;alid.com/', '_blank');">Invalid Host</div>
- <div class="btn large" onclick="doOpen('nonexistent.html', '_blank');">Missing File</div>
- <h1>CSS / JS Injection</h1>
- <div class="btn large" onclick="doOpen('inject.html', '_blank');">Original Document</div>
- <div class="btn large" onclick="openWithStyle('inject.html','inject.css');">CSS File Injection</div>
- <div class="btn large" onclick="openWithStyle('inject.html','inject.css', true);">CSS File Injection (CB)</div>
- <div class="btn large" onclick="openWithStyle('inject.html');">CSS Literal Injection</div>
- <div class="btn large" onclick="openWithStyle('inject.html', null, true);">CSS Literal Injection (CB)</div>
- <div class="btn large" onclick="openWithScript('inject.html', 'inject.js');">Script File Injection</div>
- <div class="btn large" onclick="openWithScript('inject.html', 'inject.js', true);">Script File Injection (CB)</div>
- <div class="btn large" onclick="openWithScript('inject.html');">Script Literal Injection</div>
- <div class="btn large" onclick="openWithScript('inject.html', null, true);">Script Literal Injection (CB)</div>
- <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/inappbrowser/inject.css
----------------------------------------------------------------------
diff --git a/windows8/test/inappbrowser/inject.css b/windows8/test/inappbrowser/inject.css
deleted file mode 100644
index 8e9904d..0000000
--- a/windows8/test/inappbrowser/inject.css
+++ /dev/null
@@ -1,3 +0,0 @@
-#style-update-file {
- display: block !important;
-}
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/inappbrowser/inject.html
----------------------------------------------------------------------
diff --git a/windows8/test/inappbrowser/inject.html b/windows8/test/inappbrowser/inject.html
deleted file mode 100644
index 0f1efdd..0000000
--- a/windows8/test/inappbrowser/inject.html
+++ /dev/null
@@ -1,43 +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=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
- <title>Cordova Mobile Spec</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
- </head>
- <body id="stage" class="theme">
- <h1 id="header">InAppBrowser - Script / Style Injection Test</h1>
- <h2 id="style-update-file" style="display:none">Style updated from file</h2>
- <h2 id="style-update-literal" style="display:none">Style updated from literal</h2>
- </body>
- <script>
- function updateUserAgent() {
- document.getElementById("u-a").textContent = navigator.userAgent;
- }
- updateUserAgent();
- window.setInterval(updateUserAgent, 1500);
- </script>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/inappbrowser/inject.js
----------------------------------------------------------------------
diff --git a/windows8/test/inappbrowser/inject.js b/windows8/test/inappbrowser/inject.js
deleted file mode 100644
index 982c8bd..0000000
--- a/windows8/test/inappbrowser/inject.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var d = document.getElementById("header")
-d.innerHTML = "Script file successfully injected";
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/inappbrowser/local.html
----------------------------------------------------------------------
diff --git a/windows8/test/inappbrowser/local.html b/windows8/test/inappbrowser/local.html
deleted file mode 100644
index d5edbf9..0000000
--- a/windows8/test/inappbrowser/local.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=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
- <title>Cordova Mobile Spec</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
- <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
- </head>
- <body id="stage" class="theme">
- <h1>InAppBrowser - Local URL</h1>
- <div id="info">
- You have successfully loaded a local URL
- </div>
- <div>User-Agent = <span id="u-a"></span></div>
- <div><a href="http://www.google.com">Visit Google</a></div>
- <div><a href="http://www.yahoo.com">Visit Yahoo</a></div>
- <div><a href="http://www.stluciadance.com/prospectus_file/sample.pdf">Check out my remote PDF</a></div>
- <div><a href="local.pdf">Check out my local PDF</a></div>
- <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
- </body>
- <script>
- function updateUserAgent() {
- document.getElementById("u-a").textContent = navigator.userAgent;
- }
- updateUserAgent();
- window.setInterval(updateUserAgent, 1500);
- </script>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/inappbrowser/local.pdf
----------------------------------------------------------------------
diff --git a/windows8/test/inappbrowser/local.pdf b/windows8/test/inappbrowser/local.pdf
deleted file mode 100644
index b54f1b7..0000000
Binary files a/windows8/test/inappbrowser/local.pdf and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/index.html b/windows8/test/index.html
deleted file mode 100644
index 2c5447b..0000000
--- a/windows8/test/index.html
+++ /dev/null
@@ -1,65 +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=device-width,height=device-height,user-scalable=no,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
- <title>Cordova Mobile Spec</title>
- <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8">
- <script type="text/javascript" charset="utf-8" src="cordova-incl.js"></script>
- <script type="text/javascript" charset="utf-8" src="main.js"></script>
-
- </head>
- <body onload="init();" id="stage" class="theme">
- <h1>Apache Cordova Tests</h1>
- <div id="info">
- <h4>Platform: <span id="platform"> </span></h4>
- <h4>Version: <span id="version"> </span></h4>
- <h4>UUID: <span id="uuid"> </span></h4>
- <h4>Name: <span id="name"> </span></h4>
- <h4>Model: <span id="model"> </span></h4>
- <h4>Width: <span id="width"> </span>, Height: <span id="height">
- </span>, Color Depth: <span id="colorDepth"></span></h4>
- <h4>User-Agent: <span id="user-agent"> </span></h4>
- </div>
- <a href="autotest/index.html" class="btn large">Automatic Test</a>
- <a href="accelerometer/index.html" class="btn large">Accelerometer</a>
- <a href="audio/index.html" class="btn large">Audio Play/Record</a>
- <a href="battery/index.html" class="btn large">Battery</a>
- <a href="camera/index.html" class="btn large">Camera</a>
- <a href="compass/index.html" class="btn large">Compass</a>
- <a href="contacts/index.html" class="btn large">Contacts</a>
- <a href="events/index.html" class="btn large">Events</a>
- <a href="location/index.html" class="btn large">Location</a>
- <a href="lazyloadjs/index.html" class="btn large">Lazy Loading of cordova-incl.js</a>
- <a href="misc/index.html" class="btn large">Misc Content</a>
- <a href="network/index.html" class="btn large">Network</a>
- <a href="notification/index.html" class="btn large">Notification</a>
- <a href="splashscreen/index.html" class="btn large">Splashscreen</a>
- <a href="sql/index.html" class="btn large">Web SQL</a>
- <a href="storage/index.html" class="btn large">Local Storage</a>
- <a href="benchmarks/index.html" class="btn large">Benchmarks</a>
- <a href="inappbrowser/index.html" class="btn large">In App Browser</a>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/lazyloadjs/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/lazyloadjs/index.html b/windows8/test/lazyloadjs/index.html
deleted file mode 100644
index 7a0c06f..0000000
--- a/windows8/test/lazyloadjs/index.html
+++ /dev/null
@@ -1,53 +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=device-width,height=device-height,user-scalable=no,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
- <title>Lazy-Loading of cordova-incl.js test</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
- <script>_doNotWriteCordovaScript = true</script>
- <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
-<script type="text/javascript" charset="utf-8">
- function init() {
- document.addEventListener("deviceready", function() {
- console.log("Device="+device.platform+" "+device.version);
- document.getElementById('info').innerHTML = 'Cordova loaded just fine.';
- }, false);
- window.setTimeout(function() {
- var s = document.createElement('script');
- s.src = cordovaPath;
- document.body.appendChild(s);
- }, 0);
- }
-</script>
- </head>
- <body onload="init();" id="stage" class="theme">
- <h1>Lazy-Loading of cordova-incl.js</h1>
- <div id="info">
- onDeviceReady has not yet fired.
- </div>
- <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/location/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/location/index.html b/windows8/test/location/index.html
deleted file mode 100644
index 6ec2eed..0000000
--- a/windows8/test/location/index.html
+++ /dev/null
@@ -1,169 +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=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
- <title>Cordova Mobile Spec</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
- <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
- var deviceReady = false;
-
- //-------------------------------------------------------------------------
- // Location
- //-------------------------------------------------------------------------
- var watchLocationId = null;
-
- /**
- * Start watching location
- */
- var watchLocation = function(geo) {
- console.log("watchLocation()");
-
- // Success callback
- var success = function(p){
- console.log('watch location success');
- setLocationDetails(p);
- };
-
- // Fail callback
- var fail = function(e){
- console.log("watchLocation fail callback with error code "+e);
- stopLocation(geo);
- };
-
- // Get location
- watchLocationId = geo.watchPosition(success, fail, {enableHighAccuracy: true});
- setLocationStatus("Running");
- };
-
- /**
- * Stop watching the location
- */
- var stopLocation = function(geo) {
- setLocationStatus("Stopped");
- if (watchLocationId) {
- geo.clearWatch(watchLocationId);
- watchLocationId = null;
- }
- };
-
- /**
- * Get current location
- */
- var getLocation = function(geo, opts) {
- console.log("getLocation()");
-
- // Stop location if running
- stopLocation(geo);
-
- // Success callback
- var success = function(p){
- console.log('get location success');
- setLocationDetails(p);
- setLocationStatus("Done");
- };
-
- // Fail callback
- var fail = function(e){
- console.log("getLocation fail callback with error code "+e.code);
- setLocationStatus("Error: "+e.code);
- };
-
- // Get location
- geo.getCurrentPosition(success, fail, opts || {enableHighAccuracy: true}); //, {timeout: 10000});
- setLocationStatus("Retrieving location...");
-
- };
-
- /**
- * Set location status
- */
- var setLocationStatus = function(status) {
- document.getElementById('location_status').innerHTML = status;
- };
-var setLocationDetails = function(p) {
-var date = (new Date(p.timestamp));
- document.getElementById('latitude').innerHTML = p.coords.latitude;
- document.getElementById('longitude').innerHTML = p.coords.longitude;
- document.getElementById('altitude').innerHTML = p.coords.altitude;
- document.getElementById('accuracy').innerHTML = p.coords.accuracy;
- document.getElementById('heading').innerHTML = p.coords.heading;
- document.getElementById('speed').innerHTML = p.coords.speed;
- document.getElementById('altitude_accuracy').innerHTML = p.coords.altitudeAccuracy;
- document.getElementById('timestamp').innerHTML = date.toDateString() + " " + date.toTimeString();
- }
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
- document.addEventListener("deviceready", function() {
- deviceReady = true;
- console.log("Device="+device.platform+" "+device.version);
- }, false);
- window.setTimeout(function() {
- if (!deviceReady) {
- alert("Error: Apache Cordova did not initialize. Demo will not run correctly.");
- }
- },1000);
- }
-
-</script>
-
- </head>
- <body onload="init();" id="stage" class="theme">
-
- <h1>Location</h1>
- <div id="info">
- <b>Status:</b> <span id="location_status">Stopped</span>
- <table width="100%">
- <tr><td><b>Latitude:</b></td><td id="latitude"> </td></tr>
- <tr><td><b>Longitude:</b></td><td id="longitude"> </td></tr>
- <tr><td><b>Altitude:</b></td><td id="altitude"> </td></tr>
- <tr><td><b>Accuracy:</b></td><td id="accuracy"> </td></tr>
- <tr><td><b>Heading:</b></td><td id="heading"> </td></tr>
- <tr><td><b>Speed:</b></td><td id="speed"> </td></tr>
- <tr><td><b>Altitude Accuracy:</b></td><td id="altitude_accuracy"> </td></tr>
- <tr><td><b>Time:</b></td><td id="timestamp"> </td></tr>
- </table>
- </div>
- <h2>Action</h2>
- <h3>Use Built-in WebView navigator.geolocation</h3>
- <a href="javascript:" class="btn large" onclick="getLocation(navigator.geolocation);">Get Location</a>
- <a href="javascript:" class="btn large" onclick="watchLocation(navigator.geolocation);">Start Watching Location</a>
- <a href="javascript:" class="btn large" onclick="stopLocation(navigator.geolocation);">Stop Watching Location</a>
- <a href="javascript:" class="btn large" onclick="getLocation(navigator.geolocation, {maximumAge:30000});">Get Location Up to 30 Seconds Old</a>
- <h3>USe Cordova Geolocation Plugin</h3>
- <a href="javascript:" class="btn large" onclick="getLocation(cordova.require('cordova/plugin/geolocation'));">Get Location</a>
- <a href="javascript:" class="btn large" onclick="watchLocation(cordova.require('cordova/plugin/geolocation'));">Start Watching Location</a>
- <a href="javascript:" class="btn large" onclick="stopLocation(cordova.require('cordova/plugin/geolocation'));">Stop Watching Location</a>
- <a href="javascript:" class="btn large" onclick="getLocation(cordova.require('cordova/plugin/geolocation'), {maximumAge:30000});">Get Location Up to 30 Seconds Old</a>
- <h2> </h2><a href="javascript:" class="backBtn" onclick="backHome();">Back</a>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/main.js
----------------------------------------------------------------------
diff --git a/windows8/test/main.js b/windows8/test/main.js
deleted file mode 100644
index 66c1bd3..0000000
--- a/windows8/test/main.js
+++ /dev/null
@@ -1,163 +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("model").innerHTML = device.model;
- document.getElementById("width").innerHTML = screen.width;
- document.getElementById("height").innerHTML = screen.height;
- document.getElementById("colorDepth").innerHTML = screen.colorDepth;
-};
-
-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";
-}
-
-// This is just to do this.
-function readFile() {
- navigator.file.read('/sdcard/cordova.txt', fail, fail);
-}
-
-function writeFile() {
- navigator.file.write('foo.txt', "This is a test of writing to a file",
- fail, fail);
-}
-
-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;
- obj.limit = 5;
- navigator.service.contacts.find(
- [ "displayName", "name" ], contacts_success,
- fail, obj);
-}
-
-var networkReachableCallback = function(reachability) {
- // There is no consistency on the format of reachability
- var networkState = reachability.code || reachability;
-
- var currentState = {};
- currentState[NetworkStatus.NOT_REACHABLE] = 'No network connection';
- currentState[NetworkStatus.REACHABLE_VIA_CARRIER_DATA_NETWORK] = 'Carrier data connection';
- currentState[NetworkStatus.REACHABLE_VIA_WIFI_NETWORK] = 'WiFi connection';
-
- confirm("Connection type:\n" + currentState[networkState]);
-};
-
-function check_network() {
- navigator.network.isReachable("www.mobiledevelopersolutions.com",
- networkReachableCallback, {});
-}
-
-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);
- document.getElementById("user-agent").textContent = navigator.userAgent;
-}
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/master.css
----------------------------------------------------------------------
diff --git a/windows8/test/master.css b/windows8/test/master.css
deleted file mode 100644
index e93c937..0000000
--- a/windows8/test/master.css
+++ /dev/null
@@ -1,164 +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;
- min-width:295px;
- max-width:97%;
- padding:4px 0px 2px 10px;
- word-wrap:break-word;
- margin-bottom:10px;
- display:inline-block;
- min-height: 160px;
- max-height: 300px;
- overflow: auto;
- -webkit-overflow-scrolling: touch;
- }
-
- #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 .btn{
- border: 1px solid #555;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- text-align:center;
- display:inline-block;
- background:#444;
- width:150px;
- color:#9ab;
- font-size:1.1em;
- text-decoration:none;
- padding:1.2em 0;
- margin:3px 0px 3px 5px;
- }
-
- #stage.theme .large{
- width:308px;
- padding:1.2em 0;
- }
-
- #stage.theme .wide{
- width:100%;
- padding:1.2em 0;
- }
-
- #stage.theme .backBtn{
- border: 1px solid #555;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- text-align:center;
- display:block;
- float:right;
- background:#666;
- width:75px;
- color:#9ab;
- font-size:1.1em;
- text-decoration:none;
- padding:1.2em 0;
- margin:3px 5px 3px 5px;
- }
-
- #stage.theme .input{
- border: 1px solid #555;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- text-align:center;
- display:block;
- float:light;
- background:#888;
- color:#9cd;
- font-size:1.1em;
- text-decoration:none;
- padding:1.2em 0;
- margin:3px 0px 3px 5px;
- }
-
- #stage.theme .numeric{
- width:100%;
- }
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/misc/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/misc/index.html b/windows8/test/misc/index.html
deleted file mode 100644
index 48f6424..0000000
--- a/windows8/test/misc/index.html
+++ /dev/null
@@ -1,82 +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=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
- <title>Cordova Mobile Spec</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
- <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
- var deviceReady = false;
-
- function roundNumber(num) {
- var dec = 3;
- var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
- return result;
- }
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
- document.addEventListener("deviceready", function() {
- deviceReady = true;
- console.log("Device="+device.platform+" "+device.version);
- }, false);
- window.setTimeout(function() {
- if (!deviceReady) {
- alert("Error: Apache Cordova did not initialize. Demo will not run correctly.");
- }
- },1000);
- }
-
-</script>
-
- </head>
- <body onload="init();" id="stage" class="theme">
-
- <h1>Display Other Content</h1>
- <div id="info">
- </div>
- <h2>Action</h2>
- <div class="btn large" onclick="document.location='tel:5551212';" >Call 411</div>
- <a href="mailto:bob@abc.org?subject=My Subject&body=This is the body.%0D%0ANew line." class="btn large">Send Mail</a>
- <a href="sms:5125551234?body=The SMS message." class="btn large">Send SMS</a>
- <a href="http://www.google.com" class="btn large">Load Web Site</a>
- <!-- Need new URL -->
- <!-- a href="http://handle.library.cornell.edu/control/authBasic/authTest/" class="btn large">Basic Auth: test/this</a -->
- <a href="page2.html" class="btn large">Load a page with iframes</a>
- <a href="page2.html?me=test" class="btn large">Load page with query param</a>
- <h2>Android Only</h2>
- <a href="geo:0,0?q=11400 Burnet Rd, Austin, TX" class="btn large">Map IBM</a>
- <a href="market://search?q=google" class="btn large">Search Android market</a>
- <a href="content://media/external/images/media" class="btn large">View image app</a>
-
- <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/misc/page2.html
----------------------------------------------------------------------
diff --git a/windows8/test/misc/page2.html b/windows8/test/misc/page2.html
deleted file mode 100644
index 59dd6b9..0000000
--- a/windows8/test/misc/page2.html
+++ /dev/null
@@ -1,74 +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=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
- <title>Cordova Mobile Spec</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
- <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
- <script type="text/javascript" charset="utf-8" src="../main.js"></script>
- <style>
- iframe, .iframe_container {
- height:100px;
- overflow:scroll;
- }
- </style>
- </head>
- <body onload="init();" id="stage" class="theme">
- <h1>Page2 App</h1>
- <h2>This is page 2 of a Apache Cordova app</h2>
- <div id="info">
- <h4>Platform: <span id="platform"> </span></h4>
- <h4>Version: <span id="version"> </span></h4>
- <h4>UUID: <span id="uuid"> </span></h4>
- <h4>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>
- about:blank
- <div class="iframe_container">
- <iframe src="about:blank"></iframe>
- </div>
- invalid URL
- <div class="iframe_container">
- <iframe src="x-ttp://www.invalid.com/"></iframe>
- </div>
- whatheaders.com
- <div class="iframe_container">
- <iframe src="http://whatheaders.com"></iframe>
- </div>
- apache.org
- <div class="iframe_container">
- <iframe src="" id="apacheiframe"></iframe>
- </div>
- <div><button class="backBtn" onclick="backHome();">Back</button></div>
- </body>
- <script>
- setTimeout(function() {
- console.log('loading iframe after timeout.');
- document.querySelector('#apacheiframe').src = 'http://apache.org';
- }, 2000);
- </script>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/network/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/network/index.html b/windows8/test/network/index.html
deleted file mode 100644
index 2902849..0000000
--- a/windows8/test/network/index.html
+++ /dev/null
@@ -1,85 +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=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
- <title>Cordova Mobile Spec</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
- <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
-
- function eventOutput(s) {
- var el = document.getElementById("results");
- el.innerHTML = el.innerHTML + s + "<br>";
- }
-
- function printNetwork() {
- eventOutput("navigator.connection.type=" + navigator.connection.type);
- eventOutput("navigator.network.connection.type=" + navigator.network.connection.type);
- }
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
- var deviceReady = false;
- function onEvent(e) {
- eventOutput('Event of type: ' + e.type);
- printNetwork();
- }
- document.addEventListener('online', onEvent, false);
- document.addEventListener('offline', onEvent, false);
- document.addEventListener("deviceready", function() {
- deviceReady = true;
- eventOutput("Device="+device.platform+" "+device.version);
- printNetwork();
- }, false);
- window.setTimeout(function() {
- if (!deviceReady) {
- alert("Error: Cordova did not initialize. Demo will not run correctly.");
- }
- }, 1000);
- }
-
-</script>
-
- </head>
- <body onload="init();" id="stage" class="theme">
-
- <h1>Network Events and State</h1>
- <div id="info">
- <b>Results:</b><br>
- <span id="results"></span>
- </div>
-
- <h2>Action</h2>
- <div class="btn large" onclick="printNetwork();">Show Network Connection</div>
- <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
- </body>
-</html>
-
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/notification/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/notification/index.html b/windows8/test/notification/index.html
deleted file mode 100644
index bacc086..0000000
--- a/windows8/test/notification/index.html
+++ /dev/null
@@ -1,144 +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=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
- <title>Cordova Mobile Spec</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
- <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
- var deviceReady = false;
-
- //-------------------------------------------------------------------------
- // Notifications
- //-------------------------------------------------------------------------
-
- var beep = function(){
- navigator.notification.beep(3);
- };
-
- var vibrate = function(){
- navigator.notification.vibrate(1000);
- };
-
- var alertDialog = function(message, title, button) {
- console.log("alertDialog()");
- navigator.notification.alert(message,
- function(){
- console.log("Alert dismissed.");
- },
- title, button);
- console.log("After alert");
- };
-
- var confirmDialogA = function(message, title, buttons) {
- navigator.notification.confirm(message,
- function(r) {
- if(r===0){
- console.log("Dismissed dialog without making a selection.");
- alert("Dismissed dialog without making a selection.");
- }else{
- console.log("You selected " + r);
- alert("You selected " + (buttons.split(","))[r-1]);
- }
- },
- title,
- buttons);
- };
-
- var confirmDialogB = function(message, title, buttons) {
- navigator.notification.confirm(message,
- function(r) {
- if(r===0){
- console.log("Dismissed dialog without making a selection.");
- alert("Dismissed dialog without making a selection.");
- }else{
- console.log("You selected " + r);
- alert("You selected " + buttons[r-1]);
- }
- },
- title,
- buttons);
- };
-
- var promptDialog = function(message, title, buttons) {
- navigator.notification.prompt(message,
- function(r) {
- if(r && r.buttonIndex===0){
- var msg = "Dismissed dialog";
- if( r.input1 ){
- msg+=" with input: " + r.input1
- }
- console.log(msg);
- alert(msg);
- }else{
- console.log("You selected " + r.buttonIndex + " and entered: " + r.input1);
- alert("You selected " + buttons[r.buttonIndex-1] + " and entered: " + r.input1);
- }
- },
- title,
- buttons);
- };
- /**
- * Function called when page has finished loading.
- */
- function init() {
- document.addEventListener("deviceready", function() {
- deviceReady = true;
- console.log("Device="+device.platform+" "+device.version);
- }, false);
- window.setTimeout(function() {
- if (!deviceReady) {
- alert("Error: Apache Cordova did not initialize. Demo will not run correctly.");
- }
- },1000);
- }
-
-</script>
-
- </head>
- <body onload="init();" id="stage" class="theme">
-
- <h1>Notifications and Dialogs</h1>
- <div id="info">
- </div>
-
- <h2>Action</h2>
- <div class="btn large" onclick="beep();">Beep</div>
- <div class="btn large" onclick="vibrate();">Vibrate</div>
- <div class="btn large" onclick="alertDialog('You pressed alert.', 'Alert Dialog', 'Continue');">Alert Dialog</div>
- <div class="btn large" onclick="confirmDialogA('You pressed confirm.', 'Confirm Dialog', 'Yes,No,Maybe');">Confirm Dialog - Deprecated</div>
- <div class="btn large" onclick="confirmDialogB('You pressed confirm.', 'Confirm Dialog', ['Yes', 'No', 'Maybe, Not Sure']);">Confirm Dialog</div>
- <div class="btn large" onclick="promptDialog('You pressed prompt.', 'Prompt Dialog', ['Yes', 'No', 'Maybe, Not Sure']);">Prompt Dialog</div>
-
- <div class="btn large" onclick="alert('You pressed alert.');">Built-in Alert Dialog</div>
- <div class="btn large" onclick="confirm('You selected confirm');">Built-in Confirm Dialog</div>
- <div class="btn large" onclick="prompt('This is a prompt.', 'Default value');">Built-in Prompt Dialog</div>
- <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/package.appxmanifest
----------------------------------------------------------------------
diff --git a/windows8/test/package.appxmanifest b/windows8/test/package.appxmanifest
deleted file mode 100644
index dcba1b7..0000000
--- a/windows8/test/package.appxmanifest
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
- <Identity Name="f0eea4fc-197b-4c4e-8590-5d9b2b964f5b" Version="1.0.0.0" Publisher="CN=Jesse" />
- <Properties>
- <DisplayName>CordovaTestApp</DisplayName>
- <PublisherDisplayName>Jesse</PublisherDisplayName>
- <Logo>images\storelogo.png</Logo>
- </Properties>
- <Prerequisites>
- <OSMinVersion>6.2.0</OSMinVersion>
- <OSMaxVersionTested>6.2.0</OSMaxVersionTested>
- </Prerequisites>
- <Resources>
- <Resource Language="x-generate" />
- </Resources>
- <Applications>
- <Application Id="App" StartPage="index.html">
- <VisualElements DisplayName="CordovaTestApp" Logo="images\logo.png" SmallLogo="images\smalllogo.png" Description="CordovaTestApp includes mobile spec automated tests, and various manual test pages." ForegroundText="dark" BackgroundColor="#999999">
- <DefaultTile ShowName="allLogos" />
- <SplashScreen Image="images\splashscreen.png" BackgroundColor="#999999" />
- <InitialRotationPreference>
- <Rotation Preference="portrait" />
- <Rotation Preference="landscape" />
- <Rotation Preference="portraitFlipped" />
- <Rotation Preference="landscapeFlipped" />
- </InitialRotationPreference>
- </VisualElements>
- </Application>
- </Applications>
- <Capabilities>
- <Capability Name="videosLibrary" />
- <Capability Name="musicLibrary" />
- <Capability Name="picturesLibrary" />
- <Capability Name="internetClient" />
- <DeviceCapability Name="location" />
- <DeviceCapability Name="webcam" />
- <DeviceCapability Name="microphone" />
- </Capabilities>
-</Package>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/splashscreen/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/splashscreen/index.html b/windows8/test/splashscreen/index.html
deleted file mode 100644
index 19132a4..0000000
--- a/windows8/test/splashscreen/index.html
+++ /dev/null
@@ -1,48 +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=device-width,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
- <title>Cordova Mobile Spec</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
- <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
-
-<script type="text/javascript" charset="utf-8">
- function showFor(duration) {
- navigator.splashscreen.show();
- window.setTimeout(function() {
- navigator.splashscreen.hide();
- }, 1000 * duration);
- }
-</script>
- </head>
- <body id="stage" class="theme">
- <h1>Splashscreen</h1>
- <h2>Action</h2>
- <div class="btn large" onclick="showFor(1)">Show for 1 second</div>
- <div class="btn large" onclick="showFor(5)">Show for 5 seconds</div>
- <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/sql/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/sql/index.html b/windows8/test/sql/index.html
deleted file mode 100644
index eb97d73..0000000
--- a/windows8/test/sql/index.html
+++ /dev/null
@@ -1,154 +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=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
- <title>Cordova Mobile Spec</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
- <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
- var deviceReady = false;
-
- //-------------------------------------------------------------------------
- // HTML5 Database
- //-------------------------------------------------------------------------
- var db;
- var callDatabase = function() {
- db = openDatabase("mydb", "1.0", "Apache Cordova Demo", 20000);
- if (db === null) {
- databaseOutput("Database could not be opened.");
- return;
- }
- databaseOutput("Database opened.");
- db.transaction(function (tx) {
- tx.executeSql('DROP TABLE IF EXISTS DEMO');
- tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)', [],
- function(tx,results) { console.log("Created table"); },
- function(tx,err) { alert("Error creating table: "+err.message); });
- tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")', [],
- function(tx,results) { console.log("Insert row1 success"); },
- function(tx,err) { alert("Error adding 1st row: "+err.message); });
- tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")', [],
- function(tx,results) { console.log("Insert row2 success"); },
- function(tx,err) { alert("Error adding 2nd row: "+err.message); });
- databaseOutput("Data written to DEMO table.");
- console.log("Data written to DEMO table.");
-
- tx.executeSql('SELECT * FROM DEMO', [], function (tx, results) {
- var len = results.rows.length;
- var text = "DEMO table: " + len + " rows found.<br>";
- text = text + "<table border='1'><tr><td>Row</td><td>Data</td></tr>";
- for (var i=0; i<len; i++){
- text = text + "<tr><td>" + i + "</td><td>" + results.rows.item(i).id + ", " + results.rows.item(i).data + "</td></tr>";
- }
- text = text + "</table>";
- databaseOutput(text);
- }, function(tx, err) {
- alert("Error processing SELECT * SQL: "+err.message);
- });
- tx.executeSql('SELECT ID FROM DEMO', [], function (tx, results) {
- var len = results.rows.length;
- var text = "DEMO table: " + len + " rows found.<br>";
- text = text + "<table border='1'><tr><td>Row</td><td>Data</td></tr>";
- for (var i=0; i<len; i++){
- text = text + "<tr><td>" + i + "</td><td>" + results.rows.item(i).id + "</td></tr>";
- }
- text = text + "</table>";
- databaseOutput(text);
- }, function(tx, err) {
- alert("Error processing SELECT ID SQL: "+err.message);
- });
-
- },
- function(err) {
- console.log("Transaction failed: " + err.message);
- });
-
-
- };
-
- var readDatabase = function() {
- if (!db) {
- db = openDatabase("mydb", "1.0", "Apache Cordova Demo", 20000);
- if (db === null) {
- databaseOutput("Database could not be opened.");
- return;
- }
- }
- db.transaction(function (tx) {
- tx.executeSql('SELECT * FROM DEMO WHERE id=2', [], function (tx, results) {
- var len = results.rows.length;
- var text = "DEMO table: " + len + " rows found.<br>";
- text = text + "<table border='1'><tr><td>Row</td><td>Data</td></tr>";
- for (var i=0; i<len; i++){
- text = text + "<tr><td>" + i + "</td><td>" + results.rows.item(i).id + ", " + results.rows.item(i).data + "</td></tr>";
- }
- text = text + "</table>";
- databaseOutput(text);
- }, function(tx, err) {
- alert("Error processing SELECT * WHERE id=2 SQL: "+err.message);
- });
- });
- }
-
- var databaseOutput = function(s) {
- var el = document.getElementById("database_results");
- el.innerHTML = el.innerHTML + s + "<br>";
- };
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
- document.addEventListener("deviceready", function() {
- deviceReady = true;
- console.log("Device="+device.platform+" "+device.version);
- }, false);
- window.setTimeout(function() {
- if (!deviceReady) {
- alert("Error: Apache Cordova did not initialize. Demo will not run correctly.");
- }
- },1000);
- }
-
-</script>
-
- </head>
- <body onload="init();" id="stage" class="theme">
-
- <h1>HTML5 Database</h1>
- <div id="info">
- <b>Results:</b><br>
- <span id="database_results"></span>
- </div>
- <h2>Action</h2>
- <div class="btn large" onclick="callDatabase();">Create, Add, Read Database</div>
- <div class="btn large" onclick="readDatabase();">Read Database</div>
- <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/be415141/windows8/test/storage/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/storage/index.html b/windows8/test/storage/index.html
deleted file mode 100644
index 20e2951..0000000
--- a/windows8/test/storage/index.html
+++ /dev/null
@@ -1,72 +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=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
- <title>Cordova Mobile Spec</title>
- <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
- <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
-
-
-<script type="text/javascript" charset="utf-8">
-
- var deviceReady = false;
-
- /**
- * Function called when page has finished loading.
- */
- function init() {
- document.addEventListener("deviceready", function() {
- deviceReady = true;
- console.log("Device="+device.platform+" "+device.version);
- }, false);
- window.setTimeout(function() {
- if (!deviceReady) {
- alert("Error: Apache Cordova did not initialize. Demo will not run correctly.");
- }
- },1000);
- }
-
-</script>
-
- </head>
- <body onload="init();" id="stage" class="theme">
-
- <h1>Local Storage</h1>
- <div id="info">
- You have run this app <span id="count">an untold number of</span> time(s).
- </div>
-
- <script>
- if (!localStorage.pageLoadCount) {
- localStorage.pageLoadCount = 0;
- }
- localStorage.pageLoadCount = parseInt(localStorage.pageLoadCount) + 1;
- document.getElementById('count').textContent = localStorage.pageLoadCount;
- </script>
-
- <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
- </body>
-</html>