W3C home > Mailing lists > Public > public-webapps-testsuite@w3.org > May 2012

testharness.js updated with IndexedDB DOMExceptions

From: Odin Hørthe Omdal <odinho@opera.com>
Date: Thu, 31 May 2012 12:13:51 +0200
To: public-webapps-testsuite@w3.org
Message-ID: <op.we531dr349xobu@odinho-fido.oslo.osa>
> Odin said:
>> you're testing exceptions manually instead of using  assert_throws().  
>> That is possibly because testharness.js needs to be updated to take the  
>> new values

Kris answered:
> James can you update testharness.js with the new exceptions?  Alex could  
> do it as well if that helps.
> -Thx

So, I pushed the reviewed changes to the resources repo on W3 yesterday.  
It handles old legacy codes, but also new ones. Even when you write  
assert_throws('NETWORK_ERR' - the browser can throw NetworkError or  
NETWORK_ERR (it only checks the code in that case). The same if you write  
assert_throws('NetworkError' - it can throw NetworkError or the numeric  
code for NETWORK_ERR and it'll pass.

It would be great to remove that backwards-compat allowance when browsers  
have implemented the DOM4 style DOMExceptions though. (So that it always  
asserts  e.name === "NetworkError"  no matter what).

Odin Hørthe Omdal (Velmont/odinho) · Core, Opera Software, http://opera.com
Received on Thursday, 31 May 2012 09:13:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:52:55 UTC