You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2012/11/21 22:33:16 UTC
spec commit: Add manual tests for InAppBrowser
Updated Branches:
refs/heads/master b70273bdc -> fab6d8e6b
Add manual tests for InAppBrowser
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/commit/fab6d8e6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/tree/fab6d8e6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/diff/fab6d8e6
Branch: refs/heads/master
Commit: fab6d8e6b3a96e30848a8761c4b5072e5695eea3
Parents: b70273b
Author: Simon MacDonald <si...@gmail.com>
Authored: Wed Nov 21 14:15:00 2012 -0500
Committer: Simon MacDonald <si...@gmail.com>
Committed: Wed Nov 21 14:15:00 2012 -0500
----------------------------------------------------------------------
inappbrowser/index.html | 85 ++++++++++++++++++++++++++++++++++++++++++
inappbrowser/local.html | 40 ++++++++++++++++++++
index.html | 1 +
3 files changed, 126 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/fab6d8e6/inappbrowser/index.html
----------------------------------------------------------------------
diff --git a/inappbrowser/index.html b/inappbrowser/index.html
new file mode 100644
index 0000000..05a4338
--- /dev/null
+++ b/inappbrowser/index.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
+ <title>Cordova Mobile Spec</title>
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
+
+
+<script type="text/javascript" charset="utf-8">
+
+ var deviceReady = false;
+
+ /**
+ * Function called when page has finished loading.
+ */
+ function init() {
+ document.addEventListener("deviceready", function() {
+ deviceReady = true;
+ console.log("Device="+device.platform+" "+device.version);
+ }, false);
+ window.setTimeout(function() {
+ if (!deviceReady) {
+ alert("Error: Apache Cordova did not initialize. Demo will not run correctly.");
+ }
+ },1000);
+ }
+
+</script>
+
+ </head>
+ <body onload="init();" id="stage" class="theme">
+
+ <h1>InAppBrowser</h1>
+ <div id="info">
+ Make sure http://www.google.com is white listed
+ Make sure http://www.apple.com is not in the white list
+ </div>
+ <h1>Local URL</h1>
+ <div class="btn large" onclick="window.open('local.html');">Default: CordovaWebView</div>
+ <div class="btn large" onclick="window.open('local.html', '_self');">Target=Self: CordovaWebView</div>
+ <div class="btn large" onclick="window.open('local.html', '_system');">Target=System: Error</div>
+ <div class="btn large" onclick="window.open('local.html', '_blank');">Target=Blank: InAppBrowser</div>
+ <div class="btn large" onclick="window.open('local.html', 'random_string');">Target=Random: InAppBrowser</div>
+ <div class="btn large" onclick="window.open('local.html', 'random_string', 'location=no');">Target=Random, no location bar: InAppBrowser</div>
+ <h1>White Listed URL</h1>
+ <div class="btn large" onclick="window.open('http://www.google.com');">Default: CordovaWebView</div>
+ <div class="btn large" onclick="window.open('http://www.google.com', '_self');">Target=Self: CordovaWebView</div>
+ <div class="btn large" onclick="window.open('http://www.google.com', '_system');">Target=System: System Browser</div>
+ <div class="btn large" onclick="window.open('http://www.google.com', '_blank');">Target=Blank: InAppBrowser</div>
+ <div class="btn large" onclick="window.open('http://www.google.com', 'random_string');">Target=Random: InAppBrowser</div>
+ <div class="btn large" onclick="window.open('http://www.google.com', 'random_string', 'location=no');">Target=Random, no location bar: InAppBrowser</div>
+ <h1>Non White Listed URL</h1>
+ <div class="btn large" onclick="window.open('http://www.apple.com');">Default: InAppBrowser</div>
+ <div class="btn large" onclick="window.open('http://www.apple.com', '_self');">Target=Self: InAppBrowser</div>
+ <div class="btn large" onclick="window.open('http://www.apple.com', '_system');">Target=System: System</div>
+ <div class="btn large" onclick="window.open('http://www.apple.com', '_blank');">Target=Blank: InAppBrowser</div>
+ <div class="btn large" onclick="window.open('http://www.apple.com', 'random_string');">Target=Random: InAppBrowser</div>
+ <div class="btn large" onclick="window.open('http://www.apple.com', 'random_string', 'location=no');">Target=Random, no location bar: InAppBrowser</div>
+ <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/fab6d8e6/inappbrowser/local.html
----------------------------------------------------------------------
diff --git a/inappbrowser/local.html b/inappbrowser/local.html
new file mode 100644
index 0000000..7e24aae
--- /dev/null
+++ b/inappbrowser/local.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,maximum-scale=1.0,initial-scale=1.0" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <!-- ISO-8859-1 -->
+ <title>Cordova Mobile Spec</title>
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title" charset="utf-8">
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
+ </head>
+ <body id="stage" class="theme">
+
+ <h1>InAppBrowser - Local URL</h1>
+ <div id="info">
+ You have successfully loaded a local URL
+ </div>
+ <h2> </h2><div class="backBtn" onclick="backHome();">Back</div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/fab6d8e6/index.html
----------------------------------------------------------------------
diff --git a/index.html b/index.html
index 9cfde7e..836df48 100644
--- a/index.html
+++ b/index.html
@@ -57,5 +57,6 @@
<a href="sql/index.html" class="btn large">Web SQL</a>
<a href="storage/index.html" class="btn large">Local Storage</a>
<a href="execbenchmark/index.html" class="btn large">Benchmark exec()</a>
+ <a href="inappbrowser/index.html" class="btn large">In App Browser</a>
</body>
</html>