{"action":"created","comment":{"url":"https://api.github.com/repos/w3c/web-platform-tests/pulls/comments/61277093","id":61277093,"diff_hunk":"@@ -0,0 +1,58 @@\n+<!DOCTYPE html>\n+<!-- Copyright © 2016 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). -->\n+<html>\n+    <head>\n+        <title>Test that the HTMLMediaElement preload 'none' attribute value is ignored for MediaStream used as srcObject and MediaStream object URLs used as src.</title>>\n+        <link rel=\"author\" title=\"Matthew Wolenetz\" href=\"mailto:wolenetz@chromium.org\"/>\n+        <script src=\"/resources/testharness.js\"></script>\n+        <script src=\"/resources/testharnessreport.js\"></script>\n+        <script src=\"/common/vendor-prefix.js\" data-prefixed-objects='[{\"ancestors\":[\"navigator\"], \"name\":\"getUserMedia\"}, {\"ancestors\":[\"window\"], \"name\":\"MediaStream\"}]'></script>\n+    </head>\n+    <body>\n+        <p class=\"instructions\">When prompted, accept to share your audio and video streams.</p>\n+        <h1 class=\"instructions\">Description</h1>\n+        <p class=\"instructions\">This test checks that the HTMLMediaElement preload 'none' attribute value is ignored for MediaStream used as srcObject and MediaStream object URLs used as src.</p>\n+\n+        <audio preload=\"none\"></audio>\n+        <video preload=\"none\"></video>\n+\n+        <script>\n+            function testPreloadNone(t, mediaElement, setSourceStreamFunc)\n+            {\n+                // The optional deferred load steps (for preload none) for MediaStream resources should be skipped.\n+                mediaElement.addEventListener(\"suspend\", t.unreached_func(\"'suspend' should not occur here.\"));\n+\n+                mediaElement.addEventListener(\"loadeddata\", t.step_func(function()\n+                {\n+                    assert_equals(mediaElement.networkState, mediaElement.NETWORK_LOADING);\n+                    t.done();\n+                }));\n+\n+                setSourceStreamFunc();\n+                assert_equals(mediaElement.networkState, mediaElement.NETWORK_NO_SOURCE); // Resource selection is active.\n+            }\n+\n+            async_test(function(t)\n+            {\n+                var aud = document.querySelector(\"audio\");\n+                navigator.getUserMedia({audio:true}, t.step_func(function(stream)\n+                {\n+                    testPreloadNone(t, aud, t.step_func(function()\n+                    {\n+                        aud.src = URL.createObjectURL(stream);\n+                        t.add_cleanup(function() { URL.revokeObjectURL(aud.src); });\n+                    }));\n+                }), function(error) { t.unreached_func()(); });","path":"mediacapture-streams/MediaStream-MediaElement-preload-none.html","position":45,"original_position":45,"commit_id":"12f032b6165a13505440549be98b87bd3a0384df","original_commit_id":"12f032b6165a13505440549be98b87bd3a0384df","user":{"login":"foolip","id":498917,"avatar_url":"https://avatars.githubusercontent.com/u/498917?v=3","gravatar_id":"","url":"https://api.github.com/users/foolip","html_url":"https://github.com/foolip","followers_url":"https://api.github.com/users/foolip/followers","following_url":"https://api.github.com/users/foolip/following{/other_user}","gists_url":"https://api.github.com/users/foolip/gists{/gist_id}","starred_url":"https://api.github.com/users/foolip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foolip/subscriptions","organizations_url":"https://api.github.com/users/foolip/orgs","repos_url":"https://api.github.com/users/foolip/repos","events_url":"https://api.github.com/users/foolip/events{/privacy}","received_events_url":"https://api.github.com/users/foolip/received_events","type":"User","site_admin":false},"body":"Hmm, this still looks strange. Since you don't use the error at all, does a plain `t.unreached_func(\"getUserMedia error callback was invoked\")` or similar not do the trick?","created_at":"2016-04-27T15:15:02Z","updated_at":"2016-04-27T15:15:02Z","html_url":"https://github.com/w3c/web-platform-tests/pull/2895#discussion_r61277093","pull_request_url":"https://api.github.com/repos/w3c/web-platform-tests/pulls/2895","_links":{"self":{"href":"https://api.github.com/repos/w3c/web-platform-tests/pulls/comments/61277093"},"html":{"href":"https://github.com/w3c/web-platform-tests/pull/2895#discussion_r61277093"},"pull_request":{"href":"https://api.github.com/repos/w3c/web-platform-tests/pulls/2895"}}},"pull_request":{"url":"https://api.github.com/repos/w3c/web-platform-tests/pulls/2895","id":67800227,"html_url":"https://github.com/w3c/web-platform-tests/pull/2895","diff_url":"https://github.com/w3c/web-platform-tests/pull/2895.diff","patch_url":"https://github.com/w3c/web-platform-tests/pull/2895.patch","issue_url":"https://api.github.com/repos/w3c/web-platform-tests/issues/2895","number":2895,"state":"open","locked":false,"title":"Test HTMLMediaElement preload 'none' is ignored for MediaStream as src or srcObject","user":{"login":"wolenetz","id":11578819,"avatar_url":"https://avatars.githubusercontent.com/u/11578819?v=3","gravatar_id":"","url":"https://api.github.com/users/wolenetz","html_url":"https://github.com/wolenetz","followers_url":"https://api.github.com/users/wolenetz/followers","following_url":"https://api.github.com/users/wolenetz/following{/other_user}","gists_url":"https://api.github.com/users/wolenetz/gists{/gist_id}","starred_url":"https://api.github.com/users/wolenetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolenetz/subscriptions","organizations_url":"https://api.github.com/users/wolenetz/orgs","repos_url":"https://api.github.com/users/wolenetz/repos","events_url":"https://api.github.com/users/wolenetz/events{/privacy}","received_events_url":"https://api.github.com/users/wolenetz/received_events","type":"User","site_admin":false},"body":"@foolip This is the MediaStream side of the change mentioned in Chromium https://codereview.chromium.org/1881733004/. I expect to make a similar PR for the media-source (and bogus blob URL) portion of tests contained within that Chromium CL shortly.\r\n\r\nRegarding these MediaStream tests, I confirmed that Chrome ToT fails prior to https://codereview.chromium.org/1881733004/ and passes after. The fails are actually timeouts though (and the console shows 2 exceptions: the unexpected 'suspend' event occurs, and the networkState is IDLE, not LOADING after 1 second. Do you have a better mechansim to suggest other than using setTimeout() to help prevent slow machine flakiness and enable fast test runs? I couldn't think of one immediately that would be interoperable, hence the 1 second setTimeout() used in these new tests.","created_at":"2016-04-25T22:38:47Z","updated_at":"2016-04-27T15:15:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d310784c62947b3734ae0aa8b04493c297cb5257","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/w3c/web-platform-tests/pulls/2895/commits","review_comments_url":"https://api.github.com/repos/w3c/web-platform-tests/pulls/2895/comments","review_comment_url":"https://api.github.com/repos/w3c/web-platform-tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/w3c/web-platform-tests/issues/2895/comments","statuses_url":"https://api.github.com/repos/w3c/web-platform-tests/statuses/12f032b6165a13505440549be98b87bd3a0384df","head":{"label":"wolenetz:add_mediastream_preload_tests","ref":"add_mediastream_preload_tests","sha":"12f032b6165a13505440549be98b87bd3a0384df","user":{"login":"wolenetz","id":11578819,"avatar_url":"https://avatars.githubusercontent.com/u/11578819?v=3","gravatar_id":"","url":"https://api.github.com/users/wolenetz","html_url":"https://github.com/wolenetz","followers_url":"https://api.github.com/users/wolenetz/followers","following_url":"https://api.github.com/users/wolenetz/following{/other_user}","gists_url":"https://api.github.com/users/wolenetz/gists{/gist_id}","starred_url":"https://api.github.com/users/wolenetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolenetz/subscriptions","organizations_url":"https://api.github.com/users/wolenetz/orgs","repos_url":"https://api.github.com/users/wolenetz/repos","events_url":"https://api.github.com/users/wolenetz/events{/privacy}","received_events_url":"https://api.github.com/users/wolenetz/received_events","type":"User","site_admin":false},"repo":{"id":56710605,"name":"web-platform-tests","full_name":"wolenetz/web-platform-tests","owner":{"login":"wolenetz","id":11578819,"avatar_url":"https://avatars.githubusercontent.com/u/11578819?v=3","gravatar_id":"","url":"https://api.github.com/users/wolenetz","html_url":"https://github.com/wolenetz","followers_url":"https://api.github.com/users/wolenetz/followers","following_url":"https://api.github.com/users/wolenetz/following{/other_user}","gists_url":"https://api.github.com/users/wolenetz/gists{/gist_id}","starred_url":"https://api.github.com/users/wolenetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolenetz/subscriptions","organizations_url":"https://api.github.com/users/wolenetz/orgs","repos_url":"https://api.github.com/users/wolenetz/repos","events_url":"https://api.github.com/users/wolenetz/events{/privacy}","received_events_url":"https://api.github.com/users/wolenetz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wolenetz/web-platform-tests","description":"Test Suites for Web Platform specifications—including WHATWG, W3C and others","fork":true,"url":"https://api.github.com/repos/wolenetz/web-platform-tests","forks_url":"https://api.github.com/repos/wolenetz/web-platform-tests/forks","keys_url":"https://api.github.com/repos/wolenetz/web-platform-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolenetz/web-platform-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolenetz/web-platform-tests/teams","hooks_url":"https://api.github.com/repos/wolenetz/web-platform-tests/hooks","issue_events_url":"https://api.github.com/repos/wolenetz/web-platform-tests/issues/events{/number}","events_url":"https://api.github.com/repos/wolenetz/web-platform-tests/events","assignees_url":"https://api.github.com/repos/wolenetz/web-platform-tests/assignees{/user}","branches_url":"https://api.github.com/repos/wolenetz/web-platform-tests/branches{/branch}","tags_url":"https://api.github.com/repos/wolenetz/web-platform-tests/tags","blobs_url":"https://api.github.com/repos/wolenetz/web-platform-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolenetz/web-platform-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolenetz/web-platform-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolenetz/web-platform-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolenetz/web-platform-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/wolenetz/web-platform-tests/languages","stargazers_url":"https://api.github.com/repos/wolenetz/web-platform-tests/stargazers","contributors_url":"https://api.github.com/repos/wolenetz/web-platform-tests/contributors","subscribers_url":"https://api.github.com/repos/wolenetz/web-platform-tests/subscribers","subscription_url":"https://api.github.com/repos/wolenetz/web-platform-tests/subscription","commits_url":"https://api.github.com/repos/wolenetz/web-platform-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolenetz/web-platform-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolenetz/web-platform-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolenetz/web-platform-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolenetz/web-platform-tests/contents/{+path}","compare_url":"https://api.github.com/repos/wolenetz/web-platform-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolenetz/web-platform-tests/merges","archive_url":"https://api.github.com/repos/wolenetz/web-platform-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolenetz/web-platform-tests/downloads","issues_url":"https://api.github.com/repos/wolenetz/web-platform-tests/issues{/number}","pulls_url":"https://api.github.com/repos/wolenetz/web-platform-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/wolenetz/web-platform-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/wolenetz/web-platform-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolenetz/web-platform-tests/labels{/name}","releases_url":"https://api.github.com/repos/wolenetz/web-platform-tests/releases{/id}","deployments_url":"https://api.github.com/repos/wolenetz/web-platform-tests/deployments","created_at":"2016-04-20T18:25:37Z","updated_at":"2016-04-20T18:26:02Z","pushed_at":"2016-04-26T23:39:36Z","git_url":"git://github.com/wolenetz/web-platform-tests.git","ssh_url":"git@github.com:wolenetz/web-platform-tests.git","clone_url":"https://github.com/wolenetz/web-platform-tests.git","svn_url":"https://github.com/wolenetz/web-platform-tests","homepage":"http://irc.w3.org/?channels=testing","size":150292,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"w3c:master","ref":"master","sha":"028d354aba4c8ee6700def957a45f3927241d8b0","user":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"repo":{"id":3618133,"name":"web-platform-tests","full_name":"w3c/web-platform-tests","owner":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/w3c/web-platform-tests","description":"Test Suites for Web Platform specifications—including WHATWG, W3C and others","fork":false,"url":"https://api.github.com/repos/w3c/web-platform-tests","forks_url":"https://api.github.com/repos/w3c/web-platform-tests/forks","keys_url":"https://api.github.com/repos/w3c/web-platform-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/w3c/web-platform-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/w3c/web-platform-tests/teams","hooks_url":"https://api.github.com/repos/w3c/web-platform-tests/hooks","issue_events_url":"https://api.github.com/repos/w3c/web-platform-tests/issues/events{/number}","events_url":"https://api.github.com/repos/w3c/web-platform-tests/events","assignees_url":"https://api.github.com/repos/w3c/web-platform-tests/assignees{/user}","branches_url":"https://api.github.com/repos/w3c/web-platform-tests/branches{/branch}","tags_url":"https://api.github.com/repos/w3c/web-platform-tests/tags","blobs_url":"https://api.github.com/repos/w3c/web-platform-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/w3c/web-platform-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/w3c/web-platform-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/w3c/web-platform-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/w3c/web-platform-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/w3c/web-platform-tests/languages","stargazers_url":"https://api.github.com/repos/w3c/web-platform-tests/stargazers","contributors_url":"https://api.github.com/repos/w3c/web-platform-tests/contributors","subscribers_url":"https://api.github.com/repos/w3c/web-platform-tests/subscribers","subscription_url":"https://api.github.com/repos/w3c/web-platform-tests/subscription","commits_url":"https://api.github.com/repos/w3c/web-platform-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/w3c/web-platform-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/w3c/web-platform-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/w3c/web-platform-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/w3c/web-platform-tests/contents/{+path}","compare_url":"https://api.github.com/repos/w3c/web-platform-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/w3c/web-platform-tests/merges","archive_url":"https://api.github.com/repos/w3c/web-platform-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/w3c/web-platform-tests/downloads","issues_url":"https://api.github.com/repos/w3c/web-platform-tests/issues{/number}","pulls_url":"https://api.github.com/repos/w3c/web-platform-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/w3c/web-platform-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/w3c/web-platform-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/w3c/web-platform-tests/labels{/name}","releases_url":"https://api.github.com/repos/w3c/web-platform-tests/releases{/id}","deployments_url":"https://api.github.com/repos/w3c/web-platform-tests/deployments","created_at":"2012-03-04T12:58:11Z","updated_at":"2016-04-25T13:39:27Z","pushed_at":"2016-04-27T15:03:22Z","git_url":"git://github.com/w3c/web-platform-tests.git","ssh_url":"git@github.com:w3c/web-platform-tests.git","clone_url":"https://github.com/w3c/web-platform-tests.git","svn_url":"https://github.com/w3c/web-platform-tests","homepage":"http://irc.w3.org/?channels=testing","size":312445,"stargazers_count":743,"watchers_count":743,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":844,"mirror_url":null,"open_issues_count":310,"forks":844,"open_issues":310,"watchers":743,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/w3c/web-platform-tests/pulls/2895"},"html":{"href":"https://github.com/w3c/web-platform-tests/pull/2895"},"issue":{"href":"https://api.github.com/repos/w3c/web-platform-tests/issues/2895"},"comments":{"href":"https://api.github.com/repos/w3c/web-platform-tests/issues/2895/comments"},"review_comments":{"href":"https://api.github.com/repos/w3c/web-platform-tests/pulls/2895/comments"},"review_comment":{"href":"https://api.github.com/repos/w3c/web-platform-tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/w3c/web-platform-tests/pulls/2895/commits"},"statuses":{"href":"https://api.github.com/repos/w3c/web-platform-tests/statuses/12f032b6165a13505440549be98b87bd3a0384df"}}}}