{"action":"created","comment":{"url":"https://api.github.com/repos/w3c/web-platform-tests/pulls/comments/30786800","id":30786800,"diff_hunk":"@@ -0,0 +1,144 @@\n+var ReferrerPolicyTestCase = function(scenario, testDescription) {\n+  // Check if scenario is valid.\n+  test(function() {\n+    // We extend the exsiting test_expansion_schema not to kill performance by\n+    // copying.\n+    var expectedFields = SPEC_JSON[\"test_expansion_schema\"];\n+    expectedFields[\"referrer_policy\"] = SPEC_JSON[\"referrer_policy_schema\"];\n+\n+    for (var field in expectedFields) {\n+      assert_own_property(scenario, field,\n+                          \"The scenario contains field \" + field)\n+      assert_in_array(scenario[field], expectedFields[field],\n+                      \"Scenario's \" + field + \" is one of: \" +\n+                      expectedFields[field].join(\", \")) + \".\"\n+    }\n+\n+    // Check if the protocol is matched.\n+    assert_equals(scenario[\"source_protocol\"] + \":\", location.protocol,\n+                  \"Protocol of the test page should match the scenario.\")\n+\n+  }, \"[ReferrerPolicyTestCase] The test scenario is valid.\");\n+\n+  var subresourceInvoker = {\n+    \"a-tag\": queryLink,\n+    \"area-tag\": queryAreaLink,\n+    \"fetch-request\": queryFetch,\n+    \"iframe-tag\": queryIframe,\n+    \"img-tag\":  queryImage,\n+    \"script-tag\": queryScript,\n+    \"worker-request\": queryWorker,\n+    \"xhr-request\": queryXhr\n+  };\n+\n+  var pathForSubresource = SPEC_JSON[\"subresource_path\"];\n+\n+  var referrerUrlResolver = {\n+    \"omitted\": function() {\n+      return undefined;\n+    },\n+    \"origin\": function() {\n+      return location.protocol + \"//\" + location.hostname +\n+             normalizePort(location.port) + \"/\";","path":"referrer-policy/generic/referrer-policy-test-case.js","position":42,"original_position":42,"commit_id":"f0a1a282529314c2511809919c0aca98b6f3da80","original_commit_id":"f0a1a282529314c2511809919c0aca98b6f3da80","user":{"login":"kristijanburnik","id":7973657,"avatar_url":"https://avatars.githubusercontent.com/u/7973657?v=3","gravatar_id":"","url":"https://api.github.com/users/kristijanburnik","html_url":"https://github.com/kristijanburnik","followers_url":"https://api.github.com/users/kristijanburnik/followers","following_url":"https://api.github.com/users/kristijanburnik/following{/other_user}","gists_url":"https://api.github.com/users/kristijanburnik/gists{/gist_id}","starred_url":"https://api.github.com/users/kristijanburnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristijanburnik/subscriptions","organizations_url":"https://api.github.com/users/kristijanburnik/orgs","repos_url":"https://api.github.com/users/kristijanburnik/repos","events_url":"https://api.github.com/users/kristijanburnik/events{/privacy}","received_events_url":"https://api.github.com/users/kristijanburnik/received_events","type":"User","site_admin":false},"body":"Ok. I've also added a comment on this topic.","created_at":"2015-05-21T09:40:34Z","updated_at":"2015-05-21T09:40:34Z","html_url":"https://github.com/w3c/web-platform-tests/pull/1814#discussion_r30786800","pull_request_url":"https://api.github.com/repos/w3c/web-platform-tests/pulls/1814","_links":{"self":{"href":"https://api.github.com/repos/w3c/web-platform-tests/pulls/comments/30786800"},"html":{"href":"https://github.com/w3c/web-platform-tests/pull/1814#discussion_r30786800"},"pull_request":{"href":"https://api.github.com/repos/w3c/web-platform-tests/pulls/1814"}}},"pull_request":{"url":"https://api.github.com/repos/w3c/web-platform-tests/pulls/1814","id":35028863,"html_url":"https://github.com/w3c/web-platform-tests/pull/1814","diff_url":"https://github.com/w3c/web-platform-tests/pull/1814.diff","patch_url":"https://github.com/w3c/web-platform-tests/pull/1814.patch","issue_url":"https://api.github.com/repos/w3c/web-platform-tests/issues/1814","number":1814,"state":"open","locked":false,"title":"Referrer policy test case","user":{"login":"kristijanburnik","id":7973657,"avatar_url":"https://avatars.githubusercontent.com/u/7973657?v=3","gravatar_id":"","url":"https://api.github.com/users/kristijanburnik","html_url":"https://github.com/kristijanburnik","followers_url":"https://api.github.com/users/kristijanburnik/followers","following_url":"https://api.github.com/users/kristijanburnik/following{/other_user}","gists_url":"https://api.github.com/users/kristijanburnik/gists{/gist_id}","starred_url":"https://api.github.com/users/kristijanburnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristijanburnik/subscriptions","organizations_url":"https://api.github.com/users/kristijanburnik/orgs","repos_url":"https://api.github.com/users/kristijanburnik/repos","events_url":"https://api.github.com/users/kristijanburnik/events{/privacy}","received_events_url":"https://api.github.com/users/kristijanburnik/received_events","type":"User","site_admin":false},"body":"Substantial refactoring of the test suite:\r\n\r\n* A new simple API for generating and writing tests.\r\n\r\n* Added initial test for no-refererrer - for now just basic assertions.\r\n\r\n@mikewest, @jeisinger ","created_at":"2015-05-08T17:27:15Z","updated_at":"2015-05-21T09:40:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b07ea26b96ddbd0d7510dd3694edfb544d848203","assignee":{"login":"mikewest","id":1497,"avatar_url":"https://avatars.githubusercontent.com/u/1497?v=3","gravatar_id":"","url":"https://api.github.com/users/mikewest","html_url":"https://github.com/mikewest","followers_url":"https://api.github.com/users/mikewest/followers","following_url":"https://api.github.com/users/mikewest/following{/other_user}","gists_url":"https://api.github.com/users/mikewest/gists{/gist_id}","starred_url":"https://api.github.com/users/mikewest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikewest/subscriptions","organizations_url":"https://api.github.com/users/mikewest/orgs","repos_url":"https://api.github.com/users/mikewest/repos","events_url":"https://api.github.com/users/mikewest/events{/privacy}","received_events_url":"https://api.github.com/users/mikewest/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/w3c/web-platform-tests/pulls/1814/commits","review_comments_url":"https://api.github.com/repos/w3c/web-platform-tests/pulls/1814/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/1814/comments","statuses_url":"https://api.github.com/repos/w3c/web-platform-tests/statuses/f0a1a282529314c2511809919c0aca98b6f3da80","head":{"label":"kristijanburnik:referrer-policy-test-case","ref":"referrer-policy-test-case","sha":"f0a1a282529314c2511809919c0aca98b6f3da80","user":{"login":"kristijanburnik","id":7973657,"avatar_url":"https://avatars.githubusercontent.com/u/7973657?v=3","gravatar_id":"","url":"https://api.github.com/users/kristijanburnik","html_url":"https://github.com/kristijanburnik","followers_url":"https://api.github.com/users/kristijanburnik/followers","following_url":"https://api.github.com/users/kristijanburnik/following{/other_user}","gists_url":"https://api.github.com/users/kristijanburnik/gists{/gist_id}","starred_url":"https://api.github.com/users/kristijanburnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristijanburnik/subscriptions","organizations_url":"https://api.github.com/users/kristijanburnik/orgs","repos_url":"https://api.github.com/users/kristijanburnik/repos","events_url":"https://api.github.com/users/kristijanburnik/events{/privacy}","received_events_url":"https://api.github.com/users/kristijanburnik/received_events","type":"User","site_admin":false},"repo":{"id":35047443,"name":"web-platform-tests","full_name":"kristijanburnik/web-platform-tests","owner":{"login":"kristijanburnik","id":7973657,"avatar_url":"https://avatars.githubusercontent.com/u/7973657?v=3","gravatar_id":"","url":"https://api.github.com/users/kristijanburnik","html_url":"https://github.com/kristijanburnik","followers_url":"https://api.github.com/users/kristijanburnik/followers","following_url":"https://api.github.com/users/kristijanburnik/following{/other_user}","gists_url":"https://api.github.com/users/kristijanburnik/gists{/gist_id}","starred_url":"https://api.github.com/users/kristijanburnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristijanburnik/subscriptions","organizations_url":"https://api.github.com/users/kristijanburnik/orgs","repos_url":"https://api.github.com/users/kristijanburnik/repos","events_url":"https://api.github.com/users/kristijanburnik/events{/privacy}","received_events_url":"https://api.github.com/users/kristijanburnik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kristijanburnik/web-platform-tests","description":"Test Suites for Web Platform specifications","fork":true,"url":"https://api.github.com/repos/kristijanburnik/web-platform-tests","forks_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/forks","keys_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/teams","hooks_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/hooks","issue_events_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/issues/events{/number}","events_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/events","assignees_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/assignees{/user}","branches_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/branches{/branch}","tags_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/tags","blobs_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/languages","stargazers_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/stargazers","contributors_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/contributors","subscribers_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/subscribers","subscription_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/subscription","commits_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/contents/{+path}","compare_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/merges","archive_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/downloads","issues_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/issues{/number}","pulls_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/labels{/name}","releases_url":"https://api.github.com/repos/kristijanburnik/web-platform-tests/releases{/id}","created_at":"2015-05-04T16:59:15Z","updated_at":"2015-05-04T16:59:28Z","pushed_at":"2015-05-20T21:57:49Z","git_url":"git://github.com/kristijanburnik/web-platform-tests.git","ssh_url":"git@github.com:kristijanburnik/web-platform-tests.git","clone_url":"https://github.com/kristijanburnik/web-platform-tests.git","svn_url":"https://github.com/kristijanburnik/web-platform-tests","homepage":"http://irc.w3.org/?channels=testing","size":57666,"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":"9066ae442b108f90ff54d1594ef326e9747a0327","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","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}","created_at":"2012-03-04T12:58:11Z","updated_at":"2015-05-20T14:49:49Z","pushed_at":"2015-05-20T21:57:49Z","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":300959,"stargazers_count":567,"watchers_count":567,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":678,"mirror_url":null,"open_issues_count":204,"forks":678,"open_issues":204,"watchers":567,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/w3c/web-platform-tests/pulls/1814"},"html":{"href":"https://github.com/w3c/web-platform-tests/pull/1814"},"issue":{"href":"https://api.github.com/repos/w3c/web-platform-tests/issues/1814"},"comments":{"href":"https://api.github.com/repos/w3c/web-platform-tests/issues/1814/comments"},"review_comments":{"href":"https://api.github.com/repos/w3c/web-platform-tests/pulls/1814/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/1814/commits"},"statuses":{"href":"https://api.github.com/repos/w3c/web-platform-tests/statuses/f0a1a282529314c2511809919c0aca98b6f3da80"}}}}