W3C home > Mailing lists > Public > public-web-perf@w3.org > March 2011

RE: [Navigation Timing] Proper failure for tests

From: Nic Jansma <Nic.Jansma@microsoft.com>
Date: Wed, 30 Mar 2011 21:52:39 +0000
To: Philippe Le Hegaret <plh@w3.org>, public-web-perf <public-web-perf@w3.org>
Message-ID: <F677C405AAD11B45963EEAE5202813BD19CCD8B7@TK5EX14MBXW651.wingroup.windeploy.ntdev.microsoft.com>
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.



Received on Wednesday, 30 March 2011 21:53:16 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:30 UTC