{"action":"created","comment":{"url":"https://api.github.com/repos/servo/servo/pulls/comments/184216288","pull_request_review_id":115367284,"id":184216288,"diff_hunk":"@@ -0,0 +1,126 @@\n+# Copyright 2018 The Servo Project Developers. See the COPYRIGHT\n+# file at the top-level directory of this distribution.\n+#\n+# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n+# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license\n+# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your\n+# option. This file may not be copied, modified, or distributed\n+# except according to those terms.\n+\n+\"\"\"\n+Created on Mon Mar 26 20:08:25 2018\n+@author: Pranshu Sinha, Abhay Soni, Aayushi Agrawal\n+\"\"\"\n+\n+\"\"\"\n+The below program is intended to test rendering mismatches in servo by taking screenshots of rendered html files.\n+Here is the breakdown of how our code works:\n+*   A session is started on localhost:7002\n+*   The randomly generated webpage's (html files) data is sent as JSON to this session\n+*   Using curl request, we load the html files for this session ID based on the session we just created.\n+\"\"\"\n+import os\n+import json\n+import requests\n+import start_servo\n+import time\n+import base64\n+import sys\n+import getopt\n+\n+\n+def servo_ready_to_accept(url, payload, headers):\n+    while(True):\n+\n+        try:\n+            # Before sending an additional request, we wait for one second each time\n+            time.sleep(1)\n+            session_request = requests.post(url, data=payload, headers=headers)\n+            json_string = session_request.json()\n+            # On success, we move on to render the files\n+            break\n+        except Exception as e:\n+            time.sleep(5)\n+            print('Exception: ', e)\n+    return json_string\n+\n+\n+def ensure_screenshots_directory_exists():\n+    if not os.path.exists('screenshots'):\n+        os.makedirs('screenshots')\n+\n+\n+def render_html_files(num_of_files, url, file_url, json_string, headers, cwd):\n+    for x in range(num_of_files):\n+\n+        json_data = {}\n+        json_data['url'] = 'file://{0}file{1}.html'.format(file_url, str(x))\n+        print(json_data['url'])\n+        json_data = json.dumps(json_data)\n+        requests.post('{0}/{1}/url'.format(url, json_string['value']['sessionId']), data=json_data, headers=headers)","path":"etc/servo_automation_screenshot.py","position":60,"original_position":60,"commit_id":"9e6e51d66189f2f0f61c443bf1167a0384b758ce","original_commit_id":"9e6e51d66189f2f0f61c443bf1167a0384b758ce","user":{"login":"Manishearth","id":1617736,"avatar_url":"https://avatars2.githubusercontent.com/u/1617736?v=4","gravatar_id":"","url":"https://api.github.com/users/Manishearth","html_url":"https://github.com/Manishearth","followers_url":"https://api.github.com/users/Manishearth/followers","following_url":"https://api.github.com/users/Manishearth/following{/other_user}","gists_url":"https://api.github.com/users/Manishearth/gists{/gist_id}","starred_url":"https://api.github.com/users/Manishearth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manishearth/subscriptions","organizations_url":"https://api.github.com/users/Manishearth/orgs","repos_url":"https://api.github.com/users/Manishearth/repos","events_url":"https://api.github.com/users/Manishearth/events{/privacy}","received_events_url":"https://api.github.com/users/Manishearth/received_events","type":"User","site_admin":false},"body":"Leave some comments with links to webdriver docs about these endpoints and what's going on","created_at":"2018-04-25T21:49:14Z","updated_at":"2018-04-25T21:49:29Z","html_url":"https://github.com/servo/servo/pull/20448#discussion_r184216288","pull_request_url":"https://api.github.com/repos/servo/servo/pulls/20448","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/comments/184216288"},"html":{"href":"https://github.com/servo/servo/pull/20448#discussion_r184216288"},"pull_request":{"href":"https://api.github.com/repos/servo/servo/pulls/20448"}}},"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/20448","id":177624923,"html_url":"https://github.com/servo/servo/pull/20448","diff_url":"https://github.com/servo/servo/pull/20448.diff","patch_url":"https://github.com/servo/servo/pull/20448.patch","issue_url":"https://api.github.com/repos/servo/servo/issues/20448","number":20448,"state":"open","locked":false,"title":"NCSU Project - Random web content generator","user":{"login":"asoni3","id":31193162,"avatar_url":"https://avatars3.githubusercontent.com/u/31193162?v=4","gravatar_id":"","url":"https://api.github.com/users/asoni3","html_url":"https://github.com/asoni3","followers_url":"https://api.github.com/users/asoni3/followers","following_url":"https://api.github.com/users/asoni3/following{/other_user}","gists_url":"https://api.github.com/users/asoni3/gists{/gist_id}","starred_url":"https://api.github.com/users/asoni3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asoni3/subscriptions","organizations_url":"https://api.github.com/users/asoni3/orgs","repos_url":"https://api.github.com/users/asoni3/repos","events_url":"https://api.github.com/users/asoni3/events{/privacy}","received_events_url":"https://api.github.com/users/asoni3/received_events","type":"User","site_admin":false},"body":"<!-- Please describe your changes on the following line: -->\r\nHere is the link to our repository which contains the web-page fuzzer: [Link](https://github.com/asoni3/Random-web-content-generator---CSC-517-OSS-Project)\r\n**File: start_servo.py**\r\nThe script is intended to start servo on localhost:7002\r\n**File: servo_automation_screenshot.py**\r\nThe below program is intended to test rendering mismatches in servo based on random web pages generated by the web page fuzzer.\r\n\r\nHere is the breakdown of how our code works:\r\n*   A session is started on localhost:7002\r\n*   The randomly generated webpage's (html files) data is sent as JSON to this session\r\n*   Using curl request, we load the html files for this session ID based on the session we just created\r\n*   For each html file it renders, it takes the screenshot after rendering which is saved in the current working directory in the format \"testing#.png\"\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- [ ] These changes fix #__ (github issue number if applicable).\r\n\r\n<!-- Either: -->\r\n- [ ] There are tests for these changes OR\r\n- [ ] These changes do not require tests because _____\r\n\r\n<!-- Also, please make sure that \"Allow edits from maintainers\" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->\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. -->\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/servo/servo/20448)\r\n<!-- Reviewable:end -->\r\n","created_at":"2018-03-27T03:50:02Z","updated_at":"2018-04-25T21:49:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d3ab06be491c90696dde1407785284ffac09814","assignee":{"login":"Manishearth","id":1617736,"avatar_url":"https://avatars2.githubusercontent.com/u/1617736?v=4","gravatar_id":"","url":"https://api.github.com/users/Manishearth","html_url":"https://github.com/Manishearth","followers_url":"https://api.github.com/users/Manishearth/followers","following_url":"https://api.github.com/users/Manishearth/following{/other_user}","gists_url":"https://api.github.com/users/Manishearth/gists{/gist_id}","starred_url":"https://api.github.com/users/Manishearth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manishearth/subscriptions","organizations_url":"https://api.github.com/users/Manishearth/orgs","repos_url":"https://api.github.com/users/Manishearth/repos","events_url":"https://api.github.com/users/Manishearth/events{/privacy}","received_events_url":"https://api.github.com/users/Manishearth/received_events","type":"User","site_admin":false},"assignees":[{"login":"Manishearth","id":1617736,"avatar_url":"https://avatars2.githubusercontent.com/u/1617736?v=4","gravatar_id":"","url":"https://api.github.com/users/Manishearth","html_url":"https://github.com/Manishearth","followers_url":"https://api.github.com/users/Manishearth/followers","following_url":"https://api.github.com/users/Manishearth/following{/other_user}","gists_url":"https://api.github.com/users/Manishearth/gists{/gist_id}","starred_url":"https://api.github.com/users/Manishearth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manishearth/subscriptions","organizations_url":"https://api.github.com/users/Manishearth/orgs","repos_url":"https://api.github.com/users/Manishearth/repos","events_url":"https://api.github.com/users/Manishearth/events{/privacy}","received_events_url":"https://api.github.com/users/Manishearth/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":152310043,"url":"https://api.github.com/repos/servo/servo/labels/S-awaiting-review","name":"S-awaiting-review","color":"d4c5f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/servo/servo/pulls/20448/commits","review_comments_url":"https://api.github.com/repos/servo/servo/pulls/20448/comments","review_comment_url":"https://api.github.com/repos/servo/servo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servo/servo/issues/20448/comments","statuses_url":"https://api.github.com/repos/servo/servo/statuses/9e6e51d66189f2f0f61c443bf1167a0384b758ce","head":{"label":"asoni3:master","ref":"master","sha":"9e6e51d66189f2f0f61c443bf1167a0384b758ce","user":{"login":"asoni3","id":31193162,"avatar_url":"https://avatars3.githubusercontent.com/u/31193162?v=4","gravatar_id":"","url":"https://api.github.com/users/asoni3","html_url":"https://github.com/asoni3","followers_url":"https://api.github.com/users/asoni3/followers","following_url":"https://api.github.com/users/asoni3/following{/other_user}","gists_url":"https://api.github.com/users/asoni3/gists{/gist_id}","starred_url":"https://api.github.com/users/asoni3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asoni3/subscriptions","organizations_url":"https://api.github.com/users/asoni3/orgs","repos_url":"https://api.github.com/users/asoni3/repos","events_url":"https://api.github.com/users/asoni3/events{/privacy}","received_events_url":"https://api.github.com/users/asoni3/received_events","type":"User","site_admin":false},"repo":{"id":126737645,"name":"servo","full_name":"asoni3/servo","owner":{"login":"asoni3","id":31193162,"avatar_url":"https://avatars3.githubusercontent.com/u/31193162?v=4","gravatar_id":"","url":"https://api.github.com/users/asoni3","html_url":"https://github.com/asoni3","followers_url":"https://api.github.com/users/asoni3/followers","following_url":"https://api.github.com/users/asoni3/following{/other_user}","gists_url":"https://api.github.com/users/asoni3/gists{/gist_id}","starred_url":"https://api.github.com/users/asoni3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asoni3/subscriptions","organizations_url":"https://api.github.com/users/asoni3/orgs","repos_url":"https://api.github.com/users/asoni3/repos","events_url":"https://api.github.com/users/asoni3/events{/privacy}","received_events_url":"https://api.github.com/users/asoni3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/asoni3/servo","description":"The Servo Browser Engine","fork":true,"url":"https://api.github.com/repos/asoni3/servo","forks_url":"https://api.github.com/repos/asoni3/servo/forks","keys_url":"https://api.github.com/repos/asoni3/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asoni3/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asoni3/servo/teams","hooks_url":"https://api.github.com/repos/asoni3/servo/hooks","issue_events_url":"https://api.github.com/repos/asoni3/servo/issues/events{/number}","events_url":"https://api.github.com/repos/asoni3/servo/events","assignees_url":"https://api.github.com/repos/asoni3/servo/assignees{/user}","branches_url":"https://api.github.com/repos/asoni3/servo/branches{/branch}","tags_url":"https://api.github.com/repos/asoni3/servo/tags","blobs_url":"https://api.github.com/repos/asoni3/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asoni3/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asoni3/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/asoni3/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asoni3/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/asoni3/servo/languages","stargazers_url":"https://api.github.com/repos/asoni3/servo/stargazers","contributors_url":"https://api.github.com/repos/asoni3/servo/contributors","subscribers_url":"https://api.github.com/repos/asoni3/servo/subscribers","subscription_url":"https://api.github.com/repos/asoni3/servo/subscription","commits_url":"https://api.github.com/repos/asoni3/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/asoni3/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/asoni3/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/asoni3/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/asoni3/servo/contents/{+path}","compare_url":"https://api.github.com/repos/asoni3/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asoni3/servo/merges","archive_url":"https://api.github.com/repos/asoni3/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asoni3/servo/downloads","issues_url":"https://api.github.com/repos/asoni3/servo/issues{/number}","pulls_url":"https://api.github.com/repos/asoni3/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/asoni3/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/asoni3/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asoni3/servo/labels{/name}","releases_url":"https://api.github.com/repos/asoni3/servo/releases{/id}","deployments_url":"https://api.github.com/repos/asoni3/servo/deployments","created_at":"2018-03-25T20:32:48Z","updated_at":"2018-04-25T18:37:26Z","pushed_at":"2018-04-25T18:37:22Z","git_url":"git://github.com/asoni3/servo.git","ssh_url":"git@github.com:asoni3/servo.git","clone_url":"https://github.com/asoni3/servo.git","svn_url":"https://github.com/asoni3/servo","homepage":"https://servo.org/","size":368361,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"servo:master","ref":"master","sha":"1981efcc3585d244f6293716fbcf833afa58e629","user":{"login":"servo","id":2566135,"avatar_url":"https://avatars1.githubusercontent.com/u/2566135?v=4","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"repo":{"id":3390243,"name":"servo","full_name":"servo/servo","owner":{"login":"servo","id":2566135,"avatar_url":"https://avatars1.githubusercontent.com/u/2566135?v=4","gravatar_id":"","url":"https://api.github.com/users/servo","html_url":"https://github.com/servo","followers_url":"https://api.github.com/users/servo/followers","following_url":"https://api.github.com/users/servo/following{/other_user}","gists_url":"https://api.github.com/users/servo/gists{/gist_id}","starred_url":"https://api.github.com/users/servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servo/subscriptions","organizations_url":"https://api.github.com/users/servo/orgs","repos_url":"https://api.github.com/users/servo/repos","events_url":"https://api.github.com/users/servo/events{/privacy}","received_events_url":"https://api.github.com/users/servo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servo/servo","description":"The Servo Browser Engine","fork":false,"url":"https://api.github.com/repos/servo/servo","forks_url":"https://api.github.com/repos/servo/servo/forks","keys_url":"https://api.github.com/repos/servo/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servo/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servo/servo/teams","hooks_url":"https://api.github.com/repos/servo/servo/hooks","issue_events_url":"https://api.github.com/repos/servo/servo/issues/events{/number}","events_url":"https://api.github.com/repos/servo/servo/events","assignees_url":"https://api.github.com/repos/servo/servo/assignees{/user}","branches_url":"https://api.github.com/repos/servo/servo/branches{/branch}","tags_url":"https://api.github.com/repos/servo/servo/tags","blobs_url":"https://api.github.com/repos/servo/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servo/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servo/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/servo/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servo/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/servo/servo/languages","stargazers_url":"https://api.github.com/repos/servo/servo/stargazers","contributors_url":"https://api.github.com/repos/servo/servo/contributors","subscribers_url":"https://api.github.com/repos/servo/servo/subscribers","subscription_url":"https://api.github.com/repos/servo/servo/subscription","commits_url":"https://api.github.com/repos/servo/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/servo/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/servo/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/servo/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/servo/servo/contents/{+path}","compare_url":"https://api.github.com/repos/servo/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servo/servo/merges","archive_url":"https://api.github.com/repos/servo/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servo/servo/downloads","issues_url":"https://api.github.com/repos/servo/servo/issues{/number}","pulls_url":"https://api.github.com/repos/servo/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/servo/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/servo/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servo/servo/labels{/name}","releases_url":"https://api.github.com/repos/servo/servo/releases{/id}","deployments_url":"https://api.github.com/repos/servo/servo/deployments","created_at":"2012-02-08T19:07:25Z","updated_at":"2018-04-25T16:37:43Z","pushed_at":"2018-04-25T21:44:26Z","git_url":"git://github.com/servo/servo.git","ssh_url":"git@github.com:servo/servo.git","clone_url":"https://github.com/servo/servo.git","svn_url":"https://github.com/servo/servo","homepage":"https://servo.org/","size":482791,"stargazers_count":11546,"watchers_count":11546,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1899,"mirror_url":null,"archived":false,"open_issues_count":2133,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":1899,"open_issues":2133,"watchers":11546,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servo/servo/pulls/20448"},"html":{"href":"https://github.com/servo/servo/pull/20448"},"issue":{"href":"https://api.github.com/repos/servo/servo/issues/20448"},"comments":{"href":"https://api.github.com/repos/servo/servo/issues/20448/comments"},"review_comments":{"href":"https://api.github.com/repos/servo/servo/pulls/20448/comments"},"review_comment":{"href":"https://api.github.com/repos/servo/servo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servo/servo/pulls/20448/commits"},"statuses":{"href":"https://api.github.com/repos/servo/servo/statuses/9e6e51d66189f2f0f61c443bf1167a0384b758ce"}},"author_association":"NONE"}}
{"actor":{"display_login":"Manishearth"}}