[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 ea2dbe1..a25d6e1 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 03066f7..88f581f 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 a4fd972..a25d6e1 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 03066f7..88f581f 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 ca95f5d..179aa62 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 8b31e0f..e8782cf 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");