Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Side by Side Diff: LayoutTests/http/tests/misc/webtiming-buffer-full-no-event.html

Issue 22649003: Have the Performance interface inherit EventTarget (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline additional w3c test Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <link rel="help" href="https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/Resourc eTiming/Overview.html#extensions-performance-interface">
4 <script src="../resources/js-test-pre.js"></script>
5 <script>
6 description("This test checks that Performance inherits EventTarget and that add EventListener() works for resourcetimingbufferfull events.");
7 window.jsTestIsAsync = true;
8 var bufferFullCount = 0;
9 var parameter;
10
11 function onBufferFull(event) {
12 parameter = event;
13 shouldBe('parameter.__proto__', 'Event.prototype');
14 bufferFullCount++;
15 }
16
17 shouldBe('Performance.prototype.__proto__', 'EventTarget.prototype');
18
19 performance.webkitSetResourceTimingBufferSize(2);
20 shouldBeNull('performance.onwebkitresourcetimingbufferfull');
21 performance.addEventListener('webkitresourcetimingbufferfull', onBufferFull);
22 shouldBeNull('performance.onwebkitresourcetimingbufferfull');
23 </script>
24 </head>
25 <body>
26 <script>
27 function test() {
28 // Make sure the onBufferFull callback was called exactly 1 time.
29 shouldBe('bufferFullCount', '1');
30 performance.removeEventListener('webkitresourcetimingbufferfull', onBufferFu ll);
31 finishJSTest();
32 }
33
34 window.onload = test;
35 </script>
36 <script src="../resources/js-test-post.js"></script>
37 </body>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698