Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

932 B
Raw Blame
<!doctype html>
<meta charset="utf-8">
<script src="/wpt/resources/testharness.js"></script>
<script src="/wpt/resources/testharnessreport.js"></script>
<script src="/wpt/resources/moli-wpt-adapter.js"></script>
<script>
promise_test(async function () {
  const redResponse = await fetch("/wpt/runtime/cookies/replace/red");
  assert_equals(await redResponse.text(), "replace-cookie=red", "first setter route response");

  const blueResponse = await fetch("/wpt/runtime/cookies/replace/blue");
  assert_equals(await blueResponse.text(), "replace-cookie=blue", "second setter route response");

  const checkResponse = await fetch("/wpt/runtime/cookies/replace/check");
  assert_equals(
    await checkResponse.text(),
    "replace-cookie=blue",
    "later Set-Cookie with the same name and path should replace the earlier value",
  );
}, "HTTP cookies replace earlier values when the server sets the same cookie again");
</script>