Last Comment Bug 745498 - Add testcases for DOM4 exception types
: Add testcases for DOM4 exception types
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: Masatoshi Kimura [:emk]
:
Mentors:
Depends on:
Blocks: 720208
  Show dependency treegraph
 
Reported: 2012-04-14 18:27 PDT by Masatoshi Kimura [:emk]
Modified: 2012-04-27 06:57 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (258.67 KB, patch)
2012-04-14 18:30 PDT, Masatoshi Kimura [:emk]
jonas: review+
Details | Diff | Review
patch for check in (258.67 KB, patch)
2012-04-25 07:40 PDT, Masatoshi Kimura [:emk]
VYV03354: review+
Details | Diff | Review
patch for check in; r=jonas (257.14 KB, patch)
2012-04-26 07:33 PDT, Masatoshi Kimura [:emk]
VYV03354: review+
Details | Diff | Review

Description Masatoshi Kimura [:emk] 2012-04-14 18:27:24 PDT

    
Comment 1 Masatoshi Kimura [:emk] 2012-04-14 18:30:17 PDT
Created attachment 615099 [details] [diff] [review]
patch
Comment 2 Jonas Sicking (:sicking) PTO Until July 5th 2012-04-25 03:43:35 PDT
Comment on attachment 615099 [details] [diff] [review]
patch

Review of attachment 615099 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with that change. Yay!

::: content/base/test/file_bug416317.xhtml
@@ +494,5 @@
>            return root[select](q, resolver);
>          } catch(e){
> +          if ( e.message.indexOf("ERR") > -1 ||
> +              e.name == "NamespaceError" && e.code == DOMException.NAMESPACE_ERR ||
> +              e.name == "SyntaxError" && e.code == DOMException.SYNTAX_ERR)

Please don't rely on the fact that && has higher precedence than || since that's not obvious to everyone. So add some parenthesis here.

@@ +548,5 @@
>              try {
>                results = query(q, resolver);
>              } catch(e) {
> +              pass = (e.message === "bad ERROR" ||
> +                      e.name == "NamespaceError" && e.code == DOMException.NAMESPACE_ERR);

Same here
Comment 3 Masatoshi Kimura [:emk] 2012-04-25 07:40:00 PDT
Created attachment 618253 [details] [diff] [review]
patch for check in
Comment 4 Ryan VanderMeulen [:RyanVM] 2012-04-25 17:11:35 PDT
content/test/unit/test_range.js appears to be bitrotted. Please rebase.
Comment 5 Masatoshi Kimura [:emk] 2012-04-26 07:33:51 PDT
Created attachment 618651 [details] [diff] [review]
patch for check in; r=jonas

Conflicted with bug 702948. Rebased.
Comment 6 Daniel Holbert [:dholbert] (largely AFK until June 28) 2012-04-26 09:44:02 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/bafdd54189ee
Comment 7 Ed Morley [:emorley] 2012-04-27 06:57:12 PDT
https://hg.mozilla.org/mozilla-central/rev/bafdd54189ee

Note You need to log in before you can comment on or make changes to this bug.