RE: [Navigation Timing] Proper failure for tests

We have submitted minor updates for most of /approved/ tests to validate that the window.performance namespace is available before continuing the test.

In UAs that don't implement window.performance, the test will spit out a single immediate Fail noting that window.performance is unavailable.  The tests were also fixed to not throw script errors in UAs that don't have window.performance.

I've validated that the /approved/ tests and current /submission/ tests still work in both IE9 and Chrome.

Other minor changes:
* Changed delays for page loads/navigations from 1000ms to 100ms to make things go faster.
* test_unique_performance_objects: Fixed bad src for blank_page_green.htm

- Nic


-----Original Message-----
From: public-web-perf-request@w3.org [mailto:public-web-perf-request@w3.org] On Behalf Of Nic Jansma
Sent: Wednesday, March 30, 2011 2:53 PM
To: Philippe Le Hegaret; public-web-perf
Subject: RE: [Navigation Timing] Proper failure for tests

Thanks for pointing this out Philippe.

We discussed this on today's call and are thinking that #1 is a good simple approach.

We will update the tests (which include the approved tests) soon.

- Nic


-----Original Message-----
From: public-web-perf-request@w3.org [mailto:public-web-perf-request@w3.org] On Behalf Of Philippe Le Hegaret
Sent: Monday, March 28, 2011 7:41 AM
To: public-web-perf
Subject: [Navigation Timing] Proper failure for tests

I noticed that some of our tests don't fail gracefully when running on "non-perf" browsers.

For example, [1] reports "Found 0 tests" on firefox or opera. There are two approaches to fix that:

1. we could test if window.performance and window.performance.timing exist, report failure if they don't, and abandon that. This has the disadvantage of not knowing how many tests are included with the file and the test still takes a long time to fail.

2. for each test within the file, we could add an assertion that window.performance and window.performance.timing exist. It requires more work to rewrite some of the tests and is more representative of the tests and it fails quicker (no more exception preventing done() from being called).


I attached examples for each solution. Try them on a "non-perf" browser.

Philippe


[1]
http://w3c-test.org/webperf/tests/approved/test_navigate_within_document.htm

Received on Wednesday, 20 April 2011 17:17:06 UTC