d = function(event) {
    if (event.candidate) {
      var candidate = new RTCIceCandidate(event.candidate);
      gFirstConnection.addIceCandidate(candidate);
    }
  };

  var onRemoteStream = test.step_func(function(event) {
    var videoTag = document.getElementById('remote-view');
    videoTag.src = webkitURL.createObjectURL(event.stream);
  });

  // Returns a suitable error callback.
  function failed(function_name) {
    return test.step_func(function() {
      assert_unreached('WebRTC called error 