[behavior][MediaPlay][Add exit fullscreen function] 50/148350/1
authoryuanzhongyuan <zy123.yuan@samsung.com>
Thu, 7 Sep 2017 09:38:42 +0000 (17:38 +0800)
committerJihun Park <jihun87.park@samsung.com>
Thu, 7 Sep 2017 12:29:18 +0000 (12:29 +0000)
Change-Id: Ie5dbfa415b994e3e0834b3cceaf6e25e32c39579

mobile/tct-behavior-tests/tests/MediaPlayback/index.html
mobile/tct-behavior-tests/tests/MediaPlayback/js/main.js
tv/tct-behavior-tests/tests/MediaPlayback/index.html
tv/tct-behavior-tests/tests/MediaPlayback/js/main.js
wearable/tct-behavior-tests/tests/MediaPlayback/index.html
wearable/tct-behavior-tests/tests/MediaPlayback/js/main.js

index ea2dbe11040ea61888f604cb696e91de7d0c590d..a25d6e1f636a24a58f2a705df4be982adbc722f7 100755 (executable)
@@ -65,6 +65,7 @@ Authors:
       <font class="fontSize">
         <p>Test Purpose: </p>
         <p>Verifies the video playback of 3GP and MP4 files works correctly. And tests the functionality of playback operations including play and pause, volume up and down, time bar sliding forward and backward, full screen and normal screen switching, device rotate, foreground and background switching on every video files.</p>
+        <p>Note: Press back key to exit fullscreen</p>
         <p>Expected Result: </p>
         <p>Test passes if all the check points work well during the video playback.</p>
       </font>
index 03066f7ccabb6b092d822fd75b0da4643bcac6f7..88f581ffdaacd76d347c23d5504dc1a66f5d9c4c 100755 (executable)
@@ -46,6 +46,28 @@ $(document).ready(function(){
     DisablePassButton();
 });
 
+function exitFullscreen() {
+    var de = document;
+    if (de.exitFullscreen) {
+        de.exitFullscreen();
+    } else if (de.mozCancelFullScreen) {
+        de.mozCancelFullScreen();
+    } else if (de.webkitCancelFullScreen) {
+        de.webkitCancelFullScreen();
+    }
+}
+
+window.onload = function() {
+    // add eventListener for tizenhwkey
+    document.addEventListener('tizenhwkey', function(e) {
+        if (e.keyName === "back") {
+            try {
+                exitFullscreen();
+            } catch (ignore) {}
+        }
+    });
+};
+
 function Previous() {
     testTarget=document.getElementById("MediaPlayback");
     var fileName = getFileName(testTarget.src);
index a4fd9722f9dd385d5a2c995ef1970c2e01a7b88d..a25d6e1f636a24a58f2a705df4be982adbc722f7 100755 (executable)
@@ -27,7 +27,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
         Lin, Wanming <wanmingx.lin@intel.com>
-
+        Zhongyuan Yuan <zy123.yuan@samsung.com>
 -->
 <html>
   <head>
@@ -64,7 +64,8 @@ Authors:
     <div data-role="popup" id="popup_info">
       <font class="fontSize">
         <p>Test Purpose: </p>
-        <p>Verifies the video playback of 3GP and MP4 files works correctly. And tests the functionality of playback operations including play and pause, volume up and down, time bar sliding forward and backward, full screen and normal screen switching on every video files.</p>
+        <p>Verifies the video playback of 3GP and MP4 files works correctly. And tests the functionality of playback operations including play and pause, volume up and down, time bar sliding forward and backward, full screen and normal screen switching, device rotate, foreground and background switching on every video files.</p>
+        <p>Note: Press back key to exit fullscreen</p>
         <p>Expected Result: </p>
         <p>Test passes if all the check points work well during the video playback.</p>
       </font>
index 03066f7ccabb6b092d822fd75b0da4643bcac6f7..88f581ffdaacd76d347c23d5504dc1a66f5d9c4c 100755 (executable)
@@ -46,6 +46,28 @@ $(document).ready(function(){
     DisablePassButton();
 });
 
+function exitFullscreen() {
+    var de = document;
+    if (de.exitFullscreen) {
+        de.exitFullscreen();
+    } else if (de.mozCancelFullScreen) {
+        de.mozCancelFullScreen();
+    } else if (de.webkitCancelFullScreen) {
+        de.webkitCancelFullScreen();
+    }
+}
+
+window.onload = function() {
+    // add eventListener for tizenhwkey
+    document.addEventListener('tizenhwkey', function(e) {
+        if (e.keyName === "back") {
+            try {
+                exitFullscreen();
+            } catch (ignore) {}
+        }
+    });
+};
+
 function Previous() {
     testTarget=document.getElementById("MediaPlayback");
     var fileName = getFileName(testTarget.src);
index ca95f5d52d55ea1f49b71eab095d8ad6217f2d01..179aa628d5644c37762cf13e2b40833cd518cdd1 100755 (executable)
@@ -65,6 +65,7 @@ Authors:
             <div class="fontSize">
                 <p>Test Purpose: </p>
                 <p>Verifies the video playback of 3GP and MP4 files works correctly. And tests the functionality of playback operations including play and pause, volume up and down, time bar sliding forward and backward, full screen and normal screen switching on every video files.</p>
+                <p>Note: Press back key to exit fullscreen</p>
                 <p>Expected Result: </p>
                 <p>Test passes if all the check points work well during the video playback.</p>
             </div>
index 8b31e0fe18b17bc3ab815890c0c4c6e01ad91617..e8782cf05d9fecb28d811fe26267db1d679874c3 100755 (executable)
@@ -50,6 +50,28 @@ $(document).ready(function () {
     DisablePassButton();
 });
 
+function exitFullscreen() {
+    var de = document;
+    if (de.exitFullscreen) {
+        de.exitFullscreen();
+    } else if (de.mozCancelFullScreen) {
+        de.mozCancelFullScreen();
+    } else if (de.webkitCancelFullScreen) {
+        de.webkitCancelFullScreen();
+    }
+}
+
+window.onload = function() {
+    // add eventListener for tizenhwkey
+    document.addEventListener('tizenhwkey', function(e) {
+        if (e.keyName === "back") {
+            try {
+                exitFullscreen();
+            } catch (ignore) {}
+        }
+    });
+};
+
 function Previous() {
     var fileName, i;
     testTarget = document.getElementById("MediaPlayback");