cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [40/51] [abbrv] renamed metro folder
Date Thu, 01 Nov 2012 10:53:30 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/cordova.js
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/cordova.js b/windows8/MetroTestApp/cordova.js
deleted file mode 100644
index 1f2c353..0000000
--- a/windows8/MetroTestApp/cordova.js
+++ /dev/null
@@ -1,27 +0,0 @@
-(function () {
-
-    var VERSION = '2.2.0',
-        currentScript = 'cordova-' + VERSION + '.js',
-        scripts = document.getElementsByTagName('script');
-
-    for (var n = 0; n < scripts.length; n++) {
-        if (scripts[n].src.indexOf('cordova.js') > -1) {
-            var cordovaPath = scripts[n].src.replace('cordova.js', currentScript);
-            var scriptElem = document.createElement("script");
-            scriptElem.src = cordovaPath;
-            document.head.appendChild(scriptElem);
-        }
-    }
-
-})();
-
-function backHome() {
-	if (window.device && device.platform && device.platform.toLowerCase() == 'android') {
-            navigator.app.backHistory();
-	}
-	else {
-	    window.history.go(-1);
-	}
-}
-
-window.alert = window.alert || function (msg, title, btn) { console.log("Alert::" + msg); };

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/css/default.css
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/css/default.css b/windows8/MetroTestApp/css/default.css
deleted file mode 100644
index da816d5..0000000
--- a/windows8/MetroTestApp/css/default.css
+++ /dev/null
@@ -1,14 +0,0 @@
-body {
-}
-
-@media screen and (-ms-view-state: fullscreen-landscape) {
-}
-
-@media screen and (-ms-view-state: filled) {
-}
-
-@media screen and (-ms-view-state: snapped) {
-}
-
-@media screen and (-ms-view-state: fullscreen-portrait) {
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/default.html
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/default.html b/windows8/MetroTestApp/default.html
deleted file mode 100644
index efbd2fd..0000000
--- a/windows8/MetroTestApp/default.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="utf-8" />
-    <title>MetroTestApp</title>
-
-    <!-- WinJS references -->
-    <link href="//Microsoft.WinJS.1.0/css/ui-dark.css" rel="stylesheet" />
-    <script src="//Microsoft.WinJS.1.0/js/base.js"></script>
-    <script src="//Microsoft.WinJS.1.0/js/ui.js"></script>
-
-
-    <!-- MetroTestApp references -->
-    <link href="/css/default.css" rel="stylesheet" />
-    <script src="/cordova.js"></script>
-    <script src="/default.js"></script>
-</head>
-<body>
-    <a href="index.html">Go for it</a>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/default.js
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/default.js b/windows8/MetroTestApp/default.js
deleted file mode 100644
index a688542..0000000
--- a/windows8/MetroTestApp/default.js
+++ /dev/null
@@ -1,46 +0,0 @@
-// For an introduction to the Blank template, see the following documentation:
-// http://go.microsoft.com/fwlink/?LinkId=232509
-(function () {
-    "use strict";
-
-    var app = WinJS.Application;
-
-    app.onactivated = function (eventObject) {
-        console.log("app activated");
-
-        if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) {
-            if (eventObject.detail.previousExecutionState !== Windows.ApplicationModel.Activation.ApplicationExecutionState.terminated) {
-                // TODO: This application has been newly launched. Initialize 
-                // your application here.
-            } else {
-                // TODO: This application has been reactivated from suspension. 
-                // Restore application state here.
-            }
-            WinJS.UI.processAll();
-        }
-
-
-        window.alert = window.alert || function (msg) { console.log("ALERT:" + msg); };
-
-    };
-
-    app.oncheckpoint = function (eventObject) {
-        // TODO: This application is about to be suspended. Save any state
-        // that needs to persist across suspensions here. You might use the 
-        // WinJS.Application.sessionState object, which is automatically
-        // saved and restored across suspension. If you need to complete an
-        // asynchronous operation before your application is suspended, call
-        // eventObject.setPromise(). 
-    };
-
-    var sensor;
-
-    function onDeviceReady() {
-        console.log("onDeviceReady");
-        sensor = Windows.Devices.Sensors.SimpleOrientationSensor.getDefault();
-    }
-
-    document.addEventListener("deviceready", onDeviceReady, false);
-
-    app.start();
-})();

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/events/index.html
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/events/index.html b/windows8/MetroTestApp/events/index.html
deleted file mode 100644
index 1449bd9..0000000
--- a/windows8/MetroTestApp/events/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<!DOCTYPE html>
-<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.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: PhoneGap 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>
-
-    <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/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/images/logo.png
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/images/logo.png b/windows8/MetroTestApp/images/logo.png
deleted file mode 100644
index 86a48a8..0000000
Binary files a/windows8/MetroTestApp/images/logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/images/smalllogo.png
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/images/smalllogo.png b/windows8/MetroTestApp/images/smalllogo.png
deleted file mode 100644
index 0e648ef..0000000
Binary files a/windows8/MetroTestApp/images/smalllogo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/images/splashscreen.png
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/images/splashscreen.png b/windows8/MetroTestApp/images/splashscreen.png
deleted file mode 100644
index d1e6c98..0000000
Binary files a/windows8/MetroTestApp/images/splashscreen.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/images/storelogo.png
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/images/storelogo.png b/windows8/MetroTestApp/images/storelogo.png
deleted file mode 100644
index dd00478..0000000
Binary files a/windows8/MetroTestApp/images/storelogo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/index.html
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/index.html b/windows8/MetroTestApp/index.html
deleted file mode 100644
index ac6466a..0000000
--- a/windows8/MetroTestApp/index.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<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">
-
-    <!-- WinJS references -->
-    <!--<link href="//Microsoft.WinJS.1.0/css/ui-dark.css" rel="stylesheet" />-->
-    <script src="//Microsoft.WinJS.1.0/js/base.js"></script>
-    <script src="//Microsoft.WinJS.1.0/js/ui.js"></script>
-
-	  <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>PhoneGap 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>Width: <span id="width">  </span>,   Height: <span id="height"> 
-                   </span>, Color Depth: <span id="colorDepth"></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="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="sql/index.html" class="btn large">Web SQL</a>
-    <a href="storage/index.html" class="btn large">Local Storage</a>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/location/index.html
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/location/index.html b/windows8/MetroTestApp/location/index.html
deleted file mode 100644
index 6eb39c5..0000000
--- a/windows8/MetroTestApp/location/index.html
+++ /dev/null
@@ -1,154 +0,0 @@
-<!DOCTYPE html>
-<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.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: PhoneGap 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">&nbsp;</td></tr>
-            <tr><td><b>Longitude:</b></td><td id="longitude">&nbsp;</td></tr>
-            <tr><td><b>Altitude:</b></td><td id="altitude">&nbsp;</td></tr>
-            <tr><td><b>Accuracy:</b></td><td id="accuracy">&nbsp;</td></tr>
-            <tr><td><b>Heading:</b></td><td id="heading">&nbsp;</td></tr>
-            <tr><td><b>Speed:</b></td><td id="speed">&nbsp;</td></tr>
-            <tr><td><b>Altitude Accuracy:</b></td><td id="altitude_accuracy">&nbsp;</td></tr>
-            <tr><td><b>Time:</b></td><td id="timestamp">&nbsp;</td></tr>
-        </table>
-    </div>
-    <h2>Action</h2>
-    <div>
-        <h3>Use Built-in WebView navigator.geolocation</h3>
-        <span class="btn large" onclick="getLocation(navigator.geolocation);">Get Location</span>
-        <span class="btn large" onclick="watchLocation(navigator.geolocation);">Start Watching Location</span>
-        <span class="btn large" onclick="stopLocation(navigator.geolocation);">Stop Watching Location</span>
-        <span class="btn large" onclick="getLocation(navigator.geolocation, {maximumAge:30000});">Get Location Up to 30 Seconds Old</span>
-    </div>
-    <div>
-        <h3>Use Cordova Geolocation Plugin</h3>
-        <span class="btn large" onclick="getLocation(cordova.require('cordova/plugin/geolocation'));">Get Location</span>
-        <span class="btn large" onclick="watchLocation(cordova.require('cordova/plugin/geolocation'));">Start Watching Location</span>
-        <span class="btn large" onclick="stopLocation(cordova.require('cordova/plugin/geolocation'));">Stop Watching Location</span>
-        <span class="btn large" onclick="getLocation(cordova.require('cordova/plugin/geolocation'), {maximumAge:30000});">Get Location Up to 30 Seconds Old</span>
-    </div>
-
-
-    <h2>&nbsp;</h2><a class="backBtn" onclick="backHome();">Back</a>    
-  </body>
-</html>      

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/main.js
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/main.js b/windows8/MetroTestApp/main.js
deleted file mode 100644
index 8a4c54d..0000000
--- a/windows8/MetroTestApp/main.js
+++ /dev/null
@@ -1,140 +0,0 @@
-var deviceInfo = function(bob) {
-    document.getElementById("platform").innerHTML = device.platform;
-    document.getElementById("version").innerHTML = device.version;
-    document.getElementById("uuid").innerHTML = device.uuid;
-    document.getElementById("name").innerHTML = device.name;
-    document.getElementById("width").innerHTML = screen.width;
-    document.getElementById("height").innerHTML = screen.height;
-    document.getElementById("colorDepth").innerHTML = screen.colorDepth;
-};
-
-var 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/phonegap.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);
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/master.css
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/master.css b/windows8/MetroTestApp/master.css
deleted file mode 100644
index f64b29c..0000000
--- a/windows8/MetroTestApp/master.css
+++ /dev/null
@@ -1,131 +0,0 @@
-  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 .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 .large{
-  	width:308px;
-  	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%;
-  }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/misc/index.html
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/misc/index.html b/windows8/MetroTestApp/misc/index.html
deleted file mode 100644
index 443fb21..0000000
--- a/windows8/MetroTestApp/misc/index.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE html>
-<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.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: PhoneGap 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" hrefbad="page2.html?me=test" class="btn large">Load another PhoneGap page</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/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/misc/page2.html
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/misc/page2.html b/windows8/MetroTestApp/misc/page2.html
deleted file mode 100644
index 97ab95c..0000000
--- a/windows8/MetroTestApp/misc/page2.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<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.js"></script>
-      
-      <script type="text/javascript" charset="utf-8" src="../main.js"></script>
-
-  </head>
-  <body onload="init();" id="stage" class="theme">
-    <h1>Page2 App</h1>
-    <h2>This is page 2 of a PhoneGap 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>
-      <div ><button class="backBtn" onclick="backHome();">Back</button></div>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/network/index.html
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/network/index.html b/windows8/MetroTestApp/network/index.html
deleted file mode 100644
index 0a552c4..0000000
--- a/windows8/MetroTestApp/network/index.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE html>
-<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.js"></script>
-       
-
-      
-<script type="text/javascript" charset="utf-8">
-
-    var deviceReady = false;
-
-    var eventOutput = function(s) {
-        var el = document.getElementById("results");
-        el.innerHTML = el.innerHTML + s + "<br>";
-    };
-
-    function printNetwork() {
-        eventOutput("Current network connection type is: " + navigator.network.connection.type);
-    }
-
-    /**
-     * Function called when page has finished loading.
-     */
-    function init() {
-        document.addEventListener("deviceready", function() {
-            deviceReady = true;
-            console.log("Device="+device.platform+" "+device.version);
-            eventOutput("Network Connection is: " + navigator.network.connection.type);
-            document.addEventListener('online', function() { eventOutput('Online event, connection is: ' + navigator.network.connection.type); }, false);
-            document.addEventListener('offline', function() { eventOutput('Offline event, connection is: ' + navigator.network.connection.type); }, false);
-
-        }, 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/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/notification/index.html
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/notification/index.html b/windows8/MetroTestApp/notification/index.html
deleted file mode 100644
index edbd21a..0000000
--- a/windows8/MetroTestApp/notification/index.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!DOCTYPE html>
-<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.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 confirmDialog = function(message, title, buttons) {
-        navigator.notification.confirm(message,
-            function(r) {
-                console.log("You selected " + r);
-                alert("You selected " + (buttons.split(","))[r-1]);
-            },
-            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: PhoneGap 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="confirmDialog('You pressed confirm.', 'Confirm Dialog', 'Yes,No,Maybe');">Confirm 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/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/package.appxmanifest
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/package.appxmanifest b/windows8/MetroTestApp/package.appxmanifest
deleted file mode 100644
index d5dae36..0000000
--- a/windows8/MetroTestApp/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>MetroTestApp</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="light" 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/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/sql/index.html
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/sql/index.html b/windows8/MetroTestApp/sql/index.html
deleted file mode 100644
index d5feddc..0000000
--- a/windows8/MetroTestApp/sql/index.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<!DOCTYPE html>
-<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.js"></script>
-             
-
-      
-<script type="text/javascript" charset="utf-8">
-
-    var deviceReady = false;
-
-    //-------------------------------------------------------------------------
-    // HTML5 Database
-    //-------------------------------------------------------------------------
-    var db;
-    var callDatabase = function() {
-        db = openDatabase("mydb", "1.0", "PhoneGap 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", "PhoneGap 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: PhoneGap 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/incubator-cordova-windows/blob/071eba61/windows8/MetroTestApp/storage/index.html
----------------------------------------------------------------------
diff --git a/windows8/MetroTestApp/storage/index.html b/windows8/MetroTestApp/storage/index.html
deleted file mode 100644
index e75a049..0000000
--- a/windows8/MetroTestApp/storage/index.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE html>
-<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 src="//Microsoft.WinJS.1.0.RC/js/base.js"></script>
-    <script  type="text/javascript" charset="utf-8" src="../cordova.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: PhoneGap 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>      

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/test/CordovaTestApp.jsproj
----------------------------------------------------------------------
diff --git a/windows8/test/CordovaTestApp.jsproj b/windows8/test/CordovaTestApp.jsproj
new file mode 100644
index 0000000..c21b23b
--- /dev/null
+++ b/windows8/test/CordovaTestApp.jsproj
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|AnyCPU">
+      <Configuration>Debug</Configuration>
+      <Platform>AnyCPU</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|ARM">
+      <Configuration>Debug</Configuration>
+      <Platform>ARM</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x86">
+      <Configuration>Debug</Configuration>
+      <Platform>x86</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|AnyCPU">
+      <Configuration>Release</Configuration>
+      <Platform>AnyCPU</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|ARM">
+      <Configuration>Release</Configuration>
+      <Platform>ARM</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x86">
+      <Configuration>Release</Configuration>
+      <Platform>x86</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>f0eea4fc-197b-4c4e-8590-5d9b2b964f5b</ProjectGuid>
+  </PropertyGroup>
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
+  <PropertyGroup>
+    <TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
+    <TargetPlatformVersion>8.0</TargetPlatformVersion>
+    <DefaultLanguage>en-US</DefaultLanguage>
+    <PackageCertificateKeyFile>MetroTestApp_TemporaryKey.pfx</PackageCertificateKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <AppxManifest Include="package.appxmanifest">
+      <SubType>Designer</SubType>
+    </AppxManifest>
+    <Content Include="accelerometer\index.html" />
+    <Content Include="audio\index.html" />
+    <Content Include="autotest\html\HtmlReporter.js" />
+    <Content Include="autotest\html\HtmlReporterHelpers.js" />
+    <Content Include="autotest\html\ReporterView.js" />
+    <Content Include="autotest\html\SpecView.js" />
+    <Content Include="autotest\html\SuiteView.js" />
+    <Content Include="autotest\html\TrivialReporter.js" />
+    <Content Include="autotest\index.html" />
+    <Content Include="autotest\jasmine.css" />
+    <Content Include="autotest\jasmine.js" />
+    <Content Include="autotest\pages\accelerometer.html" />
+    <Content Include="autotest\pages\all.html" />
+    <Content Include="autotest\pages\battery.html" />
+    <Content Include="autotest\pages\camera.html" />
+    <Content Include="autotest\pages\capture.html" />
+    <Content Include="autotest\pages\compass.html" />
+    <Content Include="autotest\pages\contacts.html" />
+    <Content Include="autotest\pages\device.html" />
+    <Content Include="autotest\pages\file.html" />
+    <Content Include="autotest\pages\filetransfer.html" />
+    <Content Include="autotest\pages\geolocation.html" />
+    <Content Include="autotest\pages\media.html" />
+    <Content Include="autotest\pages\network.html" />
+    <Content Include="autotest\pages\notification.html" />
+    <Content Include="autotest\pages\storage.html" />
+    <Content Include="autotest\test-runner.js" />
+    <Content Include="autotest\tests\accelerometer.tests.js" />
+    <Content Include="autotest\tests\battery.tests.js" />
+    <Content Include="autotest\tests\camera.tests.js" />
+    <Content Include="autotest\tests\capture.tests.js" />
+    <Content Include="autotest\tests\compass.tests.js" />
+    <Content Include="autotest\tests\contacts.tests.js" />
+    <Content Include="autotest\tests\device.tests.js" />
+    <Content Include="autotest\tests\file.tests.js" />
+    <Content Include="autotest\tests\filetransfer.tests.js" />
+    <Content Include="autotest\tests\geolocation.tests.js" />
+    <Content Include="autotest\tests\media.tests.js" />
+    <Content Include="autotest\tests\network.tests.js" />
+    <Content Include="autotest\tests\notification.tests.js" />
+    <Content Include="autotest\tests\storage.tests.js" />
+    <Content Include="battery\index.html" />
+    <Content Include="camera\index.html" />
+    <Content Include="compass\index.html" />
+    <Content Include="contacts\index.html" />
+    <Content Include="cordova-2.2.0.js" />
+    <Content Include="cordova.js" />
+    <Content Include="events\index.html" />
+    <Content Include="images\logo.png" />
+    <Content Include="images\smalllogo.png" />
+    <Content Include="images\splashscreen.png" />
+    <Content Include="images\storelogo.png" />
+    <Content Include="index.html" />
+    <Content Include="location\index.html" />
+    <Content Include="main.js" />
+    <Content Include="master.css" />
+    <Content Include="misc\index.html" />
+    <Content Include="misc\page2.html" />
+    <Content Include="network\index.html" />
+    <Content Include="notification\index.html" />
+    <Content Include="sql\index.html" />
+    <Content Include="storage\index.html" />
+    <None Include="MetroTestApp_TemporaryKey.pfx" />
+  </ItemGroup>
+  <ItemGroup>
+    <SDKReference Include="Microsoft.WinJS.1.0, Version=1.0" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/test/CordovaTestAppSolution.sln
----------------------------------------------------------------------
diff --git a/windows8/test/CordovaTestAppSolution.sln b/windows8/test/CordovaTestAppSolution.sln
new file mode 100644
index 0000000..83a7cc5
--- /dev/null
+++ b/windows8/test/CordovaTestAppSolution.sln
@@ -0,0 +1,46 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Express 2012 for Windows 8
+Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "CordovaTestApp", "CordovaTestApp.jsproj", "{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Debug|ARM = Debug|ARM
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Any CPU = Release|Any CPU
+		Release|ARM = Release|ARM
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Debug|ARM.ActiveCfg = Debug|ARM
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Debug|ARM.Build.0 = Debug|ARM
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Debug|ARM.Deploy.0 = Debug|ARM
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Debug|x64.ActiveCfg = Debug|x64
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Debug|x64.Build.0 = Debug|x64
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Debug|x64.Deploy.0 = Debug|x64
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Debug|x86.ActiveCfg = Debug|x86
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Debug|x86.Build.0 = Debug|x86
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Debug|x86.Deploy.0 = Debug|x86
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Release|Any CPU.Deploy.0 = Release|Any CPU
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Release|ARM.ActiveCfg = Release|ARM
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Release|ARM.Build.0 = Release|ARM
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Release|ARM.Deploy.0 = Release|ARM
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Release|x64.ActiveCfg = Release|x64
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Release|x64.Build.0 = Release|x64
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Release|x64.Deploy.0 = Release|x64
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Release|x86.ActiveCfg = Release|x86
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Release|x86.Build.0 = Release|x86
+		{F0EEA4FC-197B-4C4E-8590-5D9B2B964F5B}.Release|x86.Deploy.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/test/MetroTestApp_TemporaryKey.pfx
----------------------------------------------------------------------
diff --git a/windows8/test/MetroTestApp_TemporaryKey.pfx b/windows8/test/MetroTestApp_TemporaryKey.pfx
new file mode 100644
index 0000000..5b559f5
Binary files /dev/null and b/windows8/test/MetroTestApp_TemporaryKey.pfx differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/test/accelerometer/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/accelerometer/index.html b/windows8/test/accelerometer/index.html
new file mode 100644
index 0000000..c9f345f
--- /dev/null
+++ b/windows8/test/accelerometer/index.html
@@ -0,0 +1,138 @@
+<!DOCTYPE html>
+<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>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.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;
+    }
+
+    //-------------------------------------------------------------------------
+    // Acceleration
+    //-------------------------------------------------------------------------
+    var watchAccelId = null;
+    
+    /**
+     * Start watching acceleration
+     */
+    var watchAccel = function() {
+        console.log("watchAccel()");
+
+        // Success callback
+        var success = function(a){
+            document.getElementById('x').innerHTML = roundNumber(a.x);
+            document.getElementById('y').innerHTML = roundNumber(a.y);
+            document.getElementById('z').innerHTML = roundNumber(a.z);
+            console.log("watchAccel success callback");
+        };
+
+        // Fail callback
+        var fail = function(e){
+            console.log("watchAccel fail callback with error code "+e);
+            stopAccel();
+            setAccelStatus(e);
+        };
+
+        // Update acceleration every 1 sec
+        var opt = {};
+        opt.frequency = 1000;
+        watchAccelId = navigator.accelerometer.watchAcceleration(success, fail, opt);
+
+        setAccelStatus("Running");
+    };
+
+    /**
+     * Stop watching the acceleration
+     */
+    var stopAccel = function() {
+    	console.log("stopAccel()");
+        setAccelStatus("Stopped");
+        if (watchAccelId) {
+            navigator.accelerometer.clearWatch(watchAccelId);
+            watchAccelId = null;
+        }
+    };
+
+    /**
+     * Get current acceleration
+     */
+    var getAccel = function() {
+        console.log("getAccel()");
+
+        // Stop accel if running
+        stopAccel();
+
+        // Success callback
+        var success = function(a){
+            document.getElementById('x').innerHTML = roundNumber(a.x);
+            document.getElementById('y').innerHTML = roundNumber(a.y);
+            document.getElementById('z').innerHTML = roundNumber(a.z);
+        };
+
+        // Fail callback
+        var fail = function(e){
+            console.log("getAccel fail callback with error code "+e);
+            setAccelStatus(Accelerometer.ERROR_MSG[e]);
+        };
+
+        // Make call
+        var opt = {};
+        navigator.accelerometer.getCurrentAcceleration(success, fail, opt);
+    };
+
+    /**
+     * Set accelerometer status
+     */
+    var setAccelStatus = function(status) {
+        document.getElementById('accel_status').innerHTML = status;
+    };
+    
+    /**
+     * Function called when page has finished loading.
+     */
+    function init() {
+        console.log("accelerometer.init()");
+        document.addEventListener("deviceready", function() {
+                deviceReady = true;
+                console.log("Device="+device.platform+" "+device.version);
+            }, false);
+        window.setTimeout(function() {
+        	if (!deviceReady) {
+        		alert("Error: PhoneGap did not initialize.  Demo will not run correctly.");
+        	}
+        },1000);
+    }
+
+</script>
+
+  </head>
+  <body onload="init();" id="stage" class="theme">
+  
+    <h1>Acceleration</h1>
+    <div id="info">
+        <div id="accel_status">Stopped</div>
+        <div ><table width="100%">
+            <tr><td width="20%">X:</td><td id="x"> </td></tr>
+            <tr><td width="20%">Y:</td><td id="y"> </td></tr>
+            <tr><td width="20%">Z:</td><td id="z"> </td></tr>
+        </table></div>
+    </div>
+
+    <h2>Action</h2>
+    <div class="btn large" onclick="getAccel();">Get Acceleration</div>
+    <div class="btn large" onclick="watchAccel();">Start Watch</div>
+    <div class="btn large" onclick="stopAccel();">Clear Watch</div>
+    <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
+  </body>
+</html>      

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/test/audio/index.html
----------------------------------------------------------------------
diff --git a/windows8/test/audio/index.html b/windows8/test/audio/index.html
new file mode 100644
index 0000000..4bd84a1
--- /dev/null
+++ b/windows8/test/audio/index.html
@@ -0,0 +1,394 @@
+<!DOCTYPE html>
+<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>Cordova Audio Tests</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.js"></script>    
+
+      
+<script type="text/javascript" charset="utf-8">
+
+    var deviceReady = false;
+
+    //-------------------------------------------------------------------------
+    // Audio player
+    //-------------------------------------------------------------------------
+    var media1 = null;
+    var media1Timer = null;
+    var audioSrc = null;
+    var recordSrc = "myRecording.mp3";
+
+    /**
+     * Play audio
+     */
+    function playAudio(url) {
+        console.log("playAudio()");
+        console.log(" -- media="+media1);
+
+        //var src = "http://neuga.s3.amazonaws.com/onclassical/strings-or gan.mp3";
+       var src = "http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3";
+        //var src = "/android_asset/www/Jet_Sledding.mp4"; // no work
+        //var src = "http://vprbbc.streamguys.net/vprbbc24.mp3"; // mp3 streaming
+        
+        if (url) {
+            src = url;
+        }
+
+        // Stop playing if src is different from currently playing source
+        if (src != audioSrc) {
+            if (media1 != null) {
+                stopAudio();
+                media1 = null;
+            }
+        }
+
+        if (media1 == null) {
+
+
+            // TEST STREAMING AUDIO PLAYBACK
+            //var src = "http://nunzioweb.com/misc/Bon_Jovi-Crush_Mystery_Train.mp3";   // works
+            //var src = "http://nunzioweb.com/misc/Bon_Jovi-Crush_Mystery_Train.m3u"; // doesn't work
+            //var src = "http://www.wav-sounds.com/cartoon/bugsbunny1.wav"; // works
+            //var src = "http://www.angelfire.com/fl5/html-tutorial/a/couldyou.mid"; // doesn't work
+            //var src = "MusicSearch/mp3/train.mp3";    // works
+            //var src = "bryce.mp3";  // works
+            //var src = "/android_asset/www/bryce.mp3"; // works
+
+            media1 = new Media(src,
+                function() {
+                    console.log("playAudio():Audio Success");
+                },
+                function(err) {
+                    console.log("playAudio():Audio Error: "+err.code);
+                    setAudioStatus("Error: " + err.code);
+                },
+                function(status) {
+                    console.log("playAudio():Audio Status: "+status);
+                    setAudioStatus(Media.MEDIA_MSG[status]);
+
+                    // If stopped, then stop getting current position
+                    if (Media.MEDIA_STOPPED == status) {
+                        clearInterval(media1Timer);
+                        media1Timer = null;
+                        setAudioPosition("0 sec");
+                    }
+                });
+        }
+        audioSrc = src;
+        document.getElementById('audio_duration').innerHTML = "";
+        // Play audio
+        media1.play();
+        if (media1Timer == null && media1.getCurrentPosition) {
+            media1Timer = setInterval(
+                function() {
+                    media1.getCurrentPosition(
+                        function(position) {
+                            console.log("Pos="+position);
+                            if (position >= 0.0) {
+                                setAudioPosition(position+" sec");
+                            }
+                        },
+                        function(e) {
+                            console.log("Error getting pos="+e);
+                            setAudioPosition("Error: "+e);
+                        }
+                    );
+                },
+                1000
+            );
+        }
+
+        // Get duration
+        var counter = 0;
+        var timerDur = setInterval(
+            function() {
+                counter = counter + 100;
+                if (counter > 2000) {
+                    clearInterval(timerDur);
+                }
+                var dur = media1.getDuration();
+                if (dur > 0) {
+                    clearInterval(timerDur);
+                    document.getElementById('audio_duration').innerHTML = dur + " sec";
+                }
+            }, 100);
+    }
+
+    /**
+     * Pause audio playback
+     */
+    function pauseAudio() {
+        console.log("pauseAudio()");
+        if (media1) {
+            media1.pause();
+        }
+    }
+
+    /**
+     * Stop audio
+     */
+    function stopAudio() {
+        console.log("stopAudio()");
+        if (media1) {
+            media1.stop();
+            media1.release();
+        }
+        clearInterval(media1Timer);
+        media1Timer = null;
+    }
+
+    /**
+     * Set audio status
+     */
+    var setAudioStatus = function(status) {
+        document.getElementById('audio_status').innerHTML = status;
+    };
+
+    /**
+     * Set audio position
+     */
+    var setAudioPosition = function(position) {
+        document.getElementById('audio_position').innerHTML = position;
+    };
+
+    //-------------------------------------------------------------------------
+    // Audio recorder
+    //-------------------------------------------------------------------------
+    var mediaRec = null;
+    var recTime = 0;
+
+    /**
+     * Record audio
+     */
+    function recordAudio() {
+        console.log("recordAudio()");
+        console.log(" -- media="+mediaRec);
+        if (mediaRec == null) {
+
+            var src = recordSrc;
+            mediaRec = new Media(src,
+                    function() {
+                        console.log("recordAudio():Audio Success");
+                    },
+                    function(err) {
+                        console.log("recordAudio():Audio Error: "+err.code);
+                        setAudioStatus("Error: " + err.code);
+                    },
+                    function(status) {
+                        console.log("recordAudio():Audio Status: "+status);
+                        setAudioStatus(Media.MEDIA_MSG[status]);
+                    }
+                );
+        }
+
+        navigator.notification.beep(1);
+
+        // Record audio
+        mediaRec.startRecord();
+
+        // Stop recording after 10 sec
+        recTime = 0;
+        var recInterval = setInterval(function() {
+            recTime = recTime + 1;
+            setAudioPosition(recTime+" sec");
+            if (recTime >= 10) {
+                clearInterval(recInterval);
+                if (mediaRec.stopAudioRecord){
+                    mediaRec.stopAudioRecord();
+                } else {
+                    mediaRec.stopRecord();
+                }
+                console.log("recordAudio(): stop");
+                navigator.notification.beep(1);
+            }
+        }, 1000);
+    }
+
+    /**
+     * Play back recorded audio
+     */
+    function playRecording() {
+        playAudio(recordSrc);
+    }
+    
+    /**
+     * Function to create a file for iOS recording
+     */
+    function getRecordSrc() {
+        var fsFail = function(error) {
+            console.log("error creating file for iOS recording");
+        };
+        var gotFile = function(file) {
+            recordSrc = file.fullPath;
+            //console.log("recording Src: " + recordSrc);
+        };
+        var gotFS = function(fileSystem) {
+            fileSystem.root.getFile("iOSRecording.wav", {create: true}, gotFile, fsFail);
+        };
+        window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, gotFS, fsFail);
+    }
+    
+    /**
+     * Function to create a file for BB recording
+     */
+    function getRecordSrcBB() {
+        var fsFail = function(error) {
+            console.log("error creating file for BB recording");
+        };
+        var gotFile = function(file) {
+            recordSrc = file.fullPath;
+        };
+        var gotFS = function(fileSystem) {
+            fileSystem.root.getFile("BBRecording.amr", {create: true}, gotFile, fsFail);
+        };
+        window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, gotFS, fsFail);
+    }
+
+    /**
+     * Function called when page has finished loading.
+     */
+    function init() {
+        document.addEventListener("deviceready", function() {
+                deviceReady = true;
+                if (device.platform.indexOf("iPhone") !=-1 || device.platform.indexOf("iPad") !=-1)
+                {
+                     getRecordSrc();
+                } else if (typeof blackberry !== 'undefined') {
+                    getRecordSrcBB();
+                }
+                console.log("Device="+device.platform+" "+device.version);
+            }, false);
+        window.setTimeout(function() {
+        	if (!deviceReady) {
+        		alert("Error: PhoneGap did not initialize.  Demo will not run correctly.");
+        	}
+        },1000);
+    }
+    
+    /**
+     * for forced updates of position after a successful seek
+     */
+    function updatePosition() {
+        media1.getCurrentPosition(
+            function(position) {
+                console.log("Pos="+position);
+                if (position >= 0.0) {
+                    setAudioPosition(position+" sec");
+                }
+            },
+            function(e) {
+                console.log("Error getting pos="+e);
+                setAudioPosition("Error: "+e);
+            });
+    }
+
+    /**
+     *
+     */
+    function seekAudio(mode) {
+        var time = document.getElementById("seekinput").value;
+        if (time == "") {
+            time = 5000;
+        } else {
+            time = time * 1000; //we expect the input to be in seconds
+        }
+        if (media1 == null) {
+            console.log("seekTo requested while media1 is null");
+            if (audioSrc == null) {
+                audioSrc = "http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3";
+            }
+            media1 = new Media(audioSrc,
+                function() {
+                    console.log("seekToAudio():Audio Success");
+                },
+                function(err) {
+                    console.log("seekAudio():Audio Error: "+err.code);
+                    setAudioStatus("Error: " + err.code);
+                },
+                function(status) {
+                    console.log("seekAudio():Audio Status: "+status);
+                    setAudioStatus(Media.MEDIA_MSG[status]);
+
+                    // If stopped, then stop getting current position
+                    if (Media.MEDIA_STOPPED == status) {
+                        clearInterval(media1Timer);
+                        media1Timer = null;
+                        setAudioPosition("0 sec");
+                    }
+                });
+        }
+        
+        media1.getCurrentPosition(
+            function (position) {
+                var deltat = time;
+                if (mode == "by") {
+                    deltat = time + position * 1000;   
+                }
+                media1.seekTo(deltat,
+                    function () {
+                        console.log("seekAudioTo():Audio Success");
+                        //force an update on the position display
+                        updatePosition();
+                    },
+                    function (err) {
+                        console.log("seekAudioTo():Audio Error: " + err.code);
+                    });
+            },
+            function(e) {
+                console.log("Error getting pos="+e);
+                setAudioPosition("Error: "+e);
+            });
+    }
+    
+</script>
+
+  </head>
+  <body onload="init();" id="stage" class="theme">
+  
+    <h1>Audio</h1>  
+    <div id="info">
+        <table width="100%">
+        <tr><td><b>Status:</b></td><td id="audio_status"> </td></tr>
+        <tr><td><b>Duration:</b></td><td id="audio_duration"></td></tr>
+        <tr><td><b>Position:</b></td><td id="audio_position"></td></tr>
+        </table>
+    </div>
+    <h2>Action</h2>
+    <table>
+        <tr>
+            <th colspan=3>Play Sample Audio</th>
+        </tr>
+        <tr>
+            <td><div class="btn large" style="width:100%;" onclick="playAudio();">Play</div></td>
+            <td><div class="btn large" style="width:100%;" onclick="pauseAudio();">Pause</div></td>
+            <td><div class="btn large" style="width:100%;" onclick="stopAudio();">Stop</div></td>
+        </tr>
+        <tr>
+            <td><div class="btn large" style="width:100%;" onclick="seekAudio('by');">Seek By</div></td>
+            <td><div class="btn large" style="width:100%;" onclick="seekAudio('to');">Seek To</div></td>
+            <td>
+                <div style="width:100%;">
+                    <input class="input numeric" type="number" id="seekinput" value="in seconds">
+                </div>
+            </td>
+            <td><h2>s</h2></td>
+        </tr>
+        <tr>
+            <th colspan=3><br><br>Record Audio</th>
+        </tr>
+        <tr>
+            <td colspan=3><div class="btn large" onclick="recordAudio();">Record Audio for 10 sec</div></td>
+        </tr>
+        <tr>
+            <td><div class="btn large" style="width:100%;" onclick="playRecording();">Play</div></td>
+            <td><div class="btn large" style="width:100%;" onclick="pauseAudio();">Pause</div></td>
+            <td><div class="btn large" style="width:100%;" onclick="stopAudio();">Stop</div></td>
+        </tr>
+    </table>
+    
+    <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
+    
+  </body>
+</html>      

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/test/autotest/html/HtmlReporter.js
----------------------------------------------------------------------
diff --git a/windows8/test/autotest/html/HtmlReporter.js b/windows8/test/autotest/html/HtmlReporter.js
new file mode 100644
index 0000000..7d9d924
--- /dev/null
+++ b/windows8/test/autotest/html/HtmlReporter.js
@@ -0,0 +1,101 @@
+jasmine.HtmlReporter = function(_doc) {
+  var self = this;
+  var doc = _doc || window.document;
+
+  var reporterView;
+
+  var dom = {};
+
+  // Jasmine Reporter Public Interface
+  self.logRunningSpecs = false;
+
+  self.reportRunnerStarting = function(runner) {
+    var specs = runner.specs() || [];
+
+    if (specs.length == 0) {
+      return;
+    }
+
+    createReporterDom(runner.env.versionString());
+    doc.body.appendChild(dom.reporter);
+
+    reporterView = new jasmine.HtmlReporter.ReporterView(dom);
+    reporterView.addSpecs(specs, self.specFilter);
+  };
+
+  self.reportRunnerResults = function(runner) {
+    reporterView && reporterView.complete();
+  };
+
+  self.reportSuiteResults = function(suite) {
+    reporterView.suiteComplete(suite);
+  };
+
+  self.reportSpecStarting = function(spec) {
+    if (self.logRunningSpecs) {
+      self.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
+    }
+  };
+
+  self.reportSpecResults = function(spec) {
+    reporterView.specComplete(spec);
+  };
+
+  self.log = function() {
+    var console = jasmine.getGlobal().console;
+    if (console && console.log) {
+      if (console.log.apply) {
+        console.log.apply(console, arguments);
+      } else {
+        console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
+      }
+    }
+  };
+
+  self.specFilter = function(spec) {
+    if (!focusedSpecName()) {
+      return true;
+    }
+
+    return spec.getFullName().indexOf(focusedSpecName()) === 0;
+  };
+
+  return self;
+
+  function focusedSpecName() {
+    var specName;
+
+    (function memoizeFocusedSpec() {
+      if (specName) {
+        return;
+      }
+
+      var paramMap = [];
+      var params = doc.location.search.substring(1).split('&');
+
+      for (var i = 0; i < params.length; i++) {
+        var p = params[i].split('=');
+        paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
+      }
+
+      specName = paramMap.spec;
+    })();
+
+    return specName;
+  }
+
+  function createReporterDom(version) {
+    dom.reporter = self.createDom('div', { id: 'HTMLReporter', className: 'jasmine_reporter' },
+      dom.banner = self.createDom('div', { className: 'banner' },
+        self.createDom('span', { className: 'title' }, "Jasmine "),
+        self.createDom('span', { className: 'version' }, version)),
+
+      dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}),
+      dom.alert = self.createDom('div', {className: 'alert'}),
+      dom.results = self.createDom('div', {className: 'results'},
+        dom.summary = self.createDom('div', { className: 'summary' }),
+        dom.details = self.createDom('div', { id: 'details' }))
+    );
+  }
+};
+jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/test/autotest/html/HtmlReporterHelpers.js
----------------------------------------------------------------------
diff --git a/windows8/test/autotest/html/HtmlReporterHelpers.js b/windows8/test/autotest/html/HtmlReporterHelpers.js
new file mode 100644
index 0000000..745e1e0
--- /dev/null
+++ b/windows8/test/autotest/html/HtmlReporterHelpers.js
@@ -0,0 +1,60 @@
+jasmine.HtmlReporterHelpers = {};
+
+jasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) {
+  var el = document.createElement(type);
+
+  for (var i = 2; i < arguments.length; i++) {
+    var child = arguments[i];
+
+    if (typeof child === 'string') {
+      el.appendChild(document.createTextNode(child));
+    } else {
+      if (child) {
+        el.appendChild(child);
+      }
+    }
+  }
+
+  for (var attr in attrs) {
+    if (attr == "className") {
+      el[attr] = attrs[attr];
+    } else {
+      el.setAttribute(attr, attrs[attr]);
+    }
+  }
+
+  return el;
+};
+
+jasmine.HtmlReporterHelpers.getSpecStatus = function(child) {
+  var results = child.results();
+  var status = results.passed() ? 'passed' : 'failed';
+  if (results.skipped) {
+    status = 'skipped';
+  }
+
+  return status;
+};
+
+jasmine.HtmlReporterHelpers.appendToSummary = function(child, childElement) {
+  var parentDiv = this.dom.summary;
+  var parentSuite = (typeof child.parentSuite == 'undefined') ? 'suite' : 'parentSuite';
+  var parent = child[parentSuite];
+
+  if (parent) {
+    if (typeof this.views.suites[parent.id] == 'undefined') {
+      this.views.suites[parent.id] = new jasmine.HtmlReporter.SuiteView(parent, this.dom, this.views);
+    }
+    parentDiv = this.views.suites[parent.id].element;
+  }
+
+  parentDiv.appendChild(childElement);
+};
+
+
+jasmine.HtmlReporterHelpers.addHelpers = function(ctor) {
+  for(var fn in jasmine.HtmlReporterHelpers) {
+    ctor.prototype[fn] = jasmine.HtmlReporterHelpers[fn];
+  }
+};
+

