Commit 08952898 authored by Niklas Goegge's avatar Niklas Goegge
Browse files

Bug 1617611: Annotate each failing xpcshell test individually. r=ckerschb,extension-reviewers,robwu

Depends on D131491

Differential Revision: https://phabricator.services.mozilla.com/D131492
parent 6b41fa8a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -37,6 +37,9 @@ add_task(async function() {
    true
  );

  // Bug 1617611 - Fix all the tests broken by "cookies SameSite=Lax by default"
  Services.prefs.setBoolPref("network.cookie.sameSite.laxByDefault", false);

  await setCookie("A", Services.io.newURI("https://example.com/A/"));
  await sleep();

@@ -69,4 +72,6 @@ add_task(async function() {

  someCookies = cm.getCookiesSince(cookies[3].creationTime + 1);
  Assert.equal(someCookies.length, 0, "We retrieve some cookies");

  Services.prefs.clearUserPref("network.cookie.sameSite.laxByDefault");
});
+4 −0
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ add_task(async () => {
    true
  );

  // Bug 1617611 - Fix all the tests broken by "cookies SameSite=Lax by default"
  Services.prefs.setBoolPref("network.cookie.sameSite.laxByDefault", false);

  // The server.
  const hosts = ["foo.com", "hither.com", "haithur.com", "bar.com"];
  for (let i = 0; i < 3000; ++i) {
@@ -68,6 +71,7 @@ add_task(async () => {
  await run_test_4();
  await run_test_5();
  Services.prefs.clearUserPref("dom.security.https_first");
  Services.prefs.clearUserPref("network.cookie.sameSite.laxByDefault");
});

function do_get_backup_file(profile) {
+5 −0
Original line number Diff line number Diff line
@@ -18,6 +18,9 @@ add_task(async () => {
    true
  );

  // Bug 1617611 - Fix all the tests broken by "cookies SameSite=Lax by default"
  Services.prefs.setBoolPref("network.cookie.sameSite.laxByDefault", false);

  // Start the cookieservice, to force creation of a database.
  // Get the sessionCookies to join the initialization in cookie thread
  Services.cookiemgr.sessionCookies;
@@ -111,4 +114,6 @@ add_task(async () => {
    let host = i.toString() + ".com";
    Assert.equal(Services.cookiemgr.countCookiesFromHost(host), 1);
  }

  Services.prefs.clearUserPref("network.cookie.sameSite.laxByDefault");
});
+4 −0
Original line number Diff line number Diff line
@@ -19,6 +19,9 @@ add_task(async () => {
  );
  Services.prefs.setBoolPref("dom.security.https_first", false);

  // Bug 1617611 - Fix all the tests broken by "cookies SameSite=Lax by default"
  Services.prefs.setBoolPref("network.cookie.sameSite.laxByDefault", false);

  CookieXPCShellUtils.createServer({
    hosts: ["foo.com", "bar.com", "third.com"],
  });
@@ -161,4 +164,5 @@ add_task(async () => {
    Services.cookies.removeAll();
  }
  Services.prefs.clearUserPref("dom.security.https_first");
  Services.prefs.clearUserPref("network.cookie.sameSite.laxByDefault");
});
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,9 @@ add_task(async () => {
  );
  Services.prefs.setBoolPref("dom.security.https_first", false);

  // Bug 1617611 - Fix all the tests broken by "cookies SameSite=Lax by default"
  Services.prefs.setBoolPref("network.cookie.sameSite.laxByDefault", false);

  CookieXPCShellUtils.createServer({
    hosts: ["foo.com", "bar.com", "third.com"],
  });
@@ -70,4 +73,5 @@ add_task(async () => {
  Assert.equal(Services.cookies.countCookiesFromHost(uri1.host), 0);
  Assert.equal(Services.cookies.countCookiesFromHost(uri2.host), 0);
  Services.prefs.clearUserPref("dom.security.https_first");
  Services.prefs.clearUserPref("network.cookie.sameSite.laxByDefault");
});
Loading