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:
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:
This case set buffer size to 2, then  fetches 3 resources, and expect one onresourcetimingbufferfull event, I think vendors should pass it.
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?
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.


Thanks & Regards

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