GitHub PullRequestReviewCommentEvent at 2014-09-26 16:44:41
Repository: gaia
Actor: etiennesegonzac
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/18099546","id":18099546,"diff_hunk":"@@ -1382,6 +1397,43 @@ suite('system/AppWindow', function() {\n       assert.isTrue(stubKill.called);\n     });\n \n+    test('Closed event', function() {\n+      var app1 = new AppWindow(fakeAppConfig1);\n+      app1.isHomescreen = true;\n+      var app2 = new AppWindow(fakeAppConfig2);\n+\n+      injectFakeMozBrowserAPI(app1.browser.element);\n+      injectFakeMozBrowserAPI(app2.browser.element);\n+      var stubScreenshot = this.sinon.stub(app1.browser.element,\n+        'getScreenshot');\n+      var stubScreenshot2 = this.sinon.stub(app2.browser.element,\n+        'getScreenshot');\n+\n+      var fakeDOMRequest = {\n+        onsuccess: function() {},\n+        onerror: function() {}\n+      };\n+\n+      stubScreenshot.returns(fakeDOMRequest);\n+      stubScreenshot2.returns(fakeDOMRequest);\n+\n+      var callback1 = this.sinon.spy();\n+      app2.rearWindow = app1;\n+\n+      app2.handleEvent({\n+        type: '_closed'\n+      });\n+\n+      assert.isFalse(stubScreenshot.called,\n+                     'should never take screenshot on _closed when homescreen');\n+      assert.isFalse(stubScreenshot2.called,\n+                     'should never take screenshot on _closed when homescreen');\n+      assert.isFalse(callback1.calledWith('fakeBlob'));\n+\n+      fakeDOMRequest.onerror();\n+      assert.isFalse(callback1.called);","path":"apps/system/test/unit/app_window_test.js","position":60,"original_position":60,"commit_id":"9c634e6758cffa4ca70c19aad7e2e94dce6ae73c","original_commit_id":"9c634e6758cffa4ca70c19aad7e2e94dce6ae73c","user":{"login":"etiennesegonzac","id":105194,"avatar_url":"https://avatars.githubusercontent.com/u/105194?v=2","gravatar_id":"","url":"https://api.github.com/users/etiennesegonzac","html_url":"https://github.com/etiennesegonzac","followers_url":"https://api.github.com/users/etiennesegonzac/followers","following_url":"https://api.github.com/users/etiennesegonzac/following{/other_user}","gists_url":"https://api.github.com/users/etiennesegonzac/gists{/gist_id}","starred_url":"https://api.github.com/users/etiennesegonzac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etiennesegonzac/subscriptions","organizations_url":"https://api.github.com/users/etiennesegonzac/orgs","repos_url":"https://api.github.com/users/etiennesegonzac/repos","events_url":"https://api.github.com/users/etiennesegonzac/events{/privacy}","received_events_url":"https://api.github.com/users/etiennesegonzac/received_events","type":"User","site_admin":false},"body":"I don't understand why we need the fakeDOMRequest/callback1 part...","created_at":"2014-09-26T16:44:41Z","updated_at":"2014-09-26T16:44:41Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/24454#discussion_r18099546","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24454","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/18099546"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/24454#discussion_r18099546"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24454"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24454","id":21821351,"html_url":"https://github.com/mozilla-b2g/gaia/pull/24454","diff_url":"https://github.com/mozilla-b2g/gaia/pull/24454.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/24454.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/24454","number":24454,"state":"open","locked":false,"title":"bug 1069452 - Never take screenshot of closing AppWindow if part of home...","user":{"login":"nullaus","id":1350717,"avatar_url":"https://avatars.githubusercontent.com/u/1350717?v=2","gravatar_id":"","url":"https://api.github.com/users/nullaus","html_url":"https://github.com/nullaus","followers_url":"https://api.github.com/users/nullaus/followers","following_url":"https://api.github.com/users/nullaus/following{/other_user}","gists_url":"https://api.github.com/users/nullaus/gists{/gist_id}","starred_url":"https://api.github.com/users/nullaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nullaus/subscriptions","organizations_url":"https://api.github.com/users/nullaus/orgs","repos_url":"https://api.github.com/users/nullaus/repos","events_url":"https://api.github.com/users/nullaus/events{/privacy}","received_events_url":"https://api.github.com/users/nullaus/received_events","type":"User","site_admin":false},"body":"...screen. r=alive,etienne","created_at":"2014-09-26T00:08:03Z","updated_at":"2014-09-26T16:44:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74a730969231bfeeb5bb531edf9a6234db8f666a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24454/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24454/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/24454/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/9c634e6758cffa4ca70c19aad7e2e94dce6ae73c","head":{"label":"nullaus:bug1069452","ref":"bug1069452","sha":"9c634e6758cffa4ca70c19aad7e2e94dce6ae73c","user":{"login":"nullaus","id":1350717,"avatar_url":"https://avatars.githubusercontent.com/u/1350717?v=2","gravatar_id":"","url":"https://api.github.com/users/nullaus","html_url":"https://github.com/nullaus","followers_url":"https://api.github.com/users/nullaus/followers","following_url":"https://api.github.com/users/nullaus/following{/other_user}","gists_url":"https://api.github.com/users/nullaus/gists{/gist_id}","starred_url":"https://api.github.com/users/nullaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nullaus/subscriptions","organizations_url":"https://api.github.com/users/nullaus/orgs","repos_url":"https://api.github.com/users/nullaus/repos","events_url":"https://api.github.com/users/nullaus/events{/privacy}","received_events_url":"https://api.github.com/users/nullaus/received_events","type":"User","site_admin":false},"repo":{"id":20957242,"name":"gaia","full_name":"nullaus/gaia","owner":{"login":"nullaus","id":1350717,"avatar_url":"https://avatars.githubusercontent.com/u/1350717?v=2","gravatar_id":"","url":"https://api.github.com/users/nullaus","html_url":"https://github.com/nullaus","followers_url":"https://api.github.com/users/nullaus/followers","following_url":"https://api.github.com/users/nullaus/following{/other_user}","gists_url":"https://api.github.com/users/nullaus/gists{/gist_id}","starred_url":"https://api.github.com/users/nullaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nullaus/subscriptions","organizations_url":"https://api.github.com/users/nullaus/orgs","repos_url":"https://api.github.com/users/nullaus/repos","events_url":"https://api.github.com/users/nullaus/events{/privacy}","received_events_url":"https://api.github.com/users/nullaus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nullaus/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":true,"url":"https://api.github.com/repos/nullaus/gaia","forks_url":"https://api.github.com/repos/nullaus/gaia/forks","keys_url":"https://api.github.com/repos/nullaus/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nullaus/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nullaus/gaia/teams","hooks_url":"https://api.github.com/repos/nullaus/gaia/hooks","issue_events_url":"https://api.github.com/repos/nullaus/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/nullaus/gaia/events","assignees_url":"https://api.github.com/repos/nullaus/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/nullaus/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/nullaus/gaia/tags","blobs_url":"https://api.github.com/repos/nullaus/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nullaus/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nullaus/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/nullaus/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nullaus/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/nullaus/gaia/languages","stargazers_url":"https://api.github.com/repos/nullaus/gaia/stargazers","contributors_url":"https://api.github.com/repos/nullaus/gaia/contributors","subscribers_url":"https://api.github.com/repos/nullaus/gaia/subscribers","subscription_url":"https://api.github.com/repos/nullaus/gaia/subscription","commits_url":"https://api.github.com/repos/nullaus/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/nullaus/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/nullaus/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/nullaus/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/nullaus/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/nullaus/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nullaus/gaia/merges","archive_url":"https://api.github.com/repos/nullaus/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nullaus/gaia/downloads","issues_url":"https://api.github.com/repos/nullaus/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/nullaus/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/nullaus/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/nullaus/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nullaus/gaia/labels{/name}","releases_url":"https://api.github.com/repos/nullaus/gaia/releases{/id}","created_at":"2014-06-18T09:44:59Z","updated_at":"2014-06-25T21:46:00Z","pushed_at":"2014-09-26T16:14:44Z","git_url":"git://github.com/nullaus/gaia.git","ssh_url":"git@github.com:nullaus/gaia.git","clone_url":"https://github.com/nullaus/gaia.git","svn_url":"https://github.com/nullaus/gaia","homepage":"https://wiki.mozilla.org/B2G","size":854072,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"mozilla-b2g:master","ref":"master","sha":"a8e4d164e64c6a618e4093eb53068de4ad74dfa9","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=2","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=2","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2014-09-25T19:23:30Z","pushed_at":"2014-09-26T16:28:33Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1464528,"stargazers_count":1752,"watchers_count":1752,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1930,"mirror_url":null,"open_issues_count":2042,"forks":1930,"open_issues":2042,"watchers":1752,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24454"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/24454"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/24454"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/24454/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24454/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24454/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/9c634e6758cffa4ca70c19aad7e2e94dce6ae73c"}}}}