-
Notifications
You must be signed in to change notification settings - Fork 1
/
siteA.page5.html
42 lines (38 loc) · 1.48 KB
/
siteA.page5.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
<title>siteA page5</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/mocha/6.2.0/mocha.min.css"/>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mocha/6.2.0/mocha.min.js"></script>
<script src="http://chaijs.com/chai.js" type="text/javascript"></script>
</head>
<body>
<h1>siteA, page5</h1>
<p>能動的なクリックによる遷移でもクエリがついているとリンクデコレーションとみなされる</p>
<div id="mocha"></div>
<div id="target">
<a href="#" onclick="window.close()">close</a>
</div>
<script type="text/javascript">
function setup() {
const {expect} = chai
describe('site-A page-5', function() {
it('key6に値を保存(有効期限が短い)', function() {
const maxAge = 8 * 24 * 60 * 60; // 8day
document.cookie = `key6=value6; max-age=${maxAge}`;
const cookies = Object.fromEntries(document.cookie.split(';').map((v) => v.trim().split('=')))
expect(cookies.key6).to.equals('value6')
})
})
}
</script>
<script type="text/javascript">
mocha.setup("bdd")
setup();
mocha.run(() => {
document.querySelectorAll('pre').forEach((el) => el.style = 'display: block')
})
</script>
</body>
</html>