Bug 1483378 - Part 5: Remove the old Cookies & Site Data UI; r=johannh,flod
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 17 Aug 2018 15:23:22 -0400
changeset 432382 b3c038572979338ba2feae669ac7567f11c3264e
parent 432381 3b5f60a54a1276e1c76f7d4291c02e9e936e544e
child 432383 8ceb8813cc1d7beb81e044d411c0bac6babea9da
push id106719
push usereakhgari@mozilla.com
push dateMon, 20 Aug 2018 15:42:45 +0000
treeherdermozilla-inbound@b3c038572979 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh, flod
bugs1483378
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1483378 - Part 5: Remove the old Cookies & Site Data UI; r=johannh,flod
browser/app/profile/firefox.js
browser/components/enterprisepolicies/tests/browser/browser_policy_cookie_settings.js
browser/components/preferences/in-content/privacy.js
browser/components/preferences/in-content/privacy.xul
browser/components/preferences/in-content/tests/browser.ini
browser/components/preferences/in-content/tests/browser_privacypane_1.js
browser/components/preferences/in-content/tests/browser_privacypane_2.js
browser/components/preferences/in-content/tests/browser_privacypane_4.js
browser/components/preferences/in-content/tests/privacypane_tests_perwindow.js
browser/locales/en-US/browser/preferences/preferences.ftl
browser/themes/shared/incontentprefs/preferences.inc.css
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1483,24 +1483,23 @@ pref("browser.ping-centre.telemetry", tr
 pref("browser.ping-centre.log", false);
 pref("browser.ping-centre.staging.endpoint", "https://onyx_tiles.stage.mozaws.net/v3/links/ping-centre");
 pref("browser.ping-centre.production.endpoint", "https://tiles.services.mozilla.com/v3/links/ping-centre");
 
 // Enable GMP support in the addon manager.
 pref("media.gmp-provider.enabled", true);
 
 pref("browser.contentblocking.enabled", true);
-pref("browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled", true);
 pref("browser.contentblocking.cookies-site-data.ui.reject-trackers.recommended", true);
 #ifdef NIGHTLY_BUILD
 pref("browser.contentblocking.ui.enabled", true);
-pref("browser.contentblocking.cookies-site-data.ui.enabled", true);
+pref("browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled", true);
 #else
 pref("browser.contentblocking.ui.enabled", false);
-pref("browser.contentblocking.cookies-site-data.ui.enabled", false);
+pref("browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled", false);
 #endif
 #ifdef NIGHTLY_BUILD
 pref("browser.contentblocking.reportBreakage.enabled", true);
 #else
 pref("browser.contentblocking.reportBreakage.enabled", false);
 #endif
 pref("browser.contentblocking.reportBreakage.url", "https://tracking-protection-issues.herokuapp.com/new");
 
--- a/browser/components/enterprisepolicies/tests/browser/browser_policy_cookie_settings.js
+++ b/browser/components/enterprisepolicies/tests/browser/browser_policy_cookie_settings.js
@@ -83,30 +83,26 @@ async function test_cookie_settings({
   is(Services.prefs.prefIsLocked("network.cookie.cookieBehavior"), cookieSettingsLocked,
      "Cookie behavior pref lock status should be what is expected");
   is(Services.prefs.prefIsLocked("network.cookie.lifetimePolicy"), cookieSettingsLocked,
      "Cookie lifetime pref lock status should be what is expected");
 
   let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "about:preferences");
   // eslint-disable-next-line no-shadow
   await ContentTask.spawn(tab.linkedBrowser, {cookiesEnabled, cookieSettingsLocked}, async function({cookiesEnabled, cookieSettingsLocked}) {
-    let acceptThirdPartyLabel = content.document.getElementById("acceptThirdPartyLabel");
-    let acceptThirdPartyMenu = content.document.getElementById("acceptThirdPartyMenu");
-    let keepUntilLabel = content.document.getElementById("keepUntil");
-    let keepUntilMenu = content.document.getElementById("keepCookiesUntil");
+    content.setTimeout(() => {
+      let keepUntilLabel = content.document.getElementById("keepUntil");
+      let keepUntilMenu = content.document.getElementById("keepCookiesUntil");
 
-    let expectControlsDisabled = !cookiesEnabled || cookieSettingsLocked;
-    is(acceptThirdPartyLabel.disabled, expectControlsDisabled,
-       "\"Accept Third Party Cookies\" Label disabled status should match expected");
-    is(acceptThirdPartyMenu.disabled, expectControlsDisabled,
-       "\"Accept Third Party Cookies\" Menu disabled status should match expected");
-    is(keepUntilLabel.disabled, expectControlsDisabled,
-       "\"Keep Cookies Until\" Label disabled status should match expected");
-    is(keepUntilMenu.disabled, expectControlsDisabled,
-       "\"Keep Cookies Until\" Menu disabled status should match expected");
+      let expectControlsDisabled = !cookiesEnabled || cookieSettingsLocked;
+      is(keepUntilLabel.disabled, expectControlsDisabled,
+         "\"Keep Cookies Until\" Label disabled status should match expected");
+      is(keepUntilMenu.disabled, expectControlsDisabled,
+         "\"Keep Cookies Until\" Menu disabled status should match expected");
+    }, 0);
   });
   BrowserTestUtils.removeTab(tab);
 
   if (rejectTrackers) {
     tab = await BrowserTestUtils.addTab(gBrowser, "http://example.net/browser/browser/components/enterprisepolicies/tests/browser/page.html");
     let browser = gBrowser.getBrowserForTab(tab);
     await BrowserTestUtils.browserLoaded(browser);
     await ContentTask.spawn(tab.linkedBrowser, {}, async function() {
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -18,19 +18,16 @@ ChromeUtils.defineModuleGetter(this, "Lo
 ChromeUtils.defineModuleGetter(this, "SiteDataManager",
   "resource:///modules/SiteDataManager.jsm");
 
 ChromeUtils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingUiEnabled",
                                       "browser.contentblocking.ui.enabled");
 
-XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingCookiesAndSiteDataUiEnabled",
-                                      "browser.contentblocking.cookies-site-data.ui.enabled");
-
 XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingCookiesAndSiteDataRejectTrackersRecommended",
                                       "browser.contentblocking.cookies-site-data.ui.reject-trackers.recommended");
 
 XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingCookiesAndSiteDataRejectTrackersEnabled",
                                       "browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled");
 
 XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingEnabled",
                                       "browser.contentblocking.enabled");
@@ -506,43 +503,25 @@ var gPrivacyPane = {
       "trackingProtectionHeader": false,
       "trackingProtectionDescription": false,
       "trackingProtectionBox": false,
     };
     for (let id in visibleState) {
       document.getElementById(id).hidden = contentBlockingUiEnabled != visibleState[id];
     }
 
-    // Now, update the cookies & site data UI.
-    visibleState = {
-      "acceptCookies": false,
-      "blockCookies": true,
-    };
-    for (let id in visibleState) {
-      document.getElementById(id).hidden = contentBlockingCookiesAndSiteDataUiEnabled != visibleState[id];
+    // Allow turning off the "(recommended)" label using a pref
+    let blockCookiesFromTrackers = document.getElementById("blockCookiesFromTrackers");
+    if (contentBlockingCookiesAndSiteDataRejectTrackersRecommended) {
+      document.l10n.setAttributes(blockCookiesFromTrackers, "sitedata-block-trackers-option-recommended");
     }
-    if (contentBlockingCookiesAndSiteDataUiEnabled) {
-      // The Keep Until row doesn't change in the new UI, so we just transplant it
-      // from the old UI by moving it in the DOM!
-      let keepUntil = document.getElementById("keepRow");
-      document.getElementById("acceptCookies").removeChild(keepUntil);
-      let blockThirdPartyRow = document.getElementById("blockThirdPartyRow");
-      document.getElementById("blockCookies").appendChild(keepUntil);
-      keepUntil.classList.remove("indent"); // drop the indentation
-      keepUntil.setAttribute("style", "margin-top: 1em"); // apply a margin
 
-      // Allow turning off the "(recommended)" label using a pref
-      let blockCookiesFromTrackers = document.getElementById("blockCookiesFromTrackers");
-      if (contentBlockingCookiesAndSiteDataRejectTrackersRecommended) {
-        document.l10n.setAttributes(blockCookiesFromTrackers, "sitedata-block-trackers-option-recommended");
-      }
-      // Allow hiding the Reject Trackers option based on a pref
-      if (!contentBlockingCookiesAndSiteDataRejectTrackersEnabled) {
-        blockCookiesFromTrackers.remove();
-      }
+    // Allow hiding the Reject Trackers option based on a pref
+    if (!contentBlockingCookiesAndSiteDataRejectTrackersEnabled) {
+      blockCookiesFromTrackers.remove();
     }
   },
 
   /**
    * Updates the preferences UI to reflect the browser.contentblocking.enabled pref.
    * This affects the button to toggle the pref and the disabled state of the dependent controls.
    */
   updateContentBlockingToggle() {
@@ -807,17 +786,16 @@ var gPrivacyPane = {
   /**
    * Update the privacy micro-management controls based on the
    * value of the private browsing auto-start preference.
    */
   updatePrivacyMicroControls() {
     // Set "Keep cookies until..." to "I close Nightly" and disable the setting
     // when we're in auto private mode (or reset it back otherwise).
     document.getElementById("keepCookiesUntil").value = this.readKeepCookiesUntil();
-    this.readAcceptCookies();
 
     let clearDataSettings = document.getElementById("clearDataSettings");
 
     if (document.getElementById("historyMode").value == "custom") {
       let disabled = Preferences.get("browser.privatebrowsing.autostart").value;
       this.dependentControls.forEach(function(aElement) {
         let control = document.getElementById(aElement);
         let preferenceId = control.getAttribute("preference");
@@ -1013,94 +991,16 @@ var gPrivacyPane = {
 
     // network.cookie.lifetimePolicy can be set to any value, but we just
     // support ACCEPT_SESSION and ACCEPT_NORMALLY. Let's force ACCEPT_NORMALLY.
     return Ci.nsICookieService.ACCEPT_NORMALLY;
   },
 
   /**
    * Reads the network.cookie.cookieBehavior preference value and
-   * enables/disables the rest of the cookie UI accordingly.
-   *
-   * Returns "0" if cookies are accepted and "2" if they are entirely disabled.
-   */
-  readAcceptCookies() {
-    let pref = Preferences.get("network.cookie.cookieBehavior");
-    let acceptThirdPartyLabel = document.getElementById("acceptThirdPartyLabel");
-    let acceptThirdPartyMenu = document.getElementById("acceptThirdPartyMenu");
-    let keepUntilLabel = document.getElementById("keepUntil");
-    let keepUntilMenu = document.getElementById("keepCookiesUntil");
-
-    // enable the rest of the UI for anything other than "disable all cookies"
-    let acceptCookies = (pref.value != 2);
-    let cookieBehaviorLocked = Services.prefs.prefIsLocked("network.cookie.cookieBehavior");
-    const acceptThirdPartyControlsDisabled = !acceptCookies || cookieBehaviorLocked;
-
-    acceptThirdPartyLabel.disabled = acceptThirdPartyMenu.disabled = acceptThirdPartyControlsDisabled;
-
-    let privateBrowsing = Preferences.get("browser.privatebrowsing.autostart").value;
-    let cookieExpirationLocked = Services.prefs.prefIsLocked("network.cookie.lifetimePolicy");
-    const keepUntilControlsDisabled = privateBrowsing || !acceptCookies || cookieExpirationLocked;
-    keepUntilLabel.disabled = keepUntilMenu.disabled = keepUntilControlsDisabled;
-
-    // Our top-level setting is a radiogroup that only sets "enable all"
-    // and "disable all", so convert the pref value accordingly.
-    return acceptCookies ? "0" : "2";
-  },
-
-  /**
-   * Updates the "accept third party cookies" menu based on whether the
-   * "accept cookies" or "block cookies" radio buttons are selected.
-   */
-  writeAcceptCookies() {
-    var accept = document.getElementById("acceptCookies");
-    var acceptThirdPartyMenu = document.getElementById("acceptThirdPartyMenu");
-
-    // if we're enabling cookies, automatically select 'accept third party always'
-    if (accept.value == "0")
-      acceptThirdPartyMenu.selectedIndex = 0;
-
-    return parseInt(accept.value, 10);
-  },
-
-  /**
-   * Converts between network.cookie.cookieBehavior and the third-party cookie UI
-   */
-  readAcceptThirdPartyCookies() {
-    var pref = Preferences.get("network.cookie.cookieBehavior");
-    switch (pref.value) {
-      case Ci.nsICookieService.BEHAVIOR_ACCEPT:
-        return "always";
-      case Ci.nsICookieService.BEHAVIOR_REJECT_FOREIGN:
-        return "never";
-      case Ci.nsICookieService.BEHAVIOR_REJECT:
-        return "never";
-      case Ci.nsICookieService.BEHAVIOR_LIMIT_FOREIGN:
-        return "visited";
-      default:
-        return undefined;
-    }
-  },
-
-  writeAcceptThirdPartyCookies() {
-    var accept = document.getElementById("acceptThirdPartyMenu").selectedItem;
-    switch (accept.value) {
-      case "always":
-        return Ci.nsICookieService.BEHAVIOR_ACCEPT;
-      case "visited":
-        return Ci.nsICookieService.BEHAVIOR_LIMIT_FOREIGN;
-      case "never":
-        return Ci.nsICookieService.BEHAVIOR_REJECT_FOREIGN;
-      default:
-        return undefined;
-    }
-  },
-
-  /**
-   * Reads the network.cookie.cookieBehavior preference value and
    * enables/disables the rest of the new cookie & site data UI accordingly.
    *
    * Returns "allow" if cookies are accepted and "disallow" if they are entirely
    * disabled.
    */
   readBlockCookies() {
     // enable the rest of the UI for anything other than "accept all cookies"
     let pref = Preferences.get("network.cookie.cookieBehavior");
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -167,65 +167,16 @@
 
   <hbox data-subcategory="sitedata" align="baseline">
     <vbox flex="1">
       <description class="description-with-side-element" flex="1">
         <html:span id="totalSiteDataSize" class="tail-with-learn-more"></html:span>
         <label id="siteDataLearnMoreLink"
           class="learnMore text-link" data-l10n-id="sitedata-learn-more"/>
       </description>
-      <radiogroup id="acceptCookies"
-                  preference="network.cookie.cookieBehavior"
-                  onsyncfrompreference="return gPrivacyPane.readAcceptCookies();"
-                  onsynctopreference="return gPrivacyPane.writeAcceptCookies();">
-        <hbox id="cookiesBox">
-          <radio value="0"
-                 data-l10n-id="sitedata-accept-cookies-option"
-                 flex="1" />
-        </hbox>
-        <hbox id="keepRow"
-              class="indent"
-              align="center">
-          <label id="keepUntil"
-                 control="keepCookiesUntil"
-                 data-l10n-id="sitedata-keep-until"/>
-          <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
-          <hbox>
-            <menulist id="keepCookiesUntil"
-                      onsyncfrompreference="return gPrivacyPane.readKeepCookiesUntil();"
-                      preference="network.cookie.lifetimePolicy">
-              <menupopup>
-                <menuitem data-l10n-id="sitedata-keep-until-expire" value="0"/>
-                <menuitem data-l10n-id="sitedata-keep-until-closed" value="2"/>
-              </menupopup>
-            </menulist>
-          </hbox>
-        </hbox>
-        <hbox id="acceptThirdPartyRow"
-              class="indent"
-              align="center">
-          <label id="acceptThirdPartyLabel" control="acceptThirdPartyMenu"
-                 data-l10n-id="sitedata-accept-third-party-desc"/>
-          <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
-          <hbox>
-            <menulist id="acceptThirdPartyMenu" preference="network.cookie.cookieBehavior"
-            onsyncfrompreference="return gPrivacyPane.readAcceptThirdPartyCookies();"
-            onsynctopreference="return gPrivacyPane.writeAcceptThirdPartyCookies();">
-              <menupopup>
-                <menuitem data-l10n-id="sitedata-accept-third-party-always-option" value="always"/>
-                <menuitem data-l10n-id="sitedata-accept-third-party-visited-option" value="visited"/>
-                <menuitem data-l10n-id="sitedata-accept-third-party-never-option" value="never"/>
-              </menupopup>
-            </menulist>
-          </hbox>
-        </hbox>
-        <radio data-l10n-id="sitedata-block-cookies-option"
-               value="2"
-               flex="1" />
-      </radiogroup>
       <radiogroup id="blockCookies"
                   preference="network.cookie.cookieBehavior"
                   onsyncfrompreference="return gPrivacyPane.readBlockCookies();"
                   onsynctopreference="return gPrivacyPane.writeBlockCookies();">
         <radio value="allow"
                data-l10n-id="sitedata-allow-cookies-option"
                flex="1" />
         <radio value="disallow"
@@ -245,16 +196,33 @@
                 <menuitem id="blockCookiesFromTrackers" data-l10n-id="sitedata-block-trackers-option" value="trackers"/>
                 <menuitem data-l10n-id="sitedata-block-unvisited-option" value="unvisited"/>
                 <menuitem data-l10n-id="sitedata-block-all-third-parties-option" value="all-third-parties"/>
                 <menuitem data-l10n-id="sitedata-block-always-option" value="always"/>
               </menupopup>
             </menulist>
           </hbox>
         </hbox>
+        <hbox id="keepRow"
+              align="center">
+          <label id="keepUntil"
+                 control="keepCookiesUntil"
+                 data-l10n-id="sitedata-keep-until"/>
+          <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
+          <hbox>
+            <menulist id="keepCookiesUntil"
+                      onsyncfrompreference="return gPrivacyPane.readKeepCookiesUntil();"
+                      preference="network.cookie.lifetimePolicy">
+              <menupopup>
+                <menuitem data-l10n-id="sitedata-keep-until-expire" value="0"/>
+                <menuitem data-l10n-id="sitedata-keep-until-closed" value="2"/>
+              </menupopup>
+            </menulist>
+          </hbox>
+        </hbox>
       </radiogroup>
     </vbox>
     <vbox>
       <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
       <hbox>
         <button id="clearSiteDataButton"
             class="accessory-button"
             icon="clear"
--- a/browser/components/preferences/in-content/tests/browser.ini
+++ b/browser/components/preferences/in-content/tests/browser.ini
@@ -63,17 +63,16 @@ skip-if = !e10s
 skip-if = e10s
 [browser_permissions_urlFieldHidden.js]
 [browser_proxy_backup.js]
 [browser_privacypane.js]
 run-if = nightly_build
 # browser_privacypane.js only has Browser Error collection tests currently,
 # which is disabled outside Nightly. Remove this once non-Nightly tests are
 # added.
-[browser_privacypane_1.js]
 [browser_privacypane_2.js]
 [browser_privacypane_3.js]
 [browser_privacypane_4.js]
 [browser_privacypane_5.js]
 [browser_sanitizeOnShutdown_prefLocked.js]
 [browser_searchShowSuggestionsFirst.js]
 [browser_searchsuggestions.js]
 [browser_security-1.js]
deleted file mode 100644
--- a/browser/components/preferences/in-content/tests/browser_privacypane_1.js
+++ /dev/null
@@ -1,20 +0,0 @@
-let rootDir = getRootDirectory(gTestPath);
-let jar = getJar(rootDir);
-if (jar) {
-  let tmpdir = extractJarToTmp(jar);
-  rootDir = "file://" + tmpdir.path + "/";
-}
-/* import-globals-from privacypane_tests_perwindow.js */
-Services.scriptloader.loadSubScript(rootDir + "privacypane_tests_perwindow.js", this);
-
-SpecialPowers.pushPrefEnv({"set":
-  [["browser.contentblocking.cookies-site-data.ui.enabled", false]]
-});
-
-run_test_subset([
-  test_pane_visibility,
-  test_dependent_elements,
-  test_dependent_cookie_elements,
-  test_dependent_clearonclose_elements,
-  test_dependent_prefs,
-]);
--- a/browser/components/preferences/in-content/tests/browser_privacypane_2.js
+++ b/browser/components/preferences/in-content/tests/browser_privacypane_2.js
@@ -3,18 +3,17 @@ let jar = getJar(rootDir);
 if (jar) {
   let tmpdir = extractJarToTmp(jar);
   rootDir = "file://" + tmpdir.path + "/";
 }
 /* import-globals-from privacypane_tests_perwindow.js */
 Services.scriptloader.loadSubScript(rootDir + "privacypane_tests_perwindow.js", this);
 
 SpecialPowers.pushPrefEnv({"set":
-  [["browser.contentblocking.cookies-site-data.ui.enabled", true],
-   ["browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled", true]]
+  [["browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled", false]]
 });
 
 run_test_subset([
   test_pane_visibility,
   test_dependent_elements,
   test_dependent_cookie_elements,
   test_dependent_clearonclose_elements,
   test_dependent_prefs,
--- a/browser/components/preferences/in-content/tests/browser_privacypane_4.js
+++ b/browser/components/preferences/in-content/tests/browser_privacypane_4.js
@@ -3,18 +3,17 @@ let jar = getJar(rootDir);
 if (jar) {
   let tmpdir = extractJarToTmp(jar);
   rootDir = "file://" + tmpdir.path + "/";
 }
 /* import-globals-from privacypane_tests_perwindow.js */
 Services.scriptloader.loadSubScript(rootDir + "privacypane_tests_perwindow.js", this);
 
 SpecialPowers.pushPrefEnv({"set":
-  [["browser.contentblocking.cookies-site-data.ui.enabled", true],
-   ["browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled", false]]
+  [["browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled", false]]
 });
 
 run_test_subset([
   test_pane_visibility,
   test_dependent_elements,
   test_dependent_cookie_elements,
   test_dependent_clearonclose_elements,
   test_dependent_prefs,
--- a/browser/components/preferences/in-content/tests/privacypane_tests_perwindow.js
+++ b/browser/components/preferences/in-content/tests/privacypane_tests_perwindow.js
@@ -49,21 +49,17 @@ function test_dependent_elements(win) {
     win.document.getElementById("keepUntil"),
     win.document.getElementById("keepCookiesUntil"),
     win.document.getElementById("alwaysClear"),
   ];
   controls.forEach(function(control) {
     ok(control, "the dependent controls should exist");
   });
   let independents = [
-    win.contentBlockingCookiesAndSiteDataUiEnabled ?
-      win.document.getElementById("blockCookies") :
-      win.document.getElementById("acceptCookies"),
-    win.document.getElementById("acceptThirdPartyLabel"),
-    win.document.getElementById("acceptThirdPartyMenu")
+    win.document.getElementById("blockCookies")
   ];
   independents.forEach(function(control) {
     ok(control, "the independent controls should exist");
   });
   let cookieexceptions = win.document.getElementById("cookieExceptions");
   ok(cookieexceptions, "the cookie exceptions button should exist");
   let keepuntil = win.document.getElementById("keepCookiesUntil");
   ok(keepuntil, "the keep cookies until menulist should exist");
@@ -115,88 +111,63 @@ function test_dependent_elements(win) {
   controlChanged(historymode);
   expect_disabled(false);
   check_independents(false);
 }
 
 function test_dependent_cookie_elements(win) {
   let keepUntil = win.document.getElementById("keepUntil");
   let keepCookiesUntil = win.document.getElementById("keepCookiesUntil");
-  let acceptThirdPartyLabel = win.document.getElementById("acceptThirdPartyLabel");
-  let acceptThirdPartyMenu = win.document.getElementById("acceptThirdPartyMenu");
   let blockCookiesLabel = win.document.getElementById("blockCookiesLabel");
   let blockCookiesMenu = win.document.getElementById("blockCookiesMenu");
 
-  const newUI = win.contentBlockingCookiesAndSiteDataUiEnabled;
-  let controls = newUI ?
-    [blockCookiesLabel, blockCookiesMenu, keepUntil, keepCookiesUntil] :
-    [acceptThirdPartyLabel, acceptThirdPartyMenu, keepUntil, keepCookiesUntil];
+  let controls = [blockCookiesLabel, blockCookiesMenu, keepUntil, keepCookiesUntil];
   controls.forEach(function(control) {
     ok(control, "the dependent cookie controls should exist");
   });
-  let acceptcookies, blockcookies;
-  if (newUI) {
-    blockcookies = win.document.getElementById("blockCookies");
-    ok(blockcookies, "the block cookies checkbox should exist");
-  } else {
-    acceptcookies = win.document.getElementById("acceptCookies");
-    ok(acceptcookies, "the accept cookies checkbox should exist");
-  }
+  let blockcookies = win.document.getElementById("blockCookies");
+  ok(blockcookies, "the block cookies checkbox should exist");
 
   function expect_disabled(disabled, c = controls) {
     c.forEach(function(control) {
       is(control.disabled, disabled,
         control.getAttribute("id") + " should " + (disabled ? "" : "not ") + "be disabled");
     });
   }
 
-  if (newUI) {
-    blockcookies.value = "disallow";
-    controlChanged(blockcookies);
-    expect_disabled(false);
+  blockcookies.value = "disallow";
+  controlChanged(blockcookies);
+  expect_disabled(false);
 
-    blockcookies.value = "allow";
-    controlChanged(blockcookies);
-    expect_disabled(true, [blockCookiesLabel, blockCookiesMenu]);
-    expect_disabled(false, [keepUntil, keepCookiesUntil]);
-
-    blockCookiesMenu.value = "always";
-    controlChanged(blockCookiesMenu);
-    expect_disabled(true, [keepUntil, keepCookiesUntil]);
-    expect_disabled(false, [blockCookiesLabel, blockCookiesMenu]);
+  blockcookies.value = "allow";
+  controlChanged(blockcookies);
+  expect_disabled(true, [blockCookiesLabel, blockCookiesMenu]);
+  expect_disabled(false, [keepUntil, keepCookiesUntil]);
 
-    if (win.contentBlockingCookiesAndSiteDataRejectTrackersEnabled) {
-      blockCookiesMenu.value = "trackers";
-    } else {
-      blockCookiesMenu.value = "unvisited";
-    }
-    controlChanged(blockCookiesMenu);
-    expect_disabled(false);
+  blockCookiesMenu.value = "always";
+  controlChanged(blockCookiesMenu);
+  expect_disabled(true, [keepUntil, keepCookiesUntil]);
+  expect_disabled(false, [blockCookiesLabel, blockCookiesMenu]);
+
+  if (win.contentBlockingCookiesAndSiteDataRejectTrackersEnabled) {
+    blockCookiesMenu.value = "trackers";
   } else {
-    acceptcookies.value = "2";
-    controlChanged(acceptcookies);
-    expect_disabled(true);
-
-    acceptcookies.value = "1";
-    controlChanged(acceptcookies);
-    expect_disabled(false);
+    blockCookiesMenu.value = "unvisited";
   }
+  controlChanged(blockCookiesMenu);
+  expect_disabled(false);
 
   let historymode = win.document.getElementById("historyMode");
 
   // The History mode setting for "never remember history" should still
   // disable the "keep cookies until..." menu.
   historymode.value = "dontremember";
   controlChanged(historymode);
   expect_disabled(true, [keepUntil, keepCookiesUntil]);
-  if (newUI) {
-    expect_disabled(false, [blockCookiesLabel, blockCookiesMenu]);
-  } else {
-    expect_disabled(false, [acceptThirdPartyLabel, acceptThirdPartyMenu]);
-  }
+  expect_disabled(false, [blockCookiesLabel, blockCookiesMenu]);
 
   historymode.value = "remember";
   controlChanged(historymode);
   expect_disabled(false);
 }
 
 function test_dependent_clearonclose_elements(win) {
   let historymode = win.document.getElementById("historyMode");
--- a/browser/locales/en-US/browser/preferences/preferences.ftl
+++ b/browser/locales/en-US/browser/preferences/preferences.ftl
@@ -728,42 +728,24 @@ sitedata-total-size-calculating = Calculating site data and cache sizeā€¦
 
 # Variables:
 #   $value (Number) - Value of the unit (for example: 4.6, 500)
 #   $unit (String) - Name of the unit (for example: "bytes", "KB")
 sitedata-total-size = Your stored cookies, site data and cache are currently using { $value } { $unit } of disk space.
 
 sitedata-learn-more = Learn more
 
-sitedata-accept-cookies-option =
-    .label = Accept cookies and site data from websites (recommended)
-    .accesskey = A
-
-sitedata-block-cookies-option =
-    .label = Block cookies and site data (may cause websites to break)
-    .accesskey = B
-
 sitedata-keep-until = Keep until
     .accesskey = u
 
 sitedata-keep-until-expire =
     .label = They expire
 sitedata-keep-until-closed =
     .label = { -brand-short-name } is closed
 
-sitedata-accept-third-party-desc = Accept third-party cookies and site data
-    .accesskey = y
-
-sitedata-accept-third-party-always-option =
-    .label = Always
-sitedata-accept-third-party-visited-option =
-    .label = From visited
-sitedata-accept-third-party-never-option =
-    .label = Never
-
 sitedata-allow-cookies-option =
     .label = Accept cookies and site data
     .accesskey = A
 
 sitedata-disallow-cookies-option =
     .label = Block cookies and site data
     .accesskey = B
 
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -406,17 +406,18 @@ button > hbox > label {
 }
 
 #historyButtons {
   display: flex;
   flex-direction: column;
   justify-content: space-between;
 }
 
-#acceptCookies, #blockCookies {
+#blockCookies,
+#keepRow {
   margin-top: 1.5em;
 }
 
 /* Collapse the non-active vboxes in decks to use only the height the
    active vbox needs */
 #historyPane:not([selectedIndex="1"]) > #historyDontRememberPane,
 #historyPane:not([selectedIndex="2"]) > #historyCustomPane,
 #weavePrefsDeck:not([selectedIndex="1"]) > #hasFxaAccount,