RE: [ResourceTiming] Test Cases Reviewed

Thanks for your review, I'd like to add a description to make these cases clear :)

This test cases creates 3 resources before ResourceTimingBufferSize is set to 2. Per spec text, "if the maxSize parameter is less than the number of elements currently stored in the buffer, no elements in the buffer are to be removed. The maxSize parameter will apply only after the clearResourceTimings method is called." The number of entries won't be truncated if they exist before a lesser buffer size is set: http://w3c-test.org/webperf/tests/submission/Intel/resource-timing/test_resource_timing_buffer_size_restriction.html.
In this case, the resource timing buffer size is set to 2 in head, and it appears before the 3 resource elements. I assumed it will be evaluated before 3 resources finish loading.
In processing model, we can see an entry should be stored in buffer after it finish loading rather than once the entry is created( or initial fetch), so buffer size "2" should be applied and 2 entries is expected at last.
I think vendors should pass this case if my assumption is correct.

Seeing that we just updated the onresourcebufferfull callback behavior in the spec, we should review to see if these test cases need to be updated:
http://w3c-test.org/webperf/tests/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_populate_entries.html
This case set buffer size to 2, then  fetches 3 resources, and expect one onresourcetimingbufferfull event, I think vendors should pass it.

http://w3c-test.org/webperf/tests/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_shrink_buffer_size.html
This case fetches 3 resources and store their timing entries in buffer, then set the buffer size to 3, and then set to 2. According to previous discussion[1], onresourcetimingbufferfull event is expected to fire 2 times.
I noticed statements of "onresourcetimingbufferfull event can be fired when buffer is set to a number which is smaller than existing entry number" hasn't been added in the latest editor draft, could you please help update it?

http://w3c-test.org/webperf/tests/submission/Intel/resource-timing/test_resource_timing_store_and_clear_during_callback.html
This case set the buffer size to 1 and register a callback "store_and_clear" firstly, "store_and_clear" dump the resource timing buffer to a global buffer and then clear the resource timing buffer.
This case fetches 3 resources, once a resource added to resource timing buffer, buffer is full, then "store_and_clear".
At last 0 entry is expected in resource timing buffer, and 3 entries are expected in the global buffer.

[1] http://lists.w3.org/Archives/Public/public-web-perf/2012Oct/0050.html


Thanks & Regards
Pan

Received on Wednesday, 8 May 2013 07:45:25 UTC