
  var iframe = document.createElement('iframe');
  t.add_cleanup(function() {
    // remove cookie
    iframe.src = 'support/set-cookie.py?'+encodeURIComponent('ws_test_'+cookie_id+'=; Path=/; HttpOnly; Expires=Sun, 06 Nov 1994 08:49:37 GMT');
    iframe.onload = done;
  });
  var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/set-cookie_http?'+cookie_id);
  ws.onopen = t.step_func(function(e) {
    var ws2 = new WebSocket(SCHEME_DOMAIN_PORT+'/echo-cookie');
    ws2.onmessage = t.step_func(function(e) {
      ws.