You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2014/08/07 22:41:13 UTC
[1/3] git commit: CB-7195 ported statusbar tests to framework
Repository: cordova-plugin-statusbar
Updated Branches:
refs/heads/master c4638c858 -> d109b7ade
CB-7195 ported statusbar tests to framework
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/commit/83697e52
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/tree/83697e52
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/diff/83697e52
Branch: refs/heads/master
Commit: 83697e52ef311735b8bed5b3cd8b3341197e8a6f
Parents: 95f8de0
Author: Staci Cooper <sm...@us.ibm.com>
Authored: Thu Jul 24 15:11:27 2014 -0400
Committer: Staci Cooper <sm...@us.ibm.com>
Committed: Thu Jul 24 15:40:31 2014 -0400
----------------------------------------------------------------------
test/tests.js | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 101 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/83697e52/test/tests.js
----------------------------------------------------------------------
diff --git a/test/tests.js b/test/tests.js
new file mode 100644
index 0000000..e49ddb9
--- /dev/null
+++ b/test/tests.js
@@ -0,0 +1,101 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+exports.defineManualTests = function (contentEl, createActionButton) {
+ function log(msg) {
+ var el = document.getElementById("info");
+ var logLine = document.createElement('div');
+ logLine.innerHTML = msg;
+ el.appendChild(logLine);
+ }
+
+ function doShow() {
+ StatusBar.show();
+ log('StatusBar.isVisible=' + StatusBar.isVisible);
+ }
+
+ function doHide() {
+ StatusBar.hide();
+ log('StatusBar.isVisible=' + StatusBar.isVisible);
+ }
+
+ function doColor1() {
+ log('set color=red');
+ StatusBar.backgroundColorByName('red');
+ }
+
+ function doColor2() {
+ log('set style=translucent black');
+ StatusBar.styleBlackTranslucent();
+ }
+
+ function doColor3() {
+ log('set style=default');
+ StatusBar.styleDefault();
+ }
+
+ var showOverlay = true;
+ function doOverlay() {
+ showOverlay = !showOverlay;
+ StatusBar.overlaysWebView(showOverlay);
+ log('Set overlay=' + showOverlay);
+ }
+
+ /******************************************************************************/
+
+ contentEl.innerHTML = '<div id="info"></div>' +
+ 'Also: tapping bar on iOS should emit a log.' +
+ '<div id="action-show"></div>' +
+ '<div id="action-hide"></div>' +
+ '<div id="action-color1"></div>' +
+ '<div id="action-color2"></div>' +
+ '<div id="action-color3"></div>' +
+ '<div id="action-overlays"></div>';
+
+ log('StatusBar.isVisible=' + StatusBar.isVisible);
+ window.addEventListener('statusTap', function () {
+ log('tap!');
+ }, false);
+
+ createActionButton("Show", function () {
+ doShow();
+ }, 'action-show');
+
+ createActionButton("Hide", function () {
+ doHide();
+ }, 'action-hide');
+
+ createActionButton("Style=red", function () {
+ doColor1();
+ }, 'action-color1');
+
+ createActionButton("Style=translucent black", function () {
+ doColor2();
+ }, 'action-color2');
+
+ createActionButton("Style=default", function () {
+ doColor3();
+ }, 'action-color3');
+
+ createActionButton("Toggle Overlays", function () {
+ doOverlay();
+ }, 'action-overlays');
+};
[3/3] git commit: Merge branch 'CB-7195' of
https://github.com/stacic/cordova-plugin-statusbar
Posted by pu...@apache.org.
Merge branch 'CB-7195' of https://github.com/stacic/cordova-plugin-statusbar
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/commit/d109b7ad
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/tree/d109b7ad
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/diff/d109b7ad
Branch: refs/heads/master
Commit: d109b7ade7c452fc4501ace98d33994a31b24e91
Parents: c4638c8 32fca02
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Aug 7 13:40:41 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu Aug 7 13:40:41 2014 -0700
----------------------------------------------------------------------
tests/plugin.xml | 31 ++++++++++++++++
tests/tests.js | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 132 insertions(+)
----------------------------------------------------------------------
[2/3] git commit: Renamed test dir, added nested plugin.xml
Posted by pu...@apache.org.
Renamed test dir, added nested plugin.xml
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/commit/32fca02f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/tree/32fca02f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/diff/32fca02f
Branch: refs/heads/master
Commit: 32fca02faa735e97d679e69b42e93f15422fd976
Parents: 83697e5
Author: Staci Cooper <sm...@us.ibm.com>
Authored: Fri Aug 1 16:39:12 2014 -0400
Committer: Staci Cooper <sm...@us.ibm.com>
Committed: Fri Aug 1 16:39:12 2014 -0400
----------------------------------------------------------------------
test/tests.js | 101 --------------------------------------------------
tests/plugin.xml | 31 ++++++++++++++++
tests/tests.js | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 132 insertions(+), 101 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/32fca02f/test/tests.js
----------------------------------------------------------------------
diff --git a/test/tests.js b/test/tests.js
deleted file mode 100644
index e49ddb9..0000000
--- a/test/tests.js
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-exports.defineManualTests = function (contentEl, createActionButton) {
- function log(msg) {
- var el = document.getElementById("info");
- var logLine = document.createElement('div');
- logLine.innerHTML = msg;
- el.appendChild(logLine);
- }
-
- function doShow() {
- StatusBar.show();
- log('StatusBar.isVisible=' + StatusBar.isVisible);
- }
-
- function doHide() {
- StatusBar.hide();
- log('StatusBar.isVisible=' + StatusBar.isVisible);
- }
-
- function doColor1() {
- log('set color=red');
- StatusBar.backgroundColorByName('red');
- }
-
- function doColor2() {
- log('set style=translucent black');
- StatusBar.styleBlackTranslucent();
- }
-
- function doColor3() {
- log('set style=default');
- StatusBar.styleDefault();
- }
-
- var showOverlay = true;
- function doOverlay() {
- showOverlay = !showOverlay;
- StatusBar.overlaysWebView(showOverlay);
- log('Set overlay=' + showOverlay);
- }
-
- /******************************************************************************/
-
- contentEl.innerHTML = '<div id="info"></div>' +
- 'Also: tapping bar on iOS should emit a log.' +
- '<div id="action-show"></div>' +
- '<div id="action-hide"></div>' +
- '<div id="action-color1"></div>' +
- '<div id="action-color2"></div>' +
- '<div id="action-color3"></div>' +
- '<div id="action-overlays"></div>';
-
- log('StatusBar.isVisible=' + StatusBar.isVisible);
- window.addEventListener('statusTap', function () {
- log('tap!');
- }, false);
-
- createActionButton("Show", function () {
- doShow();
- }, 'action-show');
-
- createActionButton("Hide", function () {
- doHide();
- }, 'action-hide');
-
- createActionButton("Style=red", function () {
- doColor1();
- }, 'action-color1');
-
- createActionButton("Style=translucent black", function () {
- doColor2();
- }, 'action-color2');
-
- createActionButton("Style=default", function () {
- doColor3();
- }, 'action-color3');
-
- createActionButton("Toggle Overlays", function () {
- doOverlay();
- }, 'action-overlays');
-};
http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/32fca02f/tests/plugin.xml
----------------------------------------------------------------------
diff --git a/tests/plugin.xml b/tests/plugin.xml
new file mode 100644
index 0000000..a450297
--- /dev/null
+++ b/tests/plugin.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
+ xmlns:rim="http://www.blackberry.com/ns/widgets"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ id="org.apache.cordova.statusbar.tests"
+ version="0.1.7-dev">
+ <name>Cordova StatusBar Plugin Tests</name>
+ <license>Apache 2.0</license>
+
+ <js-module src="tests.js" name="tests">
+ </js-module>
+</plugin>
http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/32fca02f/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
new file mode 100644
index 0000000..e49ddb9
--- /dev/null
+++ b/tests/tests.js
@@ -0,0 +1,101 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+exports.defineManualTests = function (contentEl, createActionButton) {
+ function log(msg) {
+ var el = document.getElementById("info");
+ var logLine = document.createElement('div');
+ logLine.innerHTML = msg;
+ el.appendChild(logLine);
+ }
+
+ function doShow() {
+ StatusBar.show();
+ log('StatusBar.isVisible=' + StatusBar.isVisible);
+ }
+
+ function doHide() {
+ StatusBar.hide();
+ log('StatusBar.isVisible=' + StatusBar.isVisible);
+ }
+
+ function doColor1() {
+ log('set color=red');
+ StatusBar.backgroundColorByName('red');
+ }
+
+ function doColor2() {
+ log('set style=translucent black');
+ StatusBar.styleBlackTranslucent();
+ }
+
+ function doColor3() {
+ log('set style=default');
+ StatusBar.styleDefault();
+ }
+
+ var showOverlay = true;
+ function doOverlay() {
+ showOverlay = !showOverlay;
+ StatusBar.overlaysWebView(showOverlay);
+ log('Set overlay=' + showOverlay);
+ }
+
+ /******************************************************************************/
+
+ contentEl.innerHTML = '<div id="info"></div>' +
+ 'Also: tapping bar on iOS should emit a log.' +
+ '<div id="action-show"></div>' +
+ '<div id="action-hide"></div>' +
+ '<div id="action-color1"></div>' +
+ '<div id="action-color2"></div>' +
+ '<div id="action-color3"></div>' +
+ '<div id="action-overlays"></div>';
+
+ log('StatusBar.isVisible=' + StatusBar.isVisible);
+ window.addEventListener('statusTap', function () {
+ log('tap!');
+ }, false);
+
+ createActionButton("Show", function () {
+ doShow();
+ }, 'action-show');
+
+ createActionButton("Hide", function () {
+ doHide();
+ }, 'action-hide');
+
+ createActionButton("Style=red", function () {
+ doColor1();
+ }, 'action-color1');
+
+ createActionButton("Style=translucent black", function () {
+ doColor2();
+ }, 'action-color2');
+
+ createActionButton("Style=default", function () {
+ doColor3();
+ }, 'action-color3');
+
+ createActionButton("Toggle Overlays", function () {
+ doOverlay();
+ }, 'action-overlays');
+};