blob: 6a11cca4db4f2cce74ed3283fb5286974ebc04dc [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Ensure PerformanceObserver Exceptions are propogated.");
window.jsTestIsAsync = true;
let seenExceptions = 0;
window.onerror = function(message) {
testPassed("onerror: " + message);
seenExceptions++;
if (seenExceptions === 2)
finishJSTest();
}
let observer1 = new PerformanceObserver((list) => {
debug("PerformanceObserver callback fired");
throw "EXCEPTION MESSAGE IN CALLBACK";
});
class MyObserver {};
let observer2 = new PerformanceObserver(MyObserver);
observer1.observe({entryTypes: ["mark"]});
observer2.observe({entryTypes: ["mark"]});
performance.mark("mark1");
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>