-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test navigator.getUserMedia success callback is triggered when user allo... #160
Closed
kylebarrow
wants to merge
7
commits into
web-platform-tests:master
from
kylebarrow:submissions/kylebarrow
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
636589b
Test navigator.getUserMedia success callback is triggered when user a…
kylebarrow 3ca6219
Removed navigator.getUserMedia polyfill
kylebarrow f9e6732
Moved out of submissions folder
kylebarrow ff07e09
Tests MediaStream.currentTime
kylebarrow 64c2faa
Better read-only test
kylebarrow 131a53a
Removed polyfil
kylebarrow b9fb104
Removed comment
kylebarrow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
mediacapture-streams/obtaining-local-multimedia-content/navigatorusermedia/allow.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>getUserMedia: test the success callback is triggered when user allows access to video stream</title> | ||
<link rel="author" title="Kyle Barrow" href="mailto:[email protected]"> | ||
<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html"> | ||
<meta name="assert" content="the success callback is triggered when user allows access to video stream"> | ||
|
||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<link rel="stylesheet" href="/resources/testharness.css"> | ||
|
||
</head> | ||
<body> | ||
<p>When prompted, <strong>please allow</strong> access to the video stream.</p> | ||
|
||
<div id="log"></div> | ||
<script> | ||
|
||
var t = async_test("Test the success callback is triggered when user allows access to video stream", {timeout:10000}); | ||
|
||
t.step(function() { | ||
navigator.getUserMedia( | ||
{video: true}, | ||
t.step_func(function() { | ||
assert_true(true); | ||
t.done(); | ||
}), | ||
t.step_func(function() { | ||
assert_unreached("The error callback should not have been triggered since access is to be allowed"); | ||
t.done(); | ||
}) | ||
); | ||
}); | ||
|
||
|
||
|
||
</script> | ||
</body> | ||
</html> |
48 changes: 48 additions & 0 deletions
48
mediacapture-streams/stream-api/mediastream/mediastream-currenttime.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>MediaStream: test MediaStream.currentTime</title> | ||
<link rel="author" title="Kyle Barrow" href="mailto:[email protected]"> | ||
<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html"> | ||
<meta name="assert" content="the current time of the media stream"> | ||
|
||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<link rel="stylesheet" href="/resources/testharness.css"> | ||
|
||
<style> | ||
|
||
video { | ||
width: 50%; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<p>When prompted, <strong>please allow</strong> access to the video stream.</p> | ||
<div id="log"></div> | ||
<script> | ||
|
||
var t = async_test("Test MediaStream.currentTime", {timeout:10000}); | ||
|
||
t.step(function() { | ||
navigator.getUserMedia( | ||
{video: true}, | ||
t.step_func(function(stream) { | ||
assert_true(stream.currentTime >= 0, "Test MediaStream.currentTime is an interger >= 0") | ||
stream.currentTime = 1000 | ||
assert_true(stream.currentTime < 1000, "Test MediaStream.currentTime is read only") | ||
t.done(); | ||
}), | ||
t.step_func(function() { | ||
assert_unreached("The error callback should not have been triggered as user should allow access"); | ||
t.done(); | ||
}) | ||
); | ||
}); | ||
|
||
|
||
|
||
</script> | ||
</body> | ||
</html> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currentTime is a property of the video element in which a stream can be plugged, not the stream itself, so that test doesn't seem valid