Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html

Issue 1284193003: Removal of getUserMedia() on insecure origins (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Dedupped secure scheme registry. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html
diff --git a/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html b/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html
index e484c5a5f77f6a5927ae447d478d85e27a7d11d1..b576eb641e26e82facc85f9026b1cc7bb7a61bb3 100644
--- a/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html
+++ b/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html
@@ -27,6 +27,8 @@ if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) {
mockLongitude,
mockAccuracy);
+ // Tests for APIs that are deprecated, but still allowed, on
+ // insecure origins
async_test(function() {
navigator.geolocation.getCurrentPosition(
this.step_func(function() {
@@ -70,17 +72,6 @@ if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) {
}, 'fullscreen');
async_test(function() {
- navigator.webkitGetUserMedia({ audio: true, video: true },
- this.step_func(function() {
- this.done();
- }),
- this.step_func(function() {
- assert_unreached('getUserMedia should succeed, but failed.');
- this.done();
- }));
- }, 'getUserMedia');
-
- async_test(function() {
testRunner.setMockDeviceMotion(true, 0, true, 0, true, 0,
true, 0, true, 0, true, 0,
true, 0, true, 0, true, 0,
@@ -102,6 +93,13 @@ if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) {
promise_test(function(test) {
return navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}]);
}, 'requestMediaKeySystemAccess');
+
+ // Tests for APIs that have been turned off on insecure origins
+ async_test(function() {
+ navigator.webkitGetUserMedia({ audio: true, video: true },
+ this.unreached_func('getUserMedia should call the error callback, but called the success callback instead.'),
+ this.step_func_done());
+ }, 'getUserMedia');
}
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698