Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>No_Controls_Video_Test_Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<p id="testContent">Page content: video player</p>
<body style="margin:0;display:flex;align-items:center;justify-content:center;height:100vh">
<video title="test_link_video" width="320" height="240">
<source src="../resources/mov_bbb.mp4" type="video/mp4">
Your browser does not support HTML video.
</video>

</body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class MediaPlaybackTest {

navigationToolbar {}
.enterUrlAndEnterToBrowser(noControlsVideoTestPage.url) {
longClickMatchingText("test_link_video")
longClickVideoWithNoControls()
verifyNoControlsVideoContextMenuItems()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ class BrowserRobot {
link.click(LONG_CLICK_DURATION)
}

fun longClickVideoWithNoControls() {
mDevice.waitForWindowUpdate(packageName, waitingTime)
mDevice.findObject(UiSelector().resourceId("$packageName:id/engineView")).waitForExists(waitingTime)
mDevice.waitForIdle()
val engineView = mDevice.findObject(By.res("$packageName:id/engineView"))
engineView.click(engineView.visibleCenter, LONG_CLICK_DURATION)
}

fun longClickAndCopyText(
expectedText: String,
selectAll: Boolean = false,
Expand Down