{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments/52662663","id":52662663,"diff_hunk":"@@ -0,0 +1,164 @@\n+/* globals expect, it, describe, waitsFor, combineUrl, PDFNetworkStream */\n+\n+'use strict';\n+\n+describe('network', function() {\n+  var pdf1 = combineUrl(window.location.href, '../pdfs/tracemonkey.pdf');\n+  var pdf1Length = 1016315;\n+  var pdf2 = combineUrl(window.location.href, '../pdfs/pdf.pdf');\n+  var pdf2Length = 32472771;\n+\n+  function waitsForPromiseResolved(promise, successCallback) {\n+    var resolved = false;\n+    promise.then(function(val) {\n+        resolved = true;\n+        successCallback(val);\n+      },\n+      function(error) {\n+        // Shouldn't get here.\n+        expect(error).toEqual('the promise should not have been rejected');\n+      });\n+    waitsFor(function() {\n+      return resolved;\n+    }, 20000);","path":"test/unit/network_spec.js","position":23,"original_position":23,"commit_id":"10cdfbd9faf399cbfec3153a8063aa1f91ed3ec1","original_commit_id":"10cdfbd9faf399cbfec3153a8063aa1f91ed3ec1","user":{"login":"Rob--W","id":1365071,"avatar_url":"https://avatars.githubusercontent.com/u/1365071?v=3","gravatar_id":"","url":"https://api.github.com/users/Rob--W","html_url":"https://github.com/Rob--W","followers_url":"https://api.github.com/users/Rob--W/followers","following_url":"https://api.github.com/users/Rob--W/following{/other_user}","gists_url":"https://api.github.com/users/Rob--W/gists{/gist_id}","starred_url":"https://api.github.com/users/Rob--W/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rob--W/subscriptions","organizations_url":"https://api.github.com/users/Rob--W/orgs","repos_url":"https://api.github.com/users/Rob--W/repos","events_url":"https://api.github.com/users/Rob--W/events{/privacy}","received_events_url":"https://api.github.com/users/Rob--W/received_events","type":"User","site_admin":false},"body":"What makes 20000 a good choice?","created_at":"2016-02-11T20:35:11Z","updated_at":"2016-02-11T20:35:11Z","html_url":"https://github.com/mozilla/pdf.js/pull/6879#discussion_r52662663","pull_request_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/6879","_links":{"self":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments/52662663"},"html":{"href":"https://github.com/mozilla/pdf.js/pull/6879#discussion_r52662663"},"pull_request":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/6879"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/6879","id":56199223,"html_url":"https://github.com/mozilla/pdf.js/pull/6879","diff_url":"https://github.com/mozilla/pdf.js/pull/6879.diff","patch_url":"https://github.com/mozilla/pdf.js/pull/6879.patch","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/6879","number":6879,"state":"open","locked":false,"title":"Makes PDF data reading Streams API friendly.","user":{"login":"yurydelendik","id":1523410,"avatar_url":"https://avatars.githubusercontent.com/u/1523410?v=3","gravatar_id":"","url":"https://api.github.com/users/yurydelendik","html_url":"https://github.com/yurydelendik","followers_url":"https://api.github.com/users/yurydelendik/followers","following_url":"https://api.github.com/users/yurydelendik/following{/other_user}","gists_url":"https://api.github.com/users/yurydelendik/gists{/gist_id}","starred_url":"https://api.github.com/users/yurydelendik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurydelendik/subscriptions","organizations_url":"https://api.github.com/users/yurydelendik/orgs","repos_url":"https://api.github.com/users/yurydelendik/repos","events_url":"https://api.github.com/users/yurydelendik/events{/privacy}","received_events_url":"https://api.github.com/users/yurydelendik/received_events","type":"User","site_admin":false},"body":"Adds PDFWorkerStream and PDFNetworkStream with classes that can provide readers (that are compatible with ReadableByteStream, see Streams API). \r\n\r\nIn the future PDFNetworkStream can be re-written to support Fetch API. The PDFWorkerStream can be refactored to be more lightweight and move most of I/O logic to the main thread.","created_at":"2016-01-15T17:43:44Z","updated_at":"2016-02-11T20:35:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"139e0ac9bd9f214605c9b2404c5b9b23405cb33e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/6879/commits","review_comments_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/6879/comments","review_comment_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/6879/comments","statuses_url":"https://api.github.com/repos/mozilla/pdf.js/statuses/10cdfbd9faf399cbfec3153a8063aa1f91ed3ec1","head":{"label":"yurydelendik:streams","ref":"streams","sha":"10cdfbd9faf399cbfec3153a8063aa1f91ed3ec1","user":{"login":"yurydelendik","id":1523410,"avatar_url":"https://avatars.githubusercontent.com/u/1523410?v=3","gravatar_id":"","url":"https://api.github.com/users/yurydelendik","html_url":"https://github.com/yurydelendik","followers_url":"https://api.github.com/users/yurydelendik/followers","following_url":"https://api.github.com/users/yurydelendik/following{/other_user}","gists_url":"https://api.github.com/users/yurydelendik/gists{/gist_id}","starred_url":"https://api.github.com/users/yurydelendik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurydelendik/subscriptions","organizations_url":"https://api.github.com/users/yurydelendik/orgs","repos_url":"https://api.github.com/users/yurydelendik/repos","events_url":"https://api.github.com/users/yurydelendik/events{/privacy}","received_events_url":"https://api.github.com/users/yurydelendik/received_events","type":"User","site_admin":false},"repo":{"id":3910637,"name":"pdf.js","full_name":"yurydelendik/pdf.js","owner":{"login":"yurydelendik","id":1523410,"avatar_url":"https://avatars.githubusercontent.com/u/1523410?v=3","gravatar_id":"","url":"https://api.github.com/users/yurydelendik","html_url":"https://github.com/yurydelendik","followers_url":"https://api.github.com/users/yurydelendik/followers","following_url":"https://api.github.com/users/yurydelendik/following{/other_user}","gists_url":"https://api.github.com/users/yurydelendik/gists{/gist_id}","starred_url":"https://api.github.com/users/yurydelendik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurydelendik/subscriptions","organizations_url":"https://api.github.com/users/yurydelendik/orgs","repos_url":"https://api.github.com/users/yurydelendik/repos","events_url":"https://api.github.com/users/yurydelendik/events{/privacy}","received_events_url":"https://api.github.com/users/yurydelendik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yurydelendik/pdf.js","description":"PDF Reader in JavaScript","fork":true,"url":"https://api.github.com/repos/yurydelendik/pdf.js","forks_url":"https://api.github.com/repos/yurydelendik/pdf.js/forks","keys_url":"https://api.github.com/repos/yurydelendik/pdf.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yurydelendik/pdf.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yurydelendik/pdf.js/teams","hooks_url":"https://api.github.com/repos/yurydelendik/pdf.js/hooks","issue_events_url":"https://api.github.com/repos/yurydelendik/pdf.js/issues/events{/number}","events_url":"https://api.github.com/repos/yurydelendik/pdf.js/events","assignees_url":"https://api.github.com/repos/yurydelendik/pdf.js/assignees{/user}","branches_url":"https://api.github.com/repos/yurydelendik/pdf.js/branches{/branch}","tags_url":"https://api.github.com/repos/yurydelendik/pdf.js/tags","blobs_url":"https://api.github.com/repos/yurydelendik/pdf.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yurydelendik/pdf.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yurydelendik/pdf.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/yurydelendik/pdf.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yurydelendik/pdf.js/statuses/{sha}","languages_url":"https://api.github.com/repos/yurydelendik/pdf.js/languages","stargazers_url":"https://api.github.com/repos/yurydelendik/pdf.js/stargazers","contributors_url":"https://api.github.com/repos/yurydelendik/pdf.js/contributors","subscribers_url":"https://api.github.com/repos/yurydelendik/pdf.js/subscribers","subscription_url":"https://api.github.com/repos/yurydelendik/pdf.js/subscription","commits_url":"https://api.github.com/repos/yurydelendik/pdf.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/yurydelendik/pdf.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/yurydelendik/pdf.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/yurydelendik/pdf.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/yurydelendik/pdf.js/contents/{+path}","compare_url":"https://api.github.com/repos/yurydelendik/pdf.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yurydelendik/pdf.js/merges","archive_url":"https://api.github.com/repos/yurydelendik/pdf.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yurydelendik/pdf.js/downloads","issues_url":"https://api.github.com/repos/yurydelendik/pdf.js/issues{/number}","pulls_url":"https://api.github.com/repos/yurydelendik/pdf.js/pulls{/number}","milestones_url":"https://api.github.com/repos/yurydelendik/pdf.js/milestones{/number}","notifications_url":"https://api.github.com/repos/yurydelendik/pdf.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yurydelendik/pdf.js/labels{/name}","releases_url":"https://api.github.com/repos/yurydelendik/pdf.js/releases{/id}","deployments_url":"https://api.github.com/repos/yurydelendik/pdf.js/deployments","created_at":"2012-04-02T19:26:16Z","updated_at":"2015-07-02T19:39:39Z","pushed_at":"2016-02-09T21:46:14Z","git_url":"git://github.com/yurydelendik/pdf.js.git","ssh_url":"git@github.com:yurydelendik/pdf.js.git","clone_url":"https://github.com/yurydelendik/pdf.js.git","svn_url":"https://github.com/yurydelendik/pdf.js","homepage":"","size":54496,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"d7e5935f91f2f97b9ba66f370befb0ba21162aa2","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":1663468,"name":"pdf.js","full_name":"mozilla/pdf.js","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/pdf.js","description":"PDF Reader in JavaScript","fork":false,"url":"https://api.github.com/repos/mozilla/pdf.js","forks_url":"https://api.github.com/repos/mozilla/pdf.js/forks","keys_url":"https://api.github.com/repos/mozilla/pdf.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/pdf.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/pdf.js/teams","hooks_url":"https://api.github.com/repos/mozilla/pdf.js/hooks","issue_events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/pdf.js/events","assignees_url":"https://api.github.com/repos/mozilla/pdf.js/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/pdf.js/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/pdf.js/tags","blobs_url":"https://api.github.com/repos/mozilla/pdf.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/pdf.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/pdf.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/pdf.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/pdf.js/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/pdf.js/languages","stargazers_url":"https://api.github.com/repos/mozilla/pdf.js/stargazers","contributors_url":"https://api.github.com/repos/mozilla/pdf.js/contributors","subscribers_url":"https://api.github.com/repos/mozilla/pdf.js/subscribers","subscription_url":"https://api.github.com/repos/mozilla/pdf.js/subscription","commits_url":"https://api.github.com/repos/mozilla/pdf.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/pdf.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/pdf.js/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/pdf.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/pdf.js/merges","archive_url":"https://api.github.com/repos/mozilla/pdf.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/pdf.js/downloads","issues_url":"https://api.github.com/repos/mozilla/pdf.js/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/pdf.js/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/pdf.js/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/pdf.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/pdf.js/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/pdf.js/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/pdf.js/deployments","created_at":"2011-04-26T06:32:03Z","updated_at":"2016-02-11T20:15:17Z","pushed_at":"2016-02-11T13:47:35Z","git_url":"git://github.com/mozilla/pdf.js.git","ssh_url":"git@github.com:mozilla/pdf.js.git","clone_url":"https://github.com/mozilla/pdf.js.git","svn_url":"https://github.com/mozilla/pdf.js","homepage":"","size":105850,"stargazers_count":13604,"watchers_count":13604,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3192,"mirror_url":null,"open_issues_count":562,"forks":3192,"open_issues":562,"watchers":13604,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/6879"},"html":{"href":"https://github.com/mozilla/pdf.js/pull/6879"},"issue":{"href":"https://api.github.com/repos/mozilla/pdf.js/issues/6879"},"comments":{"href":"https://api.github.com/repos/mozilla/pdf.js/issues/6879/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/6879/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/6879/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/pdf.js/statuses/10cdfbd9faf399cbfec3153a8063aa1f91ed3ec1"}}}}