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
--- 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>