{"action":"created","comment":{"url":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls/comments/210877067","pull_request_review_id":147181452,"id":210877067,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDg3NzA2Nw==","diff_hunk":"@@ -156,6 +156,59 @@\n \t\t\t} );\n \t\t},\n \n+\t\t// (#1454)\n+\t\t'test abort': function() {\n+\t\t\tvar bot = this.editorBot,\n+\t\t\t\teditor = bot.editor;\n+\n+\t\t\tvar stub = sinon.stub().returns( true );\n+\n+\t\t\taddTestUploadWidget( editor, 'testuploadwidget', {\n+\t\t\t\tonAbort: stub\n+\t\t\t} );\n+\n+\t\t\tbot.setData( '', function() {\n+\t\t\t\tpasteFiles( editor, [ bender.tools.getTestPngFile() ] );\n+\n+\t\t\t\tvar loader = editor.uploadRepository.loaders[ 0 ];\n+\n+\t\t\t\t// Remove widget from the DOM.\n+\t\t\t\teditor.widgets.destroyAll();\n+\t\t\t\teditor.editable().findOne( '[data-cke-upload-id=\"' + loader.id + '\"]' ).remove();\n+\n+\t\t\t\tloader.changeStatus( 'abort' );\n+\n+\t\t\t\tassert.isTrue( stub.calledOnce );\n+\t\t\t} );\n+\t\t},\n+\n+\t\t// (#1454)\n+\t\t'test abort can be called only once': function() {","path":"tests/plugins/uploadwidget/uploadwidget.js","position":31,"original_position":31,"commit_id":"073403477423eb26932b5078b894917eac3563fd","original_commit_id":"073403477423eb26932b5078b894917eac3563fd","user":{"login":"Comandeer","id":1078728,"node_id":"MDQ6VXNlcjEwNzg3Mjg=","avatar_url":"https://avatars3.githubusercontent.com/u/1078728?v=4","gravatar_id":"","url":"https://api.github.com/users/Comandeer","html_url":"https://github.com/Comandeer","followers_url":"https://api.github.com/users/Comandeer/followers","following_url":"https://api.github.com/users/Comandeer/following{/other_user}","gists_url":"https://api.github.com/users/Comandeer/gists{/gist_id}","starred_url":"https://api.github.com/users/Comandeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Comandeer/subscriptions","organizations_url":"https://api.github.com/users/Comandeer/orgs","repos_url":"https://api.github.com/users/Comandeer/repos","events_url":"https://api.github.com/users/Comandeer/events{/privacy}","received_events_url":"https://api.github.com/users/Comandeer/received_events","type":"User","site_admin":false},"body":"Is this test realistic? Is such situation possible to happen? According to our docs, `abort` event is fired only once for every loader.\r\n\r\nIn fact this test uses private method, `changeStatus`, which does not prevent double setting the same status; yet public `abort` method does it.","created_at":"2018-08-17T11:08:59Z","updated_at":"2018-08-17T11:11:26Z","html_url":"https://github.com/ckeditor/ckeditor-dev/pull/1463#discussion_r210877067","pull_request_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls/1463","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls/comments/210877067"},"html":{"href":"https://github.com/ckeditor/ckeditor-dev/pull/1463#discussion_r210877067"},"pull_request":{"href":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls/1463"}}},"pull_request":{"url":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls/1463","id":163166267,"node_id":"MDExOlB1bGxSZXF1ZXN0MTYzMTY2MjY3","html_url":"https://github.com/ckeditor/ckeditor-dev/pull/1463","diff_url":"https://github.com/ckeditor/ckeditor-dev/pull/1463.diff","patch_url":"https://github.com/ckeditor/ckeditor-dev/pull/1463.patch","issue_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/issues/1463","number":1463,"state":"open","locked":false,"title":"Fixed 'uploadWidgetDefinition.onAbort' method is not called when loader is aborted","user":{"login":"jacekbogdanski","id":10279586,"node_id":"MDQ6VXNlcjEwMjc5NTg2","avatar_url":"https://avatars2.githubusercontent.com/u/10279586?v=4","gravatar_id":"","url":"https://api.github.com/users/jacekbogdanski","html_url":"https://github.com/jacekbogdanski","followers_url":"https://api.github.com/users/jacekbogdanski/followers","following_url":"https://api.github.com/users/jacekbogdanski/following{/other_user}","gists_url":"https://api.github.com/users/jacekbogdanski/gists{/gist_id}","starred_url":"https://api.github.com/users/jacekbogdanski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacekbogdanski/subscriptions","organizations_url":"https://api.github.com/users/jacekbogdanski/orgs","repos_url":"https://api.github.com/users/jacekbogdanski/repos","events_url":"https://api.github.com/users/jacekbogdanski/events{/privacy}","received_events_url":"https://api.github.com/users/jacekbogdanski/received_events","type":"User","site_admin":false},"body":"## What is the purpose of this pull request?\r\n\r\nBug fix.\r\n\r\n## Does your PR contain necessary tests?\r\n\r\nAll patches which change the editor code must include tests. You can always read more\r\non [PR testing](https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_contributing_code-section-tests),\r\n[how to set the testing environment](https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_tests) and\r\n[how to create tests](https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_tests-section-creating-your-own-test)\r\nin the official CKEditor documentation.\r\n\r\n### This PR contains\r\n\r\n- [x] Unit tests\r\n- [x] Manual tests\r\n\r\n## What changes did you make?\r\n\r\nChanged initialisation of the [upload Widget Definition](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.fileTools.uploadWidgetDefinition) to include [`onAbort`](https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR.fileTools.uploadWidgetDefinition-property-onAbort) method when upload status changes to `abort`.\r\n\r\nCloses #1454\r\n","created_at":"2018-01-16T12:31:44Z","updated_at":"2018-08-17T11:11:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8d55de740e050ab5929fdd7046e15d556ddf20a","assignee":{"login":"Comandeer","id":1078728,"node_id":"MDQ6VXNlcjEwNzg3Mjg=","avatar_url":"https://avatars3.githubusercontent.com/u/1078728?v=4","gravatar_id":"","url":"https://api.github.com/users/Comandeer","html_url":"https://github.com/Comandeer","followers_url":"https://api.github.com/users/Comandeer/followers","following_url":"https://api.github.com/users/Comandeer/following{/other_user}","gists_url":"https://api.github.com/users/Comandeer/gists{/gist_id}","starred_url":"https://api.github.com/users/Comandeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Comandeer/subscriptions","organizations_url":"https://api.github.com/users/Comandeer/orgs","repos_url":"https://api.github.com/users/Comandeer/repos","events_url":"https://api.github.com/users/Comandeer/events{/privacy}","received_events_url":"https://api.github.com/users/Comandeer/received_events","type":"User","site_admin":false},"assignees":[{"login":"Comandeer","id":1078728,"node_id":"MDQ6VXNlcjEwNzg3Mjg=","avatar_url":"https://avatars3.githubusercontent.com/u/1078728?v=4","gravatar_id":"","url":"https://api.github.com/users/Comandeer","html_url":"https://github.com/Comandeer","followers_url":"https://api.github.com/users/Comandeer/followers","following_url":"https://api.github.com/users/Comandeer/following{/other_user}","gists_url":"https://api.github.com/users/Comandeer/gists{/gist_id}","starred_url":"https://api.github.com/users/Comandeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Comandeer/subscriptions","organizations_url":"https://api.github.com/users/Comandeer/orgs","repos_url":"https://api.github.com/users/Comandeer/repos","events_url":"https://api.github.com/users/Comandeer/events{/privacy}","received_events_url":"https://api.github.com/users/Comandeer/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":690260520,"node_id":"MDU6TGFiZWw2OTAyNjA1MjA=","url":"https://api.github.com/repos/ckeditor/ckeditor-dev/labels/review:easy","name":"review:easy","color":"34d058","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls/1463/commits","review_comments_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls/1463/comments","review_comment_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/issues/1463/comments","statuses_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/statuses/073403477423eb26932b5078b894917eac3563fd","head":{"label":"ckeditor:t/1454","ref":"t/1454","sha":"073403477423eb26932b5078b894917eac3563fd","user":{"login":"ckeditor","id":825710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyNTcxMA==","avatar_url":"https://avatars2.githubusercontent.com/u/825710?v=4","gravatar_id":"","url":"https://api.github.com/users/ckeditor","html_url":"https://github.com/ckeditor","followers_url":"https://api.github.com/users/ckeditor/followers","following_url":"https://api.github.com/users/ckeditor/following{/other_user}","gists_url":"https://api.github.com/users/ckeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/ckeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckeditor/subscriptions","organizations_url":"https://api.github.com/users/ckeditor/orgs","repos_url":"https://api.github.com/users/ckeditor/repos","events_url":"https://api.github.com/users/ckeditor/events{/privacy}","received_events_url":"https://api.github.com/users/ckeditor/received_events","type":"Organization","site_admin":false},"repo":{"id":5482172,"node_id":"MDEwOlJlcG9zaXRvcnk1NDgyMTcy","name":"ckeditor-dev","full_name":"ckeditor/ckeditor-dev","owner":{"login":"ckeditor","id":825710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyNTcxMA==","avatar_url":"https://avatars2.githubusercontent.com/u/825710?v=4","gravatar_id":"","url":"https://api.github.com/users/ckeditor","html_url":"https://github.com/ckeditor","followers_url":"https://api.github.com/users/ckeditor/followers","following_url":"https://api.github.com/users/ckeditor/following{/other_user}","gists_url":"https://api.github.com/users/ckeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/ckeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckeditor/subscriptions","organizations_url":"https://api.github.com/users/ckeditor/orgs","repos_url":"https://api.github.com/users/ckeditor/repos","events_url":"https://api.github.com/users/ckeditor/events{/privacy}","received_events_url":"https://api.github.com/users/ckeditor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ckeditor/ckeditor-dev","description":"The development repository of CKEditor 4.","fork":false,"url":"https://api.github.com/repos/ckeditor/ckeditor-dev","forks_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/forks","keys_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/teams","hooks_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/hooks","issue_events_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/issues/events{/number}","events_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/events","assignees_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/assignees{/user}","branches_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/branches{/branch}","tags_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/tags","blobs_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/languages","stargazers_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/stargazers","contributors_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/contributors","subscribers_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/subscribers","subscription_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/subscription","commits_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/contents/{+path}","compare_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/merges","archive_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/downloads","issues_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/issues{/number}","pulls_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/labels{/name}","releases_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/releases{/id}","deployments_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/deployments","created_at":"2012-08-20T14:21:13Z","updated_at":"2018-08-17T08:44:51Z","pushed_at":"2018-08-17T10:35:26Z","git_url":"git://github.com/ckeditor/ckeditor-dev.git","ssh_url":"git@github.com:ckeditor/ckeditor-dev.git","clone_url":"https://github.com/ckeditor/ckeditor-dev.git","svn_url":"https://github.com/ckeditor/ckeditor-dev","homepage":"https://ckeditor.com/ckeditor-4","size":62540,"stargazers_count":4142,"watchers_count":4142,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1872,"mirror_url":null,"archived":false,"open_issues_count":646,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1872,"open_issues":646,"watchers":4142,"default_branch":"master"}},"base":{"label":"ckeditor:master","ref":"master","sha":"6617995165bef3b5b5c2ebc30774c8346c5f0957","user":{"login":"ckeditor","id":825710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyNTcxMA==","avatar_url":"https://avatars2.githubusercontent.com/u/825710?v=4","gravatar_id":"","url":"https://api.github.com/users/ckeditor","html_url":"https://github.com/ckeditor","followers_url":"https://api.github.com/users/ckeditor/followers","following_url":"https://api.github.com/users/ckeditor/following{/other_user}","gists_url":"https://api.github.com/users/ckeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/ckeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckeditor/subscriptions","organizations_url":"https://api.github.com/users/ckeditor/orgs","repos_url":"https://api.github.com/users/ckeditor/repos","events_url":"https://api.github.com/users/ckeditor/events{/privacy}","received_events_url":"https://api.github.com/users/ckeditor/received_events","type":"Organization","site_admin":false},"repo":{"id":5482172,"node_id":"MDEwOlJlcG9zaXRvcnk1NDgyMTcy","name":"ckeditor-dev","full_name":"ckeditor/ckeditor-dev","owner":{"login":"ckeditor","id":825710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyNTcxMA==","avatar_url":"https://avatars2.githubusercontent.com/u/825710?v=4","gravatar_id":"","url":"https://api.github.com/users/ckeditor","html_url":"https://github.com/ckeditor","followers_url":"https://api.github.com/users/ckeditor/followers","following_url":"https://api.github.com/users/ckeditor/following{/other_user}","gists_url":"https://api.github.com/users/ckeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/ckeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckeditor/subscriptions","organizations_url":"https://api.github.com/users/ckeditor/orgs","repos_url":"https://api.github.com/users/ckeditor/repos","events_url":"https://api.github.com/users/ckeditor/events{/privacy}","received_events_url":"https://api.github.com/users/ckeditor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ckeditor/ckeditor-dev","description":"The development repository of CKEditor 4.","fork":false,"url":"https://api.github.com/repos/ckeditor/ckeditor-dev","forks_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/forks","keys_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/teams","hooks_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/hooks","issue_events_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/issues/events{/number}","events_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/events","assignees_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/assignees{/user}","branches_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/branches{/branch}","tags_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/tags","blobs_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/languages","stargazers_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/stargazers","contributors_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/contributors","subscribers_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/subscribers","subscription_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/subscription","commits_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/contents/{+path}","compare_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/merges","archive_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/downloads","issues_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/issues{/number}","pulls_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/labels{/name}","releases_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/releases{/id}","deployments_url":"https://api.github.com/repos/ckeditor/ckeditor-dev/deployments","created_at":"2012-08-20T14:21:13Z","updated_at":"2018-08-17T08:44:51Z","pushed_at":"2018-08-17T10:35:26Z","git_url":"git://github.com/ckeditor/ckeditor-dev.git","ssh_url":"git@github.com:ckeditor/ckeditor-dev.git","clone_url":"https://github.com/ckeditor/ckeditor-dev.git","svn_url":"https://github.com/ckeditor/ckeditor-dev","homepage":"https://ckeditor.com/ckeditor-4","size":62540,"stargazers_count":4142,"watchers_count":4142,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1872,"mirror_url":null,"archived":false,"open_issues_count":646,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1872,"open_issues":646,"watchers":4142,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls/1463"},"html":{"href":"https://github.com/ckeditor/ckeditor-dev/pull/1463"},"issue":{"href":"https://api.github.com/repos/ckeditor/ckeditor-dev/issues/1463"},"comments":{"href":"https://api.github.com/repos/ckeditor/ckeditor-dev/issues/1463/comments"},"review_comments":{"href":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls/1463/comments"},"review_comment":{"href":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ckeditor/ckeditor-dev/pulls/1463/commits"},"statuses":{"href":"https://api.github.com/repos/ckeditor/ckeditor-dev/statuses/073403477423eb26932b5078b894917eac3563fd"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Comandeer"}}