text: 'use strict';
  
  promise_test(async testCase => {
    await cookieStore.set('cookie-name', 'cookie-value');
    testCase.add_cleanup(async () => {
      await cookieStore.delete('cookie-name');
    });
  
    const cookie = await cookieStore.get();
    assert_equals(cookie.name, 'cookie-name');
    assert_equals(cookie.value, 'cookie-value');
  }, 'cookieStore.get with no arguments');
  
  promise_test(async testCase => {
    await cookieStore.set('cookie-name', 'cookie-value');
    testCase.add_cleanup(async () => {
      await cookieStore.delete('cookie-name');
    });
  
    const cookie = await cookieStore.get('cookie-name');
    assert_equals(cookie.name, 'cookie-name');
    assert_equals(cookie.value, 'cookie-value');
  }, 'cookieStore.get with positional name');
  
  promise_test(async testCase => {
    await cookieStore.set('cookie-name', 'cookie-value');
    testCase.add_cleanup(async () => {
      await cookieStore.delete('cookie-name');
    });
  
    const cookie = await cookieStore.get({ name: 'cookie-name' });
    assert_equals(cookie.name, 'cookie-name');
    assert_equals(cookie.value, 'cookie-value');
  }, 'cookieStore.get with name in options');
  
  promise_test(async testCase => {
    await cookieStore.set('cookie-name', 'cookie-value');
    testCase.add_cleanup(async () => {
      await cookieStore.delete('cookie-name');
    });
  
    const cookie = await cookieStore.get('cookie-name',
                                         { name: 'wrong-cookie-name' });
  }, 'cookieStore.get with name in both positional arguments and options');
  
  promise_test(async testCase => {
    await cookieStore.set('cookie-name', 'cookie-value');
    testCase.add_cleanup(async () => {
      await cookieStore.delete('cookie-name');
    });
  
    const cookie = await cookieStore.get(
        'cookie-name', { matchType: 'equals' });
    assert_equals(cookie.name, 'cookie-name');
    assert_equals(cookie.value, 'cookie-value');
  
    const no_cookie = await cookieStore.get({ name: 'cookie-na',
                                              matchType: 'equals' });
    assert_equals(no_cookie, null);
  }, 'cookieStore.get with matchType explicitly set to equals');
  
  promise_test(async testCase => {
    await cookieStore.set('cookie-name', 'cookie-value');
    testCase.add_cleanup(async () => {
      await cookieStore.delete('cookie-name');
    });
  
    const cookie = await cookieStore.get({ name: 'cookie-na',
                                           matchType: 'starts-with' });
    assert_equals(cookie.name, 'cookie-name');
    assert_equals(cookie.value, 'cookie-value');
  }, 'cookieStore.get with matchType set to starts-with');
  
  promise_test(async testCase => {
    await cookieStore.set('cookie-name', 'cookie-value');
    testCase.add_cleanup(async () => {
      await cookieStore.delete('cookie-name');
    });
  
    await promise_rejects(testCase, new TypeError(), cookieStore.get(
        { name: 'cookie-name', matchType: 'invalid' }));
  }, 'cookieStore.get with invalid matchType');
  
  promise_test(async testCase => {
    await cookieStore.set('cookie-name', 'cookie-value');
    testCase.add_cleanup(async () => {
      await cookieStore.delete('cookie-name');
    });
  
    const cookie = await cookieStore.get({ matchType: 'equals' });
    assert_equals(cookie.name, 'cookie-name');
    assert_equals(cookie.value, 'cookie-value');
  }, 'cookieStore.get with matchType set to equals and missing name');
  
  promise_test(async testCase => {
    await cookieStore.set('cookie-name', 'cookie-value');
    testCase.add_cleanup(async () => {
      await cookieStore.delete('cookie-name');
    });
  
    const cookie = await cookieStore.get({ matchType: 'starts-with' });
    assert_equals(cookie.name, 'cookie-name');
    assert_equals(cookie.value, 'cookie-value');
  }, 'cookieStore.get with matchType set to starts-with and missing name');
  