http://git-wip-us.apache.org/repos/asf/incubator-cordova-windows/blob/071eba61/windows8/test/autotest/html/ReporterView.js
----------------------------------------------------------------------
diff --git a/windows8/test/autotest/html/ReporterView.js b/windows8/test/autotest/html/ReporterView.js
new file mode 100644
index 0000000..6a6d005
--- /dev/null
+++ b/windows8/test/autotest/html/ReporterView.js
@@ -0,0 +1,164 @@
+jasmine.HtmlReporter.ReporterView = function(dom) {
+  this.startedAt = new Date();
+  this.runningSpecCount = 0;
+  this.completeSpecCount = 0;
+  this.passedCount = 0;
+  this.failedCount = 0;
+  this.skippedCount = 0;
+
+  this.createResultsMenu = function() {
+    this.resultsMenu = this.createDom('span', {className: 'resultsMenu bar'},
+      this.summaryMenuItem = this.createDom('a', {className: 'summaryMenuItem', href: "#"}, '0 specs'),
+      ' | ',
+      this.detailsMenuItem = this.createDom('a', {className: 'detailsMenuItem', href: "#"}, '0 failing'));
+
+    this.summaryMenuItem.onclick = function() {
+      dom.reporter.className = dom.reporter.className.replace(/ showDetails/g, '');
+    };
+
+    this.detailsMenuItem.onclick = function() {
+      showDetails();
+    };
+  };
+
+  this.addSpecs = function(specs, specFilter) {
+    this.totalSpecCount = specs.length;
+
+    this.views = {
+      specs: {},
+      suites: {}
+    };
+
+    for (var i = 0; i < specs.length; i++) {
+      var spec = specs[i];
+      this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom, this.views);
+      if (specFilter(spec)) {
+        this.runningSpecCount++;
+      }
+    }
+  };
+
+  this.specComplete = function(spec) {
+    this.completeSpecCount++;
+
+    if (isUndefined(this.views.specs[spec.id])) {
+      this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom);
+    }
+
+    var specView = this.views.specs[spec.id];
+
+    switch (specView.status()) {
+      case 'passed':
+        this.passedCount++;
+        break;
+
+      case 'failed':
+        this.failedCount++;
+        break;
+
+      case 'skipped':
+        this.skippedCount++;
+        break;
+    }
+
+    specView.refresh();
+    this.refresh();
+  };
+
+  this.suiteComplete = function(suite) {
+    var suiteView = this.views.suites[suite.id];
+    if (isUndefined(suiteView)) {
+      return;
+    }
+    suiteView.refresh();
+  };
+
+  this.refresh = function() {
+
+    if (isUndefined(this.resultsMenu)) {
+      this.createResultsMenu();
+    }
+
+    // currently running UI
+    if (isUndefined(this.runningAlert)) {
+      this.runningAlert = this.createDom('a', {href: "?", className: "runningAlert bar"});
+      dom.alert.appendChild(this.runningAlert);
+    }
+    this.runningAlert.innerHTML = "Running " + this.completeSpecCount + " of " + specPluralizedFor(this.totalSpecCount);
+
+    // skipped specs UI
+    if (isUndefined(this.skippedAlert)) {
+      this.skippedAlert = this.createDom('a', {href: "?", className: "skippedAlert bar"});
+    }
+
+    this.skippedAlert.innerHTML = "Skipping " + this.skippedCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
+
+    if (this.skippedCount === 1 && isDefined(dom.alert)) {
+      dom.alert.appendChild(this.skippedAlert);
+    }
+
+    // passing specs UI
+    if (isUndefined(this.passedAlert)) {
+      this.passedAlert = this.createDom('span', {href: "?", className: "passingAlert bar"});
+    }
+    this.passedAlert.innerHTML = "Passing " + specPluralizedFor(this.passedCount);
+
+    // failing specs UI
+    if (isUndefined(this.failedAlert)) {
+      this.failedAlert = this.createDom('span', {href: "?", className: "failingAlert bar"});
+    }
+    this.failedAlert.innerHTML = "Failing " + specPluralizedFor(this.failedCount);
+
+    if (this.failedCount === 1 && isDefined(dom.alert)) {
+      dom.alert.appendChild(this.failedAlert);
+      dom.alert.appendChild(this.resultsMenu);
+    }
+
+    // summary info
+    this.summaryMenuItem.innerHTML = "" + specPluralizedFor(this.runningSpecCount);
+    this.detailsMenuItem.innerHTML = "" + this.failedCount + " failing";
+  };
+
+  this.complete = function() {
+    dom.alert.removeChild(this.runningAlert);
+
+    this.skippedAlert.innerHTML = "Ran " + this.runningSpecCount + " of " + specPluralizedFor(this.totalSpecCount) + " - run all";
+
+    if (this.failedCount === 0) {
+      dom.alert.appendChild(this.createDom('span', {className: 'passingAlert bar'}, "Passing " + specPluralizedFor(this.passedCount)));
+    } else {
+      showDetails();
+    }
+
+    dom.banner.appendChild(this.createDom('span', {className: 'duration'}, "finished in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s"));
+  };
+
+  return this;
+
+  function showDetails() {
+    if (dom.reporter.className.search(/showDetails/) === -1) {
+      dom.reporter.className += " showDetails";
+    }
+  }
+
+  function isUndefined(obj) {
+    return typeof obj === 'undefined';
+  }
+
+  function isDefined(obj) {
+    return !isUndefined(obj);
+  }
+
+  function specPluralizedFor(count) {
+    var str = count + " spec";
+    if (count > 1) {
+      str += "s"
+    }
+    return str;
+  }
+
+};
+
+jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.ReporterView);
+
+


Mime
View raw message