Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 01C64200C88 for ; Thu, 27 Apr 2017 22:11:57 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0060D160BBC; Thu, 27 Apr 2017 20:11:57 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3852F160BA7 for ; Thu, 27 Apr 2017 22:11:56 +0200 (CEST) Received: (qmail 34903 invoked by uid 500); 27 Apr 2017 20:11:55 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 34766 invoked by uid 99); 27 Apr 2017 20:11:55 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Apr 2017 20:11:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 39268E04B1; Thu, 27 Apr 2017 20:11:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: filmaj@apache.org To: commits@cordova.apache.org Date: Thu, 27 Apr 2017 20:11:57 -0000 Message-Id: <64cba93ffb494432bbc320779dd22d3e@git.apache.org> In-Reply-To: <7a5b7c752a6c48898295af62112ac716@git.apache.org> References: <7a5b7c752a6c48898295af62112ac716@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/9] cordova-plugin-screen-orientation git commit: CB-12588: add manual tests in cordova-plugin-test-framework style archived-at: Thu, 27 Apr 2017 20:11:57 -0000 CB-12588: add manual tests in cordova-plugin-test-framework style Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/f12721b3 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/f12721b3 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/f12721b3 Branch: refs/heads/2.0.x Commit: f12721b35e8f48599d1698ead85eaf707b8532fa Parents: 5a7370a Author: filmaj Authored: Mon Mar 20 12:36:50 2017 -0700 Committer: filmaj Committed: Mon Mar 20 12:36:50 2017 -0700 ---------------------------------------------------------------------- tests/tests.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/f12721b3/tests/tests.js ---------------------------------------------------------------------- diff --git a/tests/tests.js b/tests/tests.js index b91f81a..42b5aff 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -139,3 +139,23 @@ exports.defineAutoTests = function() { }); }); }; +exports.defineManualTests = function(contentEl, createActionButton) { + + createActionButton('Listen to orientationchange events', function() { + window.addEventListener("orientationchange", function(){ + contentEl.innerHTML += '

Orientation changed! ' + screen.orientation.type + '

'; + }); + }); + createActionButton('Unlock orientation', function() { + screen.orientation.unlock(); + contentEl.innerHTML += '

Orientation unlocked.

'; + }); + createActionButton('Lock to portrait', function() { + screen.orientation.lock('portrait'); + contentEl.innerHTML += '

Orientation locked to portrait.

'; + }); + createActionButton('Lock to landscape', function() { + screen.orientation.lock('landscape'); + contentEl.innerHTML += '

Orientation locked to landscape.

'; + }); +}; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org