blob: 091e1db3b923ca7ae13c1913d4df1c282c20457d [file] [log] [blame]
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Testing onnegotiationneeded</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
</head>
<body>
<script>
promise_test(() => {
let done;
const promise = new Promise(resolve => done = resolve);
const pc = new RTCPeerConnection();
pc.onnegotiationneeded = function(e) {
assert_equals(pc, this);
done();
}
pc.createDataChannel('x');
return promise;
}, "Make sure event target is the connection");
</script>
</body>
</html>