Re: Tests returning an inconsistent number of results

On 09/19/2012 09:40 AM, Tobie Langel wrote:
> On Sep 19, 2012, at 0:54, "Karen Anderson (IE)" <Karen.Anderson@microsoft.com> wrote:
>
>> We started down this path with Navigation Timing with checkin #170.  At the time we wanted to avoid scripting errors when a UA had not fully implemented part of a spec while running the tests and made it such that you didn't have to put every call within an individual try/catch block.  What did you have in mind?
>
> The test runner already runs the tests in a try catch block[1].

Right, handling this kind of thing well was an explicit design goal :) 
You can either just let the test fail when it gets to the unsupported 
bit (easier, slightly more robust, slightly more messy output) or add in 
an explicit precondition to each test; the test will stop at the first 
failure (indeed the assert_* functions are implemented under the hood by 
throwing exceptions).

Received on Thursday, 20 September 2012 08:41:10 UTC