cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject spec commit: CB-5222 - ios - Add manual mobile-spec tests for Keyboard plugin org.apache.cordova.keyboard
Date Wed, 30 Oct 2013 16:39:42 GMT
Updated Branches:
  refs/heads/master 82e06cab0 -> 8e60a00b1


CB-5222 - ios - Add manual mobile-spec tests for Keyboard plugin org.apache.cordova.keyboard


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/8e60a00b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/8e60a00b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/8e60a00b

Branch: refs/heads/master
Commit: 8e60a00b10ce9770ce51e7467b37a0e298d0609a
Parents: 82e06ca
Author: Shazron Abdullah <shazron@gmail.com>
Authored: Wed Oct 30 12:39:27 2013 -0400
Committer: Shazron Abdullah <shazron@gmail.com>
Committed: Wed Oct 30 12:39:27 2013 -0400

----------------------------------------------------------------------
 index.html          |   1 +
 keyboard/index.html | 207 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 208 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/8e60a00b/index.html
----------------------------------------------------------------------
diff --git a/index.html b/index.html
index 82f6d3b..d9f2957 100644
--- a/index.html
+++ b/index.html
@@ -62,5 +62,6 @@
     <a href="storage/index.html" class="btn large">Local Storage</a>
     <a href="benchmarks/index.html" class="btn large">Benchmarks</a>
     <a href="inappbrowser/index.html" class="btn large">In App Browser</a>
+    <a href="keyboard/index.html" class="btn large">Keyboard</a>
   </body>
 </html>

http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/8e60a00b/keyboard/index.html
----------------------------------------------------------------------
diff --git a/keyboard/index.html b/keyboard/index.html
new file mode 100644
index 0000000..2a5c7be
--- /dev/null
+++ b/keyboard/index.html
@@ -0,0 +1,207 @@
+<!DOCTYPE html>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+
+<html>
+  <head>
+    <meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0"
/>
+    <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1
-->
+    <title>Cordova Mobile Spec</title>
+    <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no
title" charset="utf-8">
+    <style>
+    table {
+      width: 100%;
+      border: 1px solid white;
+    }
+
+    th, td {
+      width: 25%;
+      text-align: center;
+      vertical-align: top;
+      border: 1px solid gray;
+    }
+    
+    .highlight-w {
+        color: white;
+    }
+    
+    #stage.theme .small{
+        width:50px;
+        padding:1.2em 0;
+    }
+    
+    input[type=text] {
+        width: 70%;
+        height: 30px;
+    }
+    
+    .btn-dismiss {
+        width: 20%;
+        height: 30px;
+    }
+
+    </style>
+    <script>
+        window.onerror = function(err,fn,ln) {alert("ERROR:" + err + ", " + fn + ":" + ln);};
+    </script>
+    <script type="text/javascript" charset="utf-8" src="../cordova-incl.js"></script>
     
