{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/firefox-ui-tests/pulls/comments/24318326","id":24318326,"diff_hunk":"@@ -0,0 +1,79 @@\n+# This Source Code Form is subject to the terms of the Mozilla Public\n+# License, v. 2.0. If a copy of the MPL was not distributed with this\n+# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n+\n+from marionette import By\n+\n+from firefox_puppeteer.api.keys import Keys\n+from firefox_puppeteer.api.places import Places\n+from firefox_puppeteer.ui.windows import BrowserWindow\n+from firefox_ui_harness.decorators import skip_under_xvfb\n+from firefox_ui_harness.testcase import FirefoxTestCase\n+\n+\n+class TestAccessLocationBar(FirefoxTestCase):\n+\n+    def setUp(self):\n+        FirefoxTestCase.setUp(self)\n+        self.location_bar = self.browser.navbar.locationbar\n+        self.url_bar = self.location_bar.urlbar\n+\n+        # Purge history\n+        self.places.remove_all_history()\n+\n+        # Navigate to several urls in order to populate history\n+        self.test_urls = [\n+            'layout/mozilla_projects.html',\n+            'layout/mozilla_mission.html',\n+            'layout/mozilla.html']\n+        self.test_urls = [self.marionette.absolute_url(t)\n+                          for t in self.test_urls]\n+\n+        for url in self.test_urls:\n+            self.location_bar.load_url(url)\n+\n+        with self.marionette.using_context('content'):\n+            self.marionette.navigate('about:blank')\n+\n+    @skip_under_xvfb\n+    def test_access_location_bar_history(self):\n+        # Need to blur url bar or autocomplete won't load - bug 1038614\n+        self.marionette.execute_script(\"arguments[0].blur();\", script_args=[self.url_bar])\n+\n+        # Clear contents of url bar to focus\n+        self.location_bar.clear()\n+\n+        # Arrow down to navigate list of visited sites\n+        self.url_bar.send_keys(Keys.ARROW_DOWN)\n+\n+        # Verify that autocomplete is open\n+        def auto_complete_open(mn):\n+            return self.location_bar.autocomplete_results.is_open\n+        self.wait_for_condition(auto_complete_open)\n+\n+        # Verify that results are displayed in autocomplete\n+        def auto_complete_results(mn):\n+            self.location_bar_value_before = self.location_bar.value\n+            return len(self.location_bar.autocomplete_results.visible_results) > 1\n+        self.wait_for_condition(auto_complete_results)\n+\n+        # Arrow down again to select first item in list\n+        self.url_bar.send_keys(Keys.ARROW_DOWN)\n+\n+        # Verify that first item in list is selected\n+        def auto_complete_selected_item(mn):\n+            self.results = self.location_bar.autocomplete_results.results\n+            return self.results.get_attribute('selectedIndex') == '0'\n+        self.wait_for_condition(auto_complete_selected_item)\n+\n+        # Verify that selected item populates location bar with url\n+        def check_url_from_selection(mn):\n+            return self.location_bar.value == self.marionette.absolute_url('layout/mozilla.html')","path":"firefox_ui_tests/functional/toolbar/test_access_location_bar.py","position":71,"original_position":71,"commit_id":"289e6fe3e9b0743b12cecd52159de8f926342b48","original_commit_id":"289e6fe3e9b0743b12cecd52159de8f926342b48","user":{"login":"whimboo","id":129603,"avatar_url":"https://avatars.githubusercontent.com/u/129603?v=3","gravatar_id":"","url":"https://api.github.com/users/whimboo","html_url":"https://github.com/whimboo","followers_url":"https://api.github.com/users/whimboo/followers","following_url":"https://api.github.com/users/whimboo/following{/other_user}","gists_url":"https://api.github.com/users/whimboo/gists{/gist_id}","starred_url":"https://api.github.com/users/whimboo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whimboo/subscriptions","organizations_url":"https://api.github.com/users/whimboo/orgs","repos_url":"https://api.github.com/users/whimboo/repos","events_url":"https://api.github.com/users/whimboo/events{/privacy}","received_events_url":"https://api.github.com/users/whimboo/received_events","type":"User","site_admin":false},"body":"We do not have to check for the full URL being displayed in the location bar, but only for the unique term `mission`.","created_at":"2015-02-09T10:10:34Z","updated_at":"2015-02-09T10:10:34Z","html_url":"https://github.com/mozilla/firefox-ui-tests/pull/70#discussion_r24318326","pull_request_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/pulls/70","_links":{"self":{"href":"https://api.github.com/repos/mozilla/firefox-ui-tests/pulls/comments/24318326"},"html":{"href":"https://github.com/mozilla/firefox-ui-tests/pull/70#discussion_r24318326"},"pull_request":{"href":"https://api.github.com/repos/mozilla/firefox-ui-tests/pulls/70"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/firefox-ui-tests/pulls/70","id":28751642,"html_url":"https://github.com/mozilla/firefox-ui-tests/pull/70","diff_url":"https://github.com/mozilla/firefox-ui-tests/pull/70.diff","patch_url":"https://github.com/mozilla/firefox-ui-tests/pull/70.patch","issue_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/issues/70","number":70,"state":"open","locked":false,"title":"Bug 1129099 - Convert test_access_location_bar to a firefox ui test.;r=c...","user":{"login":"mwobensmith","id":3019057,"avatar_url":"https://avatars.githubusercontent.com/u/3019057?v=3","gravatar_id":"","url":"https://api.github.com/users/mwobensmith","html_url":"https://github.com/mwobensmith","followers_url":"https://api.github.com/users/mwobensmith/followers","following_url":"https://api.github.com/users/mwobensmith/following{/other_user}","gists_url":"https://api.github.com/users/mwobensmith/gists{/gist_id}","starred_url":"https://api.github.com/users/mwobensmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwobensmith/subscriptions","organizations_url":"https://api.github.com/users/mwobensmith/orgs","repos_url":"https://api.github.com/users/mwobensmith/repos","events_url":"https://api.github.com/users/mwobensmith/events{/privacy}","received_events_url":"https://api.github.com/users/mwobensmith/received_events","type":"User","site_admin":false},"body":"...hmanchester","created_at":"2015-02-05T19:06:19Z","updated_at":"2015-02-09T10:10:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"201b63f8d10a8e87ed2af69d4a215d144a1fdacf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/pulls/70/commits","review_comments_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/pulls/70/comments","review_comment_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/issues/70/comments","statuses_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/statuses/289e6fe3e9b0743b12cecd52159de8f926342b48","head":{"label":"mwobensmith:master","ref":"master","sha":"289e6fe3e9b0743b12cecd52159de8f926342b48","user":{"login":"mwobensmith","id":3019057,"avatar_url":"https://avatars.githubusercontent.com/u/3019057?v=3","gravatar_id":"","url":"https://api.github.com/users/mwobensmith","html_url":"https://github.com/mwobensmith","followers_url":"https://api.github.com/users/mwobensmith/followers","following_url":"https://api.github.com/users/mwobensmith/following{/other_user}","gists_url":"https://api.github.com/users/mwobensmith/gists{/gist_id}","starred_url":"https://api.github.com/users/mwobensmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwobensmith/subscriptions","organizations_url":"https://api.github.com/users/mwobensmith/orgs","repos_url":"https://api.github.com/users/mwobensmith/repos","events_url":"https://api.github.com/users/mwobensmith/events{/privacy}","received_events_url":"https://api.github.com/users/mwobensmith/received_events","type":"User","site_admin":false},"repo":{"id":30371720,"name":"firefox-ui-tests","full_name":"mwobensmith/firefox-ui-tests","owner":{"login":"mwobensmith","id":3019057,"avatar_url":"https://avatars.githubusercontent.com/u/3019057?v=3","gravatar_id":"","url":"https://api.github.com/users/mwobensmith","html_url":"https://github.com/mwobensmith","followers_url":"https://api.github.com/users/mwobensmith/followers","following_url":"https://api.github.com/users/mwobensmith/following{/other_user}","gists_url":"https://api.github.com/users/mwobensmith/gists{/gist_id}","starred_url":"https://api.github.com/users/mwobensmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwobensmith/subscriptions","organizations_url":"https://api.github.com/users/mwobensmith/orgs","repos_url":"https://api.github.com/users/mwobensmith/repos","events_url":"https://api.github.com/users/mwobensmith/events{/privacy}","received_events_url":"https://api.github.com/users/mwobensmith/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mwobensmith/firefox-ui-tests","description":"","fork":true,"url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests","forks_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/forks","keys_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/teams","hooks_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/hooks","issue_events_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/issues/events{/number}","events_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/events","assignees_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/assignees{/user}","branches_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/branches{/branch}","tags_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/tags","blobs_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/languages","stargazers_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/stargazers","contributors_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/contributors","subscribers_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/subscribers","subscription_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/subscription","commits_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/issues/comments/{number}","contents_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/contents/{+path}","compare_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/merges","archive_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/downloads","issues_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/issues{/number}","pulls_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/labels{/name}","releases_url":"https://api.github.com/repos/mwobensmith/firefox-ui-tests/releases{/id}","created_at":"2015-02-05T18:41:07Z","updated_at":"2015-02-06T23:45:41Z","pushed_at":"2015-02-06T23:45:41Z","git_url":"git://github.com/mwobensmith/firefox-ui-tests.git","ssh_url":"git@github.com:mwobensmith/firefox-ui-tests.git","clone_url":"https://github.com/mwobensmith/firefox-ui-tests.git","svn_url":"https://github.com/mwobensmith/firefox-ui-tests","homepage":null,"size":295,"stargazers_count":0,"watchers_count":0,"language":"Python","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:master","ref":"master","sha":"8c2dad20dc465795025565393cb364f9eaa3bca8","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":25004372,"name":"firefox-ui-tests","full_name":"mozilla/firefox-ui-tests","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/firefox-ui-tests","description":"","fork":false,"url":"https://api.github.com/repos/mozilla/firefox-ui-tests","forks_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/forks","keys_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/teams","hooks_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/hooks","issue_events_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/events","assignees_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/tags","blobs_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/languages","stargazers_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/stargazers","contributors_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/contributors","subscribers_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/subscribers","subscription_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/subscription","commits_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/merges","archive_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/downloads","issues_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/firefox-ui-tests/releases{/id}","created_at":"2014-10-09T19:09:05Z","updated_at":"2015-02-09T09:31:20Z","pushed_at":"2015-02-09T09:31:20Z","git_url":"git://github.com/mozilla/firefox-ui-tests.git","ssh_url":"git@github.com:mozilla/firefox-ui-tests.git","clone_url":"https://github.com/mozilla/firefox-ui-tests.git","svn_url":"https://github.com/mozilla/firefox-ui-tests","homepage":null,"size":1492,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":9,"forks":12,"open_issues":9,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/firefox-ui-tests/pulls/70"},"html":{"href":"https://github.com/mozilla/firefox-ui-tests/pull/70"},"issue":{"href":"https://api.github.com/repos/mozilla/firefox-ui-tests/issues/70"},"comments":{"href":"https://api.github.com/repos/mozilla/firefox-ui-tests/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/firefox-ui-tests/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/firefox-ui-tests/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/firefox-ui-tests/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/firefox-ui-tests/statuses/289e6fe3e9b0743b12cecd52159de8f926342b48"}}}}