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.
'; + }); +};