+    
+    <script type="text/javascript" charset="utf-8">
+
+    var deviceReady = false;
+    
+    /**
+     * Function called when page has finished loading.
+     */
+    function init() {
+        document.addEventListener("deviceready", function() {
+                deviceReady = true;
+                console.log("Device="+device.platform+" "+device.version);
+            }, false);
+        window.setTimeout(function() {
+        	if (!deviceReady) {
+        		alert("Error: Apache Cordova did not initialize.  Demo will not run correctly.");
+        	}
+        },1000);
+    }
+    
+    function setShrinkView_hideFormAccessoryBar_andDisableScrollingInShrinkView(shrinkView,
hideFormAccessoryBar, disableScrollingInShrinkView)
+    {
+        var keyboardPlugin = Keyboard; // for now
+        
+        keyboardPlugin.shrinkView(shrinkView);
+        document.getElementById("shrinkView-arg").innerHTML = shrinkView;
+        
+        keyboardPlugin.hideFormAccessoryBar(hideFormAccessoryBar);
+        document.getElementById("hideFormAccessoryBar-arg").innerHTML = hideFormAccessoryBar;
+
+        keyboardPlugin.disableScrollingInShrinkView(disableScrollingInShrinkView);
+        document.getElementById("disableScrollingInShrinkView-arg").innerHTML = disableScrollingInShrinkView;
+    }
+
+    </script>
+  </head>
+  <body onload="init();" id="stage" class="theme">
+  
+    <h1>Keyboard (iOS)</h1>
+
+    <br />
+    <div>
+        <input type="text" placeholder="touch to see keyboard" /><button class="btn-dismiss">dismiss</button>
+    </div>
+
+    <h1>isVisible</h1>
+    <br />
+    <div class="btn large" onclick="alert('Keyboard.isVisible: ' + Keyboard.isVisible);">Keyboard.isVisible</div>
+    
+    <h1>API Tests</h1>
+    <br />
+    <div>
+    The current state is highlighted below in the list. Touch a test <span class="highlight-w">"#"
button</span> in the table, then touch a textfield (available at the top and bottom
of the page) to see the results.
+    </div>
+    <ul>
+        <li>shrinkView(<span id="shrinkView-arg" class="highlight-w">false</span>)</li>
+        <li>hideFormAccessoryBar(<span id="hideFormAccessoryBar-arg" class="highlight-w">false</span>)</li>
+        <li>disableScrollingInShrinkView(<span id="disableScrollingInShrinkView-arg"
class="highlight-w">false</span>)</li>
+    </ul>
+    <!-- &#x2717; is X, &#10004; is check-mark -->
+    <table>
+        <tr>
+            <th>Test #</th>
+            <th>shrinkView</th>
+            <th>hideForm&hellip;</th>
+            <th>disableScrolling&hellip;</th>
+        </tr>
+        <tr>
+            <td class="highlight-w">
+                <div class="btn small" onclick="setShrinkView_hideFormAccessoryBar_andDisableScrollingInShrinkView(false,
false, false)">1</div>
+            </td>
+            <td>&#x2717;</td>
+            <td>&#x2717;</td>
+            <td>&#x2717;</td>
+        </tr>
+        <tr>
+            <td class="highlight-w">
+                <div class="btn small" onclick="setShrinkView_hideFormAccessoryBar_andDisableScrollingInShrinkView(false,
false, true)">2</div>
+            </td>
+            <td>&#x2717;</td>
+            <td>&#x2717;</td>
+            <td class="highlight-w">&#10004;</td>
+        </tr>
+        <tr>
+            <td class="highlight-w">
+                <div class="btn small" onclick="setShrinkView_hideFormAccessoryBar_andDisableScrollingInShrinkView(false,
true, true)">3</div>
+            </td>
+            <td>&#x2717;</td>
+            <td class="highlight-w">&#10004;</td>
+            <td class="highlight-w">&#10004;</td>
+        </tr>
+        <tr>
+            <td class="highlight-w">
+                <div class="btn small" onclick="setShrinkView_hideFormAccessoryBar_andDisableScrollingInShrinkView(false,
true, false)">4</div>
+            </td>
+            <td>&#x2717;</td>
+            <td class="highlight-w">&#10004;</td>
+            <td>&#x2717;</td>
+        </tr>
+        <tr>
+            <td class="highlight-w">
+                <div class="btn small" onclick="setShrinkView_hideFormAccessoryBar_andDisableScrollingInShrinkView(true,
false, false)">5</div>
+            </td>
+            <td class="highlight-w">&#10004;</td>
+            <td>&#x2717;</td>
+            <td>&#x2717;</td>
+        </tr>
+        <tr>
+            <td class="highlight-w">
+                <div class="btn small" onclick="setShrinkView_hideFormAccessoryBar_andDisableScrollingInShrinkView(true,
false, true)">6</div>
+            </td>
+            <td class="highlight-w">&#10004;</td>
+            <td>&#x2717;</td>
+            <td class="highlight-w">&#10004;</td>
+        </tr>
+        <tr>
+            <td class="highlight-w">
+                <div class="btn small" onclick="setShrinkView_hideFormAccessoryBar_andDisableScrollingInShrinkView(true,
true, true)">7</div>
+            </td>
+            <td class="highlight-w">&#10004;</td>
+            <td class="highlight-w">&#10004;</td>
+            <td class="highlight-w">&#10004;</td>
+        </tr>
+        <tr>
+            <td class="highlight-w">
+                <div class="btn small" onclick="setShrinkView_hideFormAccessoryBar_andDisableScrollingInShrinkView(true,
true, false)">8</div>
+            </td>
+            <td class="highlight-w">&#10004;</td>
+            <td class="highlight-w">&#10004;</td>
+            <td>&#x2717;</td>
+        </tr>
+    </table>
+    <br />
+    <div>
+        <input type="text" placeholder="touch to see keyboard" /><button class="btn-dismiss">dismiss</button>
+    </div>
+    <br />
+    <div class="backBtn" onclick="backHome();">Back</div>
+    
+  </body>
+</html>


Mime
View raw message