Bug 1372237 - Balance the test/control groups for Flash rollout. The test group grows up from 0 as it always has. The control group grows down from 1, and everyone else is "exlucded" r?felipe draft
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 12 Jun 2017 10:59:43 -0400
changeset 592647 9057bd6a09ca1a7b51750289ff956d7a9dcb123c
parent 592640 9eb9e6b53887119997909f0b5e773138b76d8c7e
child 632883 83ef305119f6fc3bfa58148f0cd4940765205012
push id63454
push userbsmedberg@mozilla.com
push dateMon, 12 Jun 2017 15:00:03 +0000
reviewersfelipe
bugs1372237
milestone56.0a1
Bug 1372237 - Balance the test/control groups for Flash rollout. The test group grows up from 0 as it always has. The control group grows down from 1, and everyone else is "exlucded" r?felipe MozReview-Commit-ID: 6BlevKeLp6G
browser/extensions/clicktoplay-rollout/bootstrap.js
browser/extensions/clicktoplay-rollout/install.rdf.in
--- a/browser/extensions/clicktoplay-rollout/bootstrap.js
+++ b/browser/extensions/clicktoplay-rollout/bootstrap.js
@@ -72,24 +72,26 @@ function defineCohort() {
   switch (cohort) {
     case undefined:
     case "test":
     case "control":
     {
       // If it's either test/control, the cohort might have changed
       // if the desired sampling has been changed.
       let testThreshold = TEST_THRESHOLD[updateChannel];
-      let testGroup = (getUserSample(false) < testThreshold);
+      let userSample = getUserSample();
 
-      if (testGroup) {
+      if (userSample < testThreshold) {
         cohort = "test";
         let defaultPrefs = new Preferences({defaultBranch: true});
         defaultPrefs.set(PREF_FLASH_STATE, Ci.nsIPluginTag.STATE_CLICKTOPLAY);
+      } else if (userSample >= 1.0 - testThreshold) {
+        cohort = "control";
       } else {
-        cohort = "control";
+        cohort = "excluded";
       }
 
       setCohort(cohort);
       watchForPrefChanges();
       break;
     }
 
     case "early-adopter-ctp":
--- a/browser/extensions/clicktoplay-rollout/install.rdf.in
+++ b/browser/extensions/clicktoplay-rollout/install.rdf.in
@@ -5,17 +5,17 @@
 
 #filter substitution
 
 <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:em="http://www.mozilla.org/2004/em-rdf#">
 
   <Description about="urn:mozilla:install-manifest">
     <em:id>clicktoplay-rollout@mozilla.org</em:id>
-    <em:version>1.0</em:version>
+    <em:version>1.1</em:version>
     <em:type>2</em:type>
     <em:bootstrap>true</em:bootstrap>
     <em:multiprocessCompatible>true</em:multiprocessCompatible>
 
     <!-- Target Application this theme can install into,
         with minimum and maximum supported versions. -->
     <em:targetApplication>
       <Description>