<commit_before><html>
<head>
<link rel="help" href="https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourceTiming/Overview.html#extensions-performance-interface">
<script src="/js-test-resources/js-test.js"></script>
<script>
description("This test checks that Performance inherits EventTarget and that addEventListener() works for resourcetimingbufferfull events.");
window.jsTestIsAsync = true;
var bufferFullCount = 0;
var parameter;

function onBufferFull(event) {
    parameter = event;
    shouldBe('parameter.__proto__', 'Event.prototype');
    bufferFullCount++;
}

shouldBe('Performance.prototype.__proto__', 'EventTarget.prototype');

performance.addEventListener('webkitresourcetimingbufferfull', onBufferFull);
shouldBeNull('performance.onwebkitresourcetimingbufferfull');
performance.webkitSetResourceTimingBufferSize(2);
shouldBeNull('performance.onwebkitresourcetimingbufferfull');
</script>
</head>
<body>
<script>
function test() {
    // Make sure the onBufferFull callback was called exactly 1 time.
    shouldBe('bufferFullCount', '1');
    performance.removeEventListener('webkitresourcetimingbufferfull', onBufferFull);
    finishJSTest();
}

window.onload = test;
</script>
<script src="resources/empty-script.js"></script>
</body>
</html><commit_msg>The second attempt to fix flakiness of webtiming-buffer-full-no-event.html.<commit_after><html>
<head>
<link rel="help" href="https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourceTiming/Overview.html#extensions-performance-interface">
<script src="/js-test-resources/js-test.js"></script>
<script>
description("This test checks that Performance inherits EventTarget and that addEventListener() works for resourcetimingbufferfull events.");
window.jsTestIsAsync = true;
var bufferFullCount = 0;
var parameter;

function onBufferFull(event) {
    shouldBeNull('performance.onwebkitresourcetimingbufferfull');
    parameter = event;
    shouldBe('parameter.__proto__', 'Event.prototype');
    bufferFullCount++;
}

shouldBe('Performance.prototype.__proto__', 'EventTarget.prototype');

performance.addEventListener('webkitresourcetimingbufferfull', onBufferFull);
shouldBeNull('performance.onwebkitresourcetimingbufferfull');
performance.webkitSetResourceTimingBufferSize(2);
</script>
</head>
<body>
<script>
function test() {
    // Make sure the onBufferFull callback was called exactly 1 time.
    shouldBe('bufferFullCount', '1');
    performance.removeEventListener('webkitresourcetimingbufferfull', onBufferFull);
    finishJSTest();
}

window.onload = test;
</script>
<script src="resources/empty-script.js"></script>
</body>
</html>
{'fraction_non_alphanumeric': 0.13435114503816795, 'fraction_numerical': 0.003816793893129771, 'mean_word_length': 6.847305389221557, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4229235', 'n_tokens_mistral': 805, 'n_tokens_neox': 774, 'n_words': 148}