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

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

Issue 18916003: Performance.onwebkitresourcetimingbufferfull should be a Function (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 <script src="../resources/js-test-pre.js"></script>
4 <script>
5 description("This test validates the functionality of onresourcetimingbufferfull in resource timing.");
6 jsTestIsAsync = true;
7 var bufferFullCount = 0;
8 var parameter;
9
10 function onBufferFull(event) {
11 parameter = event;
12 // No parameter should be given as this is not an event.
13 shouldBeUndefined("parameter");
14 bufferFullCount++;
arv (Not doing code reviews) 2013/07/09 18:19:58 Can you also assert that this === window.performan
15 }
16
17 performance.webkitSetResourceTimingBufferSize(2);
18 shouldBeNull('performance.onwebkitresourcetimingbufferfull');
19 performance.onwebkitresourcetimingbufferfull = onBufferFull;
20 shouldBe('performance.onwebkitresourcetimingbufferfull', 'onBufferFull');
21 </script>
22 </head>
23 <body onload="test()">
24 <script>
25 function test() {
26 // Make sure the onBufferFull callback was called exactly 1 time.
27 shouldBe('bufferFullCount', '1');
28 performance.onwebkitresourcetimingbufferfull = null;
29 shouldBeNull('performance.onwebkitresourcetimingbufferfull');
30 finishJSTest();
31 }
32 </script>
33 <script src="../resources/js-test-post.js"></script>
34 </body>
35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698