summaryrefslogtreecommitdiffstats
path: root/netwerk/cookie/test/mochitest/test_document_cookie.html
blob: 86e7c7f6616a191c7571481ec4724c7d9eb17896 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE HTML>
<html>
<head>
  <title>Test for document.cookie when the policy changes</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  <script type="application/javascript" src="cookiesHelper.js"></script>
</head>
<body>
<script type="application/javascript">

runTests(async (w, state) => {
  is(w.document.cookie.length, 0, "No cookie to start!");
  w.document.cookie = "name=value";
  is(w.document.cookie.includes("name=value"), state == ALLOWED, "Some cookies for me");
});

</script>
</body>
</html>