blob: 350c1a1f8fa2ec980963022627ba2a745f70f82d [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<!-- NOTE: On http://localhost, the Cookie Store API is intended to behave the
same way as document.cookie. -->
<title>Cookie Store API: Set a cookie on http://localhost</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async t => {
await promise_rejects_js(t, TypeError,
cookieStore.set({
name: 'cookie-name', value: 'cookie-value'
}));
}, 'cookieStore.set(options) throws an exception');
promise_test(async t => {
await promise_rejects_js(t, TypeError,
cookieStore.set('cookie-name', 'cookie-value'));
}, `cookieStore.set(name, value) throws an exception`);
</script>