GitHub PullRequestReviewCommentEvent at 2014-09-02 07:19:46
Repository: gaia
Actor: RudyLu
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/16973092","id":16973092,"diff_hunk":"@@ -274,6 +274,189 @@ suite('KeyboardManager', function() {\n     });\n   });\n \n+  suite('Try using the same layout when switching input types', function() {\n+    var oldKeyboardLayouts;\n+    var oldlayoutToGroupMapping;\n+    var stubLaunchFrame;\n+    var stubSetTimeout;\n+    setup(function() {\n+      stubLaunchFrame =\n+        this.sinon.stub(KeyboardManager.inputFrameManager, 'launchFrame');\n+\n+      oldKeyboardLayouts = KeyboardManager.keyboardLayouts;\n+      oldlayoutToGroupMapping = KeyboardManager.layoutToGroupMapping;\n+\n+      KeyboardManager.keyboardLayouts = {\n+        text: [\n+          {\n+            manifestURL: 'app://keyboard.gaiamobile.org/manifest.webapp',\n+            id: 'en'\n+          },\n+          {\n+            manifestURL: 'app://keyboard.gaiamobile.org/manifest.webapp',\n+            id: 'fr'\n+          },\n+          {\n+            manifestURL: 'app://keyboard.gaiamobile.org/manifest.webapp',\n+            id: 'es'\n+          }\n+        ],\n+        password: [\n+          {\n+            manifestURL: 'app://keyboard.gaiamobile.org/manifest.webapp',\n+            id: 'en'\n+          },\n+          {\n+            manifestURL: 'app://keyboard.gaiamobile.org/manifest.webapp',\n+            id: 'fr'\n+          },\n+          {\n+            manifestURL: 'app://keyboard.gaiamobile.org/manifest.webapp',\n+            id: 'es'\n+          }\n+        ],\n+        number: [\n+          {\n+            manifestURL: 'app://keyboard.gaiamobile.org/manifest.webapp',\n+            id: 'number'\n+          }\n+        ]\n+      };\n+\n+      KeyboardManager.layoutToGroupMapping = {\n+        'app://keyboard.gaiamobile.org/manifest.webapp/en': [\n+          {\n+            group: 'text',\n+            index: 0\n+          },\n+          {\n+            group: 'password',\n+            index: 0\n+          }\n+        ],\n+        'app://keyboard.gaiamobile.org/manifest.webapp/fr': [\n+          {\n+            group: 'text',\n+            index: 1\n+          },\n+          {\n+            group: 'password',\n+            index: 1\n+          }\n+        ],\n+        'app://keyboard.gaiamobile.org/manifest.webapp/es': [\n+          {\n+            group: 'text',\n+            index: 2\n+          },\n+          {\n+            group: 'password',\n+            index: 2\n+          }\n+        ],\n+        'app://keyboard.gaiamobile.org/manifest.webapp/number': [\n+          {\n+            group: 'number',\n+            index: 0\n+          }\n+        ]\n+      };\n+\n+      KeyboardManager.keyboardLayouts.text.activeLayout = 0;\n+      KeyboardManager.keyboardLayouts.password.activeLayout = 0;\n+      KeyboardManager.keyboardLayouts.number.activeLayout = 0;\n+      KeyboardManager.lastActivatedLayout = null;\n+\n+      stubSetTimeout = this.sinon.stub(window, 'setTimeout');","path":"apps/system/test/unit/keyboard_manager_test.js","position":97,"original_position":97,"commit_id":"1305276a2da9ad1a8666aa3ce930d95367025383","original_commit_id":"1305276a2da9ad1a8666aa3ce930d95367025383","user":{"login":"RudyLu","id":1704629,"avatar_url":"https://avatars.githubusercontent.com/u/1704629?v=2","gravatar_id":"4c3b3f1dbe118b705bfb68cb82351896","url":"https://api.github.com/users/RudyLu","html_url":"https://github.com/RudyLu","followers_url":"https://api.github.com/users/RudyLu/followers","following_url":"https://api.github.com/users/RudyLu/following{/other_user}","gists_url":"https://api.github.com/users/RudyLu/gists{/gist_id}","starred_url":"https://api.github.com/users/RudyLu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RudyLu/subscriptions","organizations_url":"https://api.github.com/users/RudyLu/orgs","repos_url":"https://api.github.com/users/RudyLu/repos","events_url":"https://api.github.com/users/RudyLu/events{/privacy}","received_events_url":"https://api.github.com/users/RudyLu/received_events","type":"User","site_admin":false},"body":"suggestion: you could leverage fakeTimer instead of stubing the `setTimeout()`,\r\nhttp://cjohansen.no/en/javascript/faking_timers_and_dates_with_sinon","created_at":"2014-09-02T07:19:46Z","updated_at":"2014-09-02T07:19:46Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/23399#discussion_r16973092","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/23399","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/16973092"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/23399#discussion_r16973092"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/23399"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/23399","id":20419043,"html_url":"https://github.com/mozilla-b2g/gaia/pull/23399","diff_url":"https://github.com/mozilla-b2g/gaia/pull/23399.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/23399.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/23399","number":23399,"state":"open","locked":false,"title":"Bug 942309 - [keyboard] keyboard layout language changes for input type=url and type=email","user":{"login":"mnjul","id":5014150,"avatar_url":"https://avatars.githubusercontent.com/u/5014150?v=2","gravatar_id":"5feebdc1382eadd5d07427a9efdf6019","url":"https://api.github.com/users/mnjul","html_url":"https://github.com/mnjul","followers_url":"https://api.github.com/users/mnjul/followers","following_url":"https://api.github.com/users/mnjul/following{/other_user}","gists_url":"https://api.github.com/users/mnjul/gists{/gist_id}","starred_url":"https://api.github.com/users/mnjul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnjul/subscriptions","organizations_url":"https://api.github.com/users/mnjul/orgs","repos_url":"https://api.github.com/users/mnjul/repos","events_url":"https://api.github.com/users/mnjul/events{/privacy}","received_events_url":"https://api.github.com/users/mnjul/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-08-28T05:59:17Z","updated_at":"2014-09-02T07:19:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7dbfb7a97c1d03615545dacab589349c3c58cb8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/23399/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/23399/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/23399/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/1305276a2da9ad1a8666aa3ce930d95367025383","head":{"label":"mnjul:bug_942309_email_url_keep_same_layout","ref":"bug_942309_email_url_keep_same_layout","sha":"1305276a2da9ad1a8666aa3ce930d95367025383","user":{"login":"mnjul","id":5014150,"avatar_url":"https://avatars.githubusercontent.com/u/5014150?v=2","gravatar_id":"5feebdc1382eadd5d07427a9efdf6019","url":"https://api.github.com/users/mnjul","html_url":"https://github.com/mnjul","followers_url":"https://api.github.com/users/mnjul/followers","following_url":"https://api.github.com/users/mnjul/following{/other_user}","gists_url":"https://api.github.com/users/mnjul/gists{/gist_id}","starred_url":"https://api.github.com/users/mnjul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnjul/subscriptions","organizations_url":"https://api.github.com/users/mnjul/orgs","repos_url":"https://api.github.com/users/mnjul/repos","events_url":"https://api.github.com/users/mnjul/events{/privacy}","received_events_url":"https://api.github.com/users/mnjul/received_events","type":"User","site_admin":false},"repo":{"id":19518091,"name":"gaia","full_name":"mnjul/gaia","owner":{"login":"mnjul","id":5014150,"avatar_url":"https://avatars.githubusercontent.com/u/5014150?v=2","gravatar_id":"5feebdc1382eadd5d07427a9efdf6019","url":"https://api.github.com/users/mnjul","html_url":"https://github.com/mnjul","followers_url":"https://api.github.com/users/mnjul/followers","following_url":"https://api.github.com/users/mnjul/following{/other_user}","gists_url":"https://api.github.com/users/mnjul/gists{/gist_id}","starred_url":"https://api.github.com/users/mnjul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnjul/subscriptions","organizations_url":"https://api.github.com/users/mnjul/orgs","repos_url":"https://api.github.com/users/mnjul/repos","events_url":"https://api.github.com/users/mnjul/events{/privacy}","received_events_url":"https://api.github.com/users/mnjul/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mnjul/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 https://wiki.mozilla.org/Release_Management/B2G_Landing","fork":true,"url":"https://api.github.com/repos/mnjul/gaia","forks_url":"https://api.github.com/repos/mnjul/gaia/forks","keys_url":"https://api.github.com/repos/mnjul/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mnjul/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mnjul/gaia/teams","hooks_url":"https://api.github.com/repos/mnjul/gaia/hooks","issue_events_url":"https://api.github.com/repos/mnjul/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mnjul/gaia/events","assignees_url":"https://api.github.com/repos/mnjul/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mnjul/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mnjul/gaia/tags","blobs_url":"https://api.github.com/repos/mnjul/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mnjul/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mnjul/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mnjul/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mnjul/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mnjul/gaia/languages","stargazers_url":"https://api.github.com/repos/mnjul/gaia/stargazers","contributors_url":"https://api.github.com/repos/mnjul/gaia/contributors","subscribers_url":"https://api.github.com/repos/mnjul/gaia/subscribers","subscription_url":"https://api.github.com/repos/mnjul/gaia/subscription","commits_url":"https://api.github.com/repos/mnjul/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mnjul/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mnjul/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mnjul/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/mnjul/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mnjul/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mnjul/gaia/merges","archive_url":"https://api.github.com/repos/mnjul/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mnjul/gaia/downloads","issues_url":"https://api.github.com/repos/mnjul/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mnjul/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mnjul/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mnjul/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mnjul/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mnjul/gaia/releases{/id}","created_at":"2014-05-07T02:19:00Z","updated_at":"2014-06-25T06:46:33Z","pushed_at":"2014-09-02T07:02:25Z","git_url":"git://github.com/mnjul/gaia.git","ssh_url":"git@github.com:mnjul/gaia.git","clone_url":"https://github.com/mnjul/gaia.git","svn_url":"https://github.com/mnjul/gaia","homepage":"https://wiki.mozilla.org/B2G","size":829875,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":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":"a4011737faf631127f28d3168df79e4ebe7a5a5f","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=2","gravatar_id":"b1de11f7d6ddaf7b9d527281297c2ee1","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":"b1de11f7d6ddaf7b9d527281297c2ee1","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-02T01:31:08Z","pushed_at":"2014-09-02T04:43:42Z","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":1410482,"stargazers_count":1719,"watchers_count":1719,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":1875,"mirror_url":null,"open_issues_count":2017,"forks":1875,"open_issues":2017,"watchers":1719,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/23399"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/23399"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/23399"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/23399/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/23399/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/23399/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/1305276a2da9ad1a8666aa3ce930d95367025383"}}}}