{"action":"created","issue":{"url":"https://api.github.com/repos/servo/servo/issues/11476","repository_url":"https://api.github.com/repos/servo/servo","labels_url":"https://api.github.com/repos/servo/servo/issues/11476/labels{/name}","comments_url":"https://api.github.com/repos/servo/servo/issues/11476/comments","events_url":"https://api.github.com/repos/servo/servo/issues/11476/events","html_url":"https://github.com/servo/servo/pull/11476","id":157293687,"number":11476,"title":"Added wpt tests for same-origin iframe parentage.","user":{"login":"asajeffrey","id":403333,"avatar_url":"https://avatars.githubusercontent.com/u/403333?v=3","gravatar_id":"","url":"https://api.github.com/users/asajeffrey","html_url":"https://github.com/asajeffrey","followers_url":"https://api.github.com/users/asajeffrey/followers","following_url":"https://api.github.com/users/asajeffrey/following{/other_user}","gists_url":"https://api.github.com/users/asajeffrey/gists{/gist_id}","starred_url":"https://api.github.com/users/asajeffrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asajeffrey/subscriptions","organizations_url":"https://api.github.com/users/asajeffrey/orgs","repos_url":"https://api.github.com/users/asajeffrey/repos","events_url":"https://api.github.com/users/asajeffrey/events{/privacy}","received_events_url":"https://api.github.com/users/asajeffrey/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/servo/servo/labels/S-needs-code-changes","name":"S-needs-code-changes","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"jdm","id":27658,"avatar_url":"https://avatars.githubusercontent.com/u/27658?v=3","gravatar_id":"","url":"https://api.github.com/users/jdm","html_url":"https://github.com/jdm","followers_url":"https://api.github.com/users/jdm/followers","following_url":"https://api.github.com/users/jdm/following{/other_user}","gists_url":"https://api.github.com/users/jdm/gists{/gist_id}","starred_url":"https://api.github.com/users/jdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdm/subscriptions","organizations_url":"https://api.github.com/users/jdm/orgs","repos_url":"https://api.github.com/users/jdm/repos","events_url":"https://api.github.com/users/jdm/events{/privacy}","received_events_url":"https://api.github.com/users/jdm/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-05-27T21:27:39Z","updated_at":"2016-05-30T19:06:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/11476","html_url":"https://github.com/servo/servo/pull/11476","diff_url":"https://github.com/servo/servo/pull/11476.diff","patch_url":"https://github.com/servo/servo/pull/11476.patch"},"body":"<!-- Please describe your changes on the following line: -->\r\nAdded some wpt tests to make sure same-origin iframes have the right parentage.\r\n\r\n---\r\n<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->\r\n- [X] `./mach build -d` does not report any errors\r\n- [X] `./mach test-tidy` does not report any errors\r\n- [X] There are tests for these changes OR\r\n\r\n<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/servo/servo/11476)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/servo/servo/issues/comments/222542141","html_url":"https://github.com/servo/servo/pull/11476#issuecomment-222542141","issue_url":"https://api.github.com/repos/servo/servo/issues/11476","id":222542141,"user":{"login":"jdm","id":27658,"avatar_url":"https://avatars.githubusercontent.com/u/27658?v=3","gravatar_id":"","url":"https://api.github.com/users/jdm","html_url":"https://github.com/jdm","followers_url":"https://api.github.com/users/jdm/followers","following_url":"https://api.github.com/users/jdm/following{/other_user}","gists_url":"https://api.github.com/users/jdm/gists{/gist_id}","starred_url":"https://api.github.com/users/jdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdm/subscriptions","organizations_url":"https://api.github.com/users/jdm/orgs","repos_url":"https://api.github.com/users/jdm/repos","events_url":"https://api.github.com/users/jdm/events{/privacy}","received_events_url":"https://api.github.com/users/jdm/received_events","type":"User","site_admin":false},"created_at":"2016-05-30T19:06:39Z","updated_at":"2016-05-30T19:06:39Z","body":"-S-awaiting-review +S-needs-code-changes \n\n<details><summary><i>Previously, asajeffrey (Alan Jeffrey) wrote…</i></summary>\n> r? @jdm \n</details>\n\n\n---\n\nReviewed 6 of 6 files at r1, 1 of 1 files at r2.\nReview status: all files reviewed at latest revision, 11 unresolved discussions, some commit checks failed.\n\n---\n\n*[tests/wpt/mozilla/tests/mozilla/iframe/iframe_harness.js, line 3 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/11476#-KJ204H6stptV0ocSfLn:-KJ204H6stptV0ocSfLo:2108702656) ([raw file](https://github.com/servo/servo/blob/49b0d6d25c85300f1163fa4558caeedef6f1c65d/tests/wpt/mozilla/tests/mozilla/iframe/iframe_harness.js#L3)):*\n> ```JavaScript\n> function get_test_results(id) {\n>     async_test(function(test) {\n>         var timer = window.setInterval(loop, 100);\n> ```\n\n`setInterval(test.step_func(loop), 100)`\n\n---\n\n*[tests/wpt/mozilla/tests/mozilla/iframe/iframe_harness.js, line 6 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/11476#-KJ22-Wx2XoCU4QF-XGH:-KJ22-Wx2XoCU4QF-XGI:-1069257620) ([raw file](https://github.com/servo/servo/blob/49b0d6d25c85300f1163fa4558caeedef6f1c65d/tests/wpt/mozilla/tests/mozilla/iframe/iframe_harness.js#L6)):*\n> ```JavaScript\n> \tfunction loop() {\n> \t    var xhr = new XMLHttpRequest();\n> \t    xhr.open('GET', '/_mozilla/mozilla/iframe/stash.py?id=' + id);\n> ```\n\nI this this can be 'stash.py' without any path.\n\n---\n\n*[tests/wpt/mozilla/tests/mozilla/iframe/iframe_harness.js, line 16 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/11476#-KJ2-adMG3hoSc6QTY9Y:-KJ2-adNxN787pSEgsC0:2022793018) ([raw file](https://github.com/servo/servo/blob/49b0d6d25c85300f1163fa4558caeedef6f1c65d/tests/wpt/mozilla/tests/mozilla/iframe/iframe_harness.js#L16)):*\n> ```JavaScript\n> \t    });\n> \t    xhr.send();\n> \t}\n> ```\n\nnit: remove the tabs in this file.\n\n---\n\n*[tests/wpt/mozilla/tests/mozilla/iframe/iframe_harness.js, line 24 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/11476#-KJ2-mqAPQHriL1iYjTl:-KJ2-mqAPQHriL1iYjTm:-344687178) ([raw file](https://github.com/servo/servo/blob/49b0d6d25c85300f1163fa4558caeedef6f1c65d/tests/wpt/mozilla/tests/mozilla/iframe/iframe_harness.js#L24)):*\n> ```JavaScript\n>     for (result in results) { ok = ok && results[result]; }\n>     var xhr = new XMLHttpRequest();\n>     xhr.open('POST', '/_mozilla/mozilla/iframe/stash.py?id=' + results.id);\n> ```\n\nWe should be able to use 'stash.py' without any explicit path.\n\n---\n\n*[tests/wpt/mozilla/tests/mozilla/iframe/iframe_harness.js, line 24 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/11476#-KJ20r1yR_cLFkOlV5e4:-KJ20r1yR_cLFkOlV5e5:-1376884966) ([raw file](https://github.com/servo/servo/blob/49b0d6d25c85300f1163fa4558caeedef6f1c65d/tests/wpt/mozilla/tests/mozilla/iframe/iframe_harness.js#L24)):*\n> ```JavaScript\n>     for (result in results) { ok = ok && results[result]; }\n>     var xhr = new XMLHttpRequest();\n>     xhr.open('POST', '/_mozilla/mozilla/iframe/stash.py?id=' + results.id);\n> ```\n\nIf we make this a synchronous XHR we don't need the looping timer.\n\n---\n\n*[tests/wpt/mozilla/tests/mozilla/iframe/iframe_harness.js, line 25 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/11476#-KJ2-jF-WshZZbNn0QBc:-KJ2-jF-WshZZbNn0QBd:-2076570491) ([raw file](https://github.com/servo/servo/blob/49b0d6d25c85300f1163fa4558caeedef6f1c65d/tests/wpt/mozilla/tests/mozilla/iframe/iframe_harness.js#L25)):*\n> ```JavaScript\n>     var xhr = new XMLHttpRequest();\n>     xhr.open('POST', '/_mozilla/mozilla/iframe/stash.py?id=' + results.id);\n>     xhr.send(ok? \"OK\": \"FAIL: \" + JSON.stringify(results));;\n> ```\n\nnit: remove the extra ; and add a space before ?\n\n---\n\n*[tests/wpt/mozilla/tests/mozilla/iframe/same_origin_child.html, line 9 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/11476#-KJ20gq86gc8rVrhVEu0:-KJ20gq86gc8rVrhVEu1:569378138) ([raw file](https://github.com/servo/servo/blob/49b0d6d25c85300f1163fa4558caeedef6f1c65d/tests/wpt/mozilla/tests/mozilla/iframe/same_origin_child.html#L9)):*\n> ```HTML\n>         \"id\": '08782f28-e313-47ae-8cd7-419f3e194b0a',\n> \t\"parent\": window.parent != window,\n> \t\"grandparent\": window.parent.parent == window.parent,\n> ```\n\nShould these be ===?\n\n---\n\n*[tests/wpt/mozilla/tests/mozilla/iframe/same_origin_child.html, line 10 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/11476#-KJ20NwPXTM4WjbX20pk:-KJ20NwPXTM4WjbX20pl:2042555288) ([raw file](https://github.com/servo/servo/blob/49b0d6d25c85300f1163fa4558caeedef6f1c65d/tests/wpt/mozilla/tests/mozilla/iframe/same_origin_child.html#L10)):*\n> ```HTML\n> \t\"parent\": window.parent != window,\n> \t\"grandparent\": window.parent.parent == window.parent,\n> \t\"top\": window.top == window.parent,\n> ```\n\nnit: tabs\n\n---\n\n*[tests/wpt/mozilla/tests/mozilla/iframe/same_origin_grandchild.html, line 9 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/11476#-KJ20laE__y9fXyleUiE:-KJ20laE__y9fXyleUiF:2042555288) ([raw file](https://github.com/servo/servo/blob/49b0d6d25c85300f1163fa4558caeedef6f1c65d/tests/wpt/mozilla/tests/mozilla/iframe/same_origin_grandchild.html#L9)):*\n> ```HTML\n> \t\"parent\": window.parent != window,\n> \t\"grandparent\": window.parent.parent != window.parent,\n> \t\"top\": window.top == window.parent.parent,\n> ```\n\nnit: tabs\n\n---\n\n*[tests/wpt/mozilla/tests/mozilla/iframe/same_origin_parentage.html, line 13 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/11476#-KJ22ifbeTH6kwV3nWxp:-KJ22ifbeTH6kwV3nWxq:1911632413) ([raw file](https://github.com/servo/servo/blob/49b0d6d25c85300f1163fa4558caeedef6f1c65d/tests/wpt/mozilla/tests/mozilla/iframe/same_origin_parentage.html#L13)):*\n> ```HTML\n>     get_test_results('17381dae-9c3e-4661-9f2b-28eb07a5f2fc');\n>     get_test_results('08782f28-e313-47ae-8cd7-419f3e194b0a');\n>     get_test_results('66de8d44-7da7-47c7-9a52-41cba4f22bfe');\n> ```\n\nThese should be in an onload handler for the iframe.\n\n---\n\n*[tests/wpt/mozilla/tests/mozilla/iframe/same_origin_parentage.html, line 17 \\[r1\\]](https://reviewable.io:443/reviews/servo/servo/11476#-KJ20ZRDIdOTUmynNEN6:-KJ20ZREtT84H9tHXahT:2042555288) ([raw file](https://github.com/servo/servo/blob/49b0d6d25c85300f1163fa4558caeedef6f1c65d/tests/wpt/mozilla/tests/mozilla/iframe/same_origin_parentage.html#L17)):*\n> ```HTML\n>         \"id\": '17381dae-9c3e-4661-9f2b-28eb07a5f2fc',\n> \t\"parent\": window.parent == window,\n> \t\"top\": window.top == window,\n> ```\n\nnit: tabs\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/servo/servo/11476#-:-KJ22pUhQo-Bk-HuoPP3:1458266033)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"jdm"}}