Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
tor-browser-bundle-testsuite
Commits
4ad90e46
Unverified
Commit
4ad90e46
authored
Sep 22, 2014
by
boklm
Browse files
play_videos.html: add result to a test_result element
Set "OK" in a test_result element when the test finished.
parent
0291fd39
Changes
1
Hide whitespace changes
Inline
Side-by-side
test-data/play_videos.html
View file @
4ad90e46
...
...
@@ -4,7 +4,6 @@
</head>
<body>
<div
id=
"videos"
/>
<div
id=
"finished"
/>
<script>
const
videos
=
[
...
...
@@ -22,10 +21,14 @@ for (var i = 0; i < videos.length; i++) {
v
.
src
=
videos
[
i
];
v
.
controls
=
1
;
v
.
addEventListener
(
"
ended
"
,
function
()
{
if
(
next
[
this
.
id
])
if
(
next
[
this
.
id
])
{
document
.
getElementById
(
next
[
this
.
id
]).
play
();
else
document
.
getElementById
(
"
finished
"
).
innerHTML
=
'
finished
'
;
}
else
{
var
result
=
document
.
createElement
(
'
div
'
);
result
.
innerHTML
=
'
OK
'
;
result
.
setAttribute
(
"
id
"
,
"
test_result
"
);
document
.
getElementsByTagName
(
"
body
"
)[
0
].
appendChild
(
result
);
}
},
true
);
if
(
i
+
1
<
videos
.
length
)
next
[
v
.
id
]
=
'
videos_
'
+
(
i
+
1
).
toString
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment