As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 668826 - Make reflectString able to test reflections with different IDL attribute and content attribute names
: Make reflectString able to test reflections with different IDL attribute and ...
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla8
Assigned To: Mounir Lamouri (:mounir)
: Andrew Overholt [:overholt]
Depends on: 668820
Blocks: 586786
  Show dependency treegraph
Reported: 2011-07-01 08:41 PDT by Mounir Lamouri (:mounir)
Modified: 2011-07-06 10:01 PDT (History)
1 user (show)
mounir: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1 (6.46 KB, patch)
2011-07-05 16:13 PDT, Mounir Lamouri (:mounir)
Ms2ger: review+
Details | Diff | Splinter Review

Description User image Mounir Lamouri (:mounir) 2011-07-01 08:41:10 PDT
With bug 668820, I think we could allow things like this:
  element: myElement,
  attribute: "myAttribute",
  element: myElement,
  attribute: { idl: "myIDL", content: "myContent", },

That would require to check the type of the 'attribute' attribute on the methods. Would you approve such a solution Ms2ger?
Comment 1 User image Mounir Lamouri (:mounir) 2011-07-05 16:13:29 PDT
Created attachment 544093 [details] [diff] [review]
Patch v1

Only doing that for reflectString for the moment. Should be easy to do the same thing for other methods if needed.
Comment 2 User image :Ms2ger (⌚ UTC+1/+2) 2011-07-06 04:57:46 PDT
Comment on attachment 544093 [details] [diff] [review]
Patch v1

>--- a/content/html/content/test/reflect.js
>+++ b/content/html/content/test/reflect.js
> function reflectString(aParameters)
> {
>   var element = aParameters.element;
>-  var attr = aParameters.attribute;
>+  var contentAttr = typeof aParameters.attribute == "string"
>+                      ? aParameters.attribute : aParameters.attribute.content;
>+  var idlAttr = typeof aParameters.attribute == "string"
>+                  ? aParameters.attribute : aParameters.attribute.idl;

===, to match the !== below.

Looks good. r=me
Comment 3 User image Mounir Lamouri (:mounir) 2011-07-06 06:05:57 PDT

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