{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/comments/38824411","id":38824411,"diff_hunk":"@@ -0,0 +1,107 @@\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+define([\n+  'underscore',\n+  'lib/url',\n+  'lib/experiments/open-gmail',\n+  'lib/experiments/mailcheck',\n+  'lib/experiments/coppa-view',\n+  'lib/experiments/sync-checkbox'\n+], function (_, Url, OpenGmailExperiment, MailcheckExperiment, CoppaExperiment, SyncCheckbox) {\n+  'use strict';\n+\n+  var UA_OVERRIDE = 'FxATester';\n+  var CHOOSE_ABLE_EXPERIMENT = 'chooseAbExperiment';\n+  var FORCE_EXPERIMENT_PARAM = 'forceExperiment';\n+  // all available experiments that must be independent for A/B testing purposes.\n+  var DEFAULT_EXPERIMENTS = {\n+    'openGmail': OpenGmailExperiment,\n+    'mailcheck': MailcheckExperiment,\n+    'coppaView': CoppaExperiment,\n+    'syncCheckbox': SyncCheckbox\n+  };\n+\n+  function ExperimentInterface (options) {\n+    if (! options || ! options.window || ! options.able || ! options.metrics || ! options.user || ! options.notifications) {\n+      this.initialized = false;\n+      return;\n+    }\n+\n+    this.window = options.window;\n+    var agent = this.window.navigator.userAgent;\n+    this.forceExperiment = Url.searchParam(FORCE_EXPERIMENT_PARAM, this.window.location.search);\n+\n+    // if this is running in functional test mode then we do not want any unpredictable experiments\n+    if (agent.indexOf(UA_OVERRIDE) >= 0 && ! this.forceExperiment) {","path":"app/scripts/lib/experiment.js","position":37,"original_position":37,"commit_id":"da36eea170e5a7b14e60ec36cb469e3714e26c74","original_commit_id":"da36eea170e5a7b14e60ec36cb469e3714e26c74","user":{"login":"shane-tomlinson","id":848085,"avatar_url":"https://avatars.githubusercontent.com/u/848085?v=3","gravatar_id":"","url":"https://api.github.com/users/shane-tomlinson","html_url":"https://github.com/shane-tomlinson","followers_url":"https://api.github.com/users/shane-tomlinson/followers","following_url":"https://api.github.com/users/shane-tomlinson/following{/other_user}","gists_url":"https://api.github.com/users/shane-tomlinson/gists{/gist_id}","starred_url":"https://api.github.com/users/shane-tomlinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shane-tomlinson/subscriptions","organizations_url":"https://api.github.com/users/shane-tomlinson/orgs","repos_url":"https://api.github.com/users/shane-tomlinson/repos","events_url":"https://api.github.com/users/shane-tomlinson/events{/privacy}","received_events_url":"https://api.github.com/users/shane-tomlinson/received_events","type":"User","site_admin":false},"body":"Can you make a quick doc about the functional tests set a special user agent string, otherwise this comment lacks a little context and I'll forget what's going on 6 months from now. As an aside, is that special UA string set universally, or only for a certain set of tests?","created_at":"2015-09-06T18:19:46Z","updated_at":"2015-09-06T18:19:46Z","html_url":"https://github.com/mozilla/fxa-content-server/pull/2943#discussion_r38824411","pull_request_url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/2943","_links":{"self":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/comments/38824411"},"html":{"href":"https://github.com/mozilla/fxa-content-server/pull/2943#discussion_r38824411"},"pull_request":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/2943"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/2943","id":42316957,"html_url":"https://github.com/mozilla/fxa-content-server/pull/2943","diff_url":"https://github.com/mozilla/fxa-content-server/pull/2943.diff","patch_url":"https://github.com/mozilla/fxa-content-server/pull/2943.patch","issue_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/2943","number":2943,"state":"open","locked":false,"title":"feat(verification): organize verification experiments","user":{"login":"vladikoff","id":128755,"avatar_url":"https://avatars.githubusercontent.com/u/128755?v=3","gravatar_id":"","url":"https://api.github.com/users/vladikoff","html_url":"https://github.com/vladikoff","followers_url":"https://api.github.com/users/vladikoff/followers","following_url":"https://api.github.com/users/vladikoff/following{/other_user}","gists_url":"https://api.github.com/users/vladikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/vladikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladikoff/subscriptions","organizations_url":"https://api.github.com/users/vladikoff/orgs","repos_url":"https://api.github.com/users/vladikoff/repos","events_url":"https://api.github.com/users/vladikoff/events{/privacy}","received_events_url":"https://api.github.com/users/vladikoff/received_events","type":"User","site_admin":false},"body":"Fixes #2673 \r\n\r\n### Old Chart: https://www.lucidchart.com/documents/edit/14e5d8e2-4610-4dba-ad18-9a4f53c91061\r\n### MANA: https://mana.mozilla.org/wiki/display/CLOUDSERVICES/Detailed+Experiment+Reports\r\n### Depends on https://github.com/mozilla/fxa-content-experiments/pull/28","created_at":"2015-08-13T05:47:56Z","updated_at":"2015-09-06T18:19:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52dfbcb7cd409b34cf5c19c1f2bea59d0cc938ac","assignee":{"login":"shane-tomlinson","id":848085,"avatar_url":"https://avatars.githubusercontent.com/u/848085?v=3","gravatar_id":"","url":"https://api.github.com/users/shane-tomlinson","html_url":"https://github.com/shane-tomlinson","followers_url":"https://api.github.com/users/shane-tomlinson/followers","following_url":"https://api.github.com/users/shane-tomlinson/following{/other_user}","gists_url":"https://api.github.com/users/shane-tomlinson/gists{/gist_id}","starred_url":"https://api.github.com/users/shane-tomlinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shane-tomlinson/subscriptions","organizations_url":"https://api.github.com/users/shane-tomlinson/orgs","repos_url":"https://api.github.com/users/shane-tomlinson/repos","events_url":"https://api.github.com/users/shane-tomlinson/events{/privacy}","received_events_url":"https://api.github.com/users/shane-tomlinson/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mozilla/fxa-content-server/milestones/64","html_url":"https://github.com/mozilla/fxa-content-server/milestones/FxA-0:%20quality","labels_url":"https://api.github.com/repos/mozilla/fxa-content-server/milestones/64/labels","id":1265659,"number":64,"title":"FxA-0: quality","description":"An ongoing milestone into which we can schedule maintenance tasks, tech-debt paydown, and other code-quality-related issues.","creator":{"login":"rfk","id":34695,"avatar_url":"https://avatars.githubusercontent.com/u/34695?v=3","gravatar_id":"","url":"https://api.github.com/users/rfk","html_url":"https://github.com/rfk","followers_url":"https://api.github.com/users/rfk/followers","following_url":"https://api.github.com/users/rfk/following{/other_user}","gists_url":"https://api.github.com/users/rfk/gists{/gist_id}","starred_url":"https://api.github.com/users/rfk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfk/subscriptions","organizations_url":"https://api.github.com/users/rfk/orgs","repos_url":"https://api.github.com/users/rfk/repos","events_url":"https://api.github.com/users/rfk/events{/privacy}","received_events_url":"https://api.github.com/users/rfk/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":2,"state":"open","created_at":"2015-08-21T02:49:53Z","updated_at":"2015-09-04T06:18:52Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/2943/commits","review_comments_url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/2943/comments","review_comment_url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/2943/comments","statuses_url":"https://api.github.com/repos/mozilla/fxa-content-server/statuses/da36eea170e5a7b14e60ec36cb469e3714e26c74","head":{"label":"vladikoff:i2673-gmail-button","ref":"i2673-gmail-button","sha":"da36eea170e5a7b14e60ec36cb469e3714e26c74","user":{"login":"vladikoff","id":128755,"avatar_url":"https://avatars.githubusercontent.com/u/128755?v=3","gravatar_id":"","url":"https://api.github.com/users/vladikoff","html_url":"https://github.com/vladikoff","followers_url":"https://api.github.com/users/vladikoff/followers","following_url":"https://api.github.com/users/vladikoff/following{/other_user}","gists_url":"https://api.github.com/users/vladikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/vladikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladikoff/subscriptions","organizations_url":"https://api.github.com/users/vladikoff/orgs","repos_url":"https://api.github.com/users/vladikoff/repos","events_url":"https://api.github.com/users/vladikoff/events{/privacy}","received_events_url":"https://api.github.com/users/vladikoff/received_events","type":"User","site_admin":false},"repo":{"id":15786683,"name":"fxa-content-server","full_name":"vladikoff/fxa-content-server","owner":{"login":"vladikoff","id":128755,"avatar_url":"https://avatars.githubusercontent.com/u/128755?v=3","gravatar_id":"","url":"https://api.github.com/users/vladikoff","html_url":"https://github.com/vladikoff","followers_url":"https://api.github.com/users/vladikoff/followers","following_url":"https://api.github.com/users/vladikoff/following{/other_user}","gists_url":"https://api.github.com/users/vladikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/vladikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladikoff/subscriptions","organizations_url":"https://api.github.com/users/vladikoff/orgs","repos_url":"https://api.github.com/users/vladikoff/repos","events_url":"https://api.github.com/users/vladikoff/events{/privacy}","received_events_url":"https://api.github.com/users/vladikoff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vladikoff/fxa-content-server","description":"Firefox Accounts","fork":true,"url":"https://api.github.com/repos/vladikoff/fxa-content-server","forks_url":"https://api.github.com/repos/vladikoff/fxa-content-server/forks","keys_url":"https://api.github.com/repos/vladikoff/fxa-content-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vladikoff/fxa-content-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vladikoff/fxa-content-server/teams","hooks_url":"https://api.github.com/repos/vladikoff/fxa-content-server/hooks","issue_events_url":"https://api.github.com/repos/vladikoff/fxa-content-server/issues/events{/number}","events_url":"https://api.github.com/repos/vladikoff/fxa-content-server/events","assignees_url":"https://api.github.com/repos/vladikoff/fxa-content-server/assignees{/user}","branches_url":"https://api.github.com/repos/vladikoff/fxa-content-server/branches{/branch}","tags_url":"https://api.github.com/repos/vladikoff/fxa-content-server/tags","blobs_url":"https://api.github.com/repos/vladikoff/fxa-content-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vladikoff/fxa-content-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vladikoff/fxa-content-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/vladikoff/fxa-content-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vladikoff/fxa-content-server/statuses/{sha}","languages_url":"https://api.github.com/repos/vladikoff/fxa-content-server/languages","stargazers_url":"https://api.github.com/repos/vladikoff/fxa-content-server/stargazers","contributors_url":"https://api.github.com/repos/vladikoff/fxa-content-server/contributors","subscribers_url":"https://api.github.com/repos/vladikoff/fxa-content-server/subscribers","subscription_url":"https://api.github.com/repos/vladikoff/fxa-content-server/subscription","commits_url":"https://api.github.com/repos/vladikoff/fxa-content-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/vladikoff/fxa-content-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/vladikoff/fxa-content-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/vladikoff/fxa-content-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/vladikoff/fxa-content-server/contents/{+path}","compare_url":"https://api.github.com/repos/vladikoff/fxa-content-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vladikoff/fxa-content-server/merges","archive_url":"https://api.github.com/repos/vladikoff/fxa-content-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vladikoff/fxa-content-server/downloads","issues_url":"https://api.github.com/repos/vladikoff/fxa-content-server/issues{/number}","pulls_url":"https://api.github.com/repos/vladikoff/fxa-content-server/pulls{/number}","milestones_url":"https://api.github.com/repos/vladikoff/fxa-content-server/milestones{/number}","notifications_url":"https://api.github.com/repos/vladikoff/fxa-content-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vladikoff/fxa-content-server/labels{/name}","releases_url":"https://api.github.com/repos/vladikoff/fxa-content-server/releases{/id}","created_at":"2014-01-10T02:53:37Z","updated_at":"2015-04-02T19:22:44Z","pushed_at":"2015-09-05T19:03:08Z","git_url":"git://github.com/vladikoff/fxa-content-server.git","ssh_url":"git@github.com:vladikoff/fxa-content-server.git","clone_url":"https://github.com/vladikoff/fxa-content-server.git","svn_url":"https://github.com/vladikoff/fxa-content-server","homepage":"","size":11769,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"0d9f7bb608a13ea69d6c53181272ac783146aaf8","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":11778024,"name":"fxa-content-server","full_name":"mozilla/fxa-content-server","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/fxa-content-server","description":"Firefox Accounts Content Server","fork":false,"url":"https://api.github.com/repos/mozilla/fxa-content-server","forks_url":"https://api.github.com/repos/mozilla/fxa-content-server/forks","keys_url":"https://api.github.com/repos/mozilla/fxa-content-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/fxa-content-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/fxa-content-server/teams","hooks_url":"https://api.github.com/repos/mozilla/fxa-content-server/hooks","issue_events_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/fxa-content-server/events","assignees_url":"https://api.github.com/repos/mozilla/fxa-content-server/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/fxa-content-server/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/fxa-content-server/tags","blobs_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/fxa-content-server/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/fxa-content-server/languages","stargazers_url":"https://api.github.com/repos/mozilla/fxa-content-server/stargazers","contributors_url":"https://api.github.com/repos/mozilla/fxa-content-server/contributors","subscribers_url":"https://api.github.com/repos/mozilla/fxa-content-server/subscribers","subscription_url":"https://api.github.com/repos/mozilla/fxa-content-server/subscription","commits_url":"https://api.github.com/repos/mozilla/fxa-content-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/fxa-content-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/fxa-content-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/fxa-content-server/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/fxa-content-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/fxa-content-server/merges","archive_url":"https://api.github.com/repos/mozilla/fxa-content-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/fxa-content-server/downloads","issues_url":"https://api.github.com/repos/mozilla/fxa-content-server/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/fxa-content-server/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/fxa-content-server/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/fxa-content-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/fxa-content-server/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/fxa-content-server/releases{/id}","created_at":"2013-07-30T23:35:35Z","updated_at":"2015-08-31T00:04:54Z","pushed_at":"2015-09-05T19:03:11Z","git_url":"git://github.com/mozilla/fxa-content-server.git","ssh_url":"git@github.com:mozilla/fxa-content-server.git","clone_url":"https://github.com/mozilla/fxa-content-server.git","svn_url":"https://github.com/mozilla/fxa-content-server","homepage":"","size":28707,"stargazers_count":73,"watchers_count":73,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":180,"forks":48,"open_issues":180,"watchers":73,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/2943"},"html":{"href":"https://github.com/mozilla/fxa-content-server/pull/2943"},"issue":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/issues/2943"},"comments":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/issues/2943/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/2943/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/pulls/2943/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/fxa-content-server/statuses/da36eea170e5a7b14e60ec36cb469e3714e26c74"}}}}