You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2014/04/04 15:23:49 UTC

[1/2] spec commit: Add classes to hide and show items by platform

Repository: cordova-mobile-spec
Updated Branches:
  refs/heads/master d434ff29b -> 3dc13fa03


Add classes to hide and show items by platform

This is going to be used in file tests, as the specific filesystems under
test are very platform-specific


Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/93750e79
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/93750e79
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/93750e79

Branch: refs/heads/master
Commit: 93750e79d5b6f2af3ccb5e793b444368449f9e0f
Parents: d434ff2
Author: Ian Clelland <ic...@chromium.org>
Authored: Fri Apr 4 09:20:45 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Fri Apr 4 09:20:45 2014 -0400

----------------------------------------------------------------------
 master.css | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/93750e79/master.css
----------------------------------------------------------------------
diff --git a/master.css b/master.css
index e93c937..8c2b232 100644
--- a/master.css
+++ b/master.css
@@ -162,3 +162,21 @@
   #stage.theme .numeric{
    width:100%;
   }
+
+/* Selectively hide and show items by platform */
+.platform {
+  display: none;
+}
+
+body.amazon-fireos-platform .platform.amazon-fireos,
+body.android-platform .platform.android,
+body.blackberry10-platform .platform.blackberry10,
+body.browser-platform .platform.browser,
+body.firefoxos-platform .platform.firefoxos,
+body.ios-platform .platform.ios,
+body.osx-platform .platform.ios,
+body.ubuntu-platform .platform.ubuntu,
+body.windows8-platform .platform.windows8,
+body.windowsphone-platform .platform.windowsphone {
+  display: block;
+}


[2/2] spec commit: CB-6394: Add manual tests for new filesystem roots

Posted by ia...@apache.org.
CB-6394: Add manual tests for new filesystem roots


Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/3dc13fa0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/3dc13fa0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/3dc13fa0

Branch: refs/heads/master
Commit: 3dc13fa034b601427baa2c9b9fc402600ca061e1
Parents: 93750e7
Author: Ian Clelland <ic...@chromium.org>
Authored: Fri Apr 4 09:22:40 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Fri Apr 4 09:22:40 2014 -0400

----------------------------------------------------------------------
 file/index.html | 46 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 45 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/3dc13fa0/file/index.html
----------------------------------------------------------------------
diff --git a/file/index.html b/file/index.html
index e4a9ce4..033b97d 100644
--- a/file/index.html
+++ b/file/index.html
@@ -45,6 +45,7 @@
                 deviceReady = true;
                 console.log("Device="+device.platform+" "+device.version);
                 bindEvents();
+                document.body.classList.add(device.platform.toLowerCase() + "-platform");
             }, false);
         window.setTimeout(function() {
             if (!deviceReady) {
@@ -59,6 +60,10 @@
         document.getElementById('downloadVideoCDV').addEventListener('click', downloadVideoCDV, false);
         document.getElementById('downloadVideoNative').addEventListener('click', downloadVideoNative, false);
         document.getElementById('testPrivateURL').addEventListener('click', testPrivateURL, false);
+        var fsButtons = document.querySelectorAll('.resolveFs');
+        for (var i=0; i < fsButtons.length; ++i) {
+            fsButtons[i].addEventListener('click', resolveFs, false);
+        }
     }
 
     function clearLog() {
@@ -159,6 +164,22 @@
             }, logError("getFile"));
         }, logError("requestFileSystem"));
     }
+
+    function resolveFs(ev) {
+        var fsURL = "cdvfile://localhost/" + ev.target.getAttribute('data-fsname') + "/";
+        logMessage("Resolving URL: " + fsURL);
+        resolveLocalFileSystemURL(fsURL, function(entry) {
+            logMessage("Success", 'green');
+            logMessage(entry.toURL(), 'blue');
+            logMessage(entry.toInternalURL(), 'blue');
+            logMessage("Resolving URL: " + entry.toURL());
+            resolveLocalFileSystemURL(entry.toURL(), function(entry2) {
+                logMessage("Success", 'green');
+                logMessage(entry2.toURL(), 'blue');
+                logMessage(entry2.toInternalURL(), 'blue');
+            }, logError("resolveLocalFileSystemURL"));
+        }, logError("resolveLocalFileSystemURL"));
+    }
 </script>
 
   </head>
@@ -171,7 +192,30 @@
     <div class="btn large" id="downloadVideoCDV">Download and play video (cdvfile)</div>
     <div class="btn large" id="downloadVideoNative">Download and play video (native)</div>
 
-    <div class="btn large" id="testPrivateURL">Test /private/ URL (iOS)</div>
+    <div class="ios platform">
+        <h2>iOS Special URL handling</h2>
+        <div class="btn large" id="testPrivateURL">Test /private/ URL (iOS)</div>
+
+        <h2>iOS Extra File Systems</h2>
+        <div class="btn large resolveFs" data-fsname="library">Resolve library FS</div>
+        <div class="btn large resolveFs" data-fsname="library-nosync">Resolve library-nosync FS</div>
+        <div class="btn large resolveFs" data-fsname="documents">Resolve documents FS</div>
+        <div class="btn large resolveFs" data-fsname="documents-nosync">Resolve documents-nosync FS</div>
+        <div class="btn large resolveFs" data-fsname="cache">Resolve cache FS</div>
+        <div class="btn large resolveFs" data-fsname="bundle">Resolve bundle FS</div>
+        <div class="btn large resolveFs" data-fsname="root">Resolve root FS</div>
+    </div>
+
+    <div class="android platform">
+        <h2>Android Extra File Systems</h2>
+        <div class="btn large resolveFs" data-fsname="files">Resolve files FS</div>
+        <div class="btn large resolveFs" data-fsname="files-external">Resolve files-external FS</div>
+        <div class="btn large resolveFs" data-fsname="documents">Resolve documents FS</div>
+        <div class="btn large resolveFs" data-fsname="sdcard">Resolve sdcard FS</div>
+        <div class="btn large resolveFs" data-fsname="cache">Resolve cache FS</div>
+        <div class="btn large resolveFs" data-fsname="cache-external">Resolve cache-external FS</div>
+        <div class="btn large resolveFs" data-fsname="root">Resolve root FS</div>
+    </div>
 
     <div id="log"></div>
     <div id="output"></div>