Closed Bug 668826 Opened 10 years ago Closed 10 years ago

Make reflectString able to test reflections with different IDL attribute and content attribute names

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: mounir, Assigned: mounir)

References

Details

Attachments

(1 file)

With bug 668820, I think we could allow things like this:
reflectString({
  element: myElement,
  attribute: "myAttribute",
});
and:
reflectString({
  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?
Attached patch Patch v1Splinter Review
Only doing that for reflectString for the moment. Should be easy to do the same thing for other methods if needed.
Assignee: nobody → mounir
Status: NEW → ASSIGNED
Attachment #544093 - Flags: review?(Ms2ger)
Whiteboard: [needs review]
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
Attachment #544093 - Flags: review?(Ms2ger) → review+
Pushed:
http://hg.mozilla.org/mozilla-central/rev/f9f7e6821ba6
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs review]
Target Milestone: --- → mozilla8
Status: RESOLVED → UNCONFIRMED
Ever confirmed: false
Resolution: FIXED → ---
Summary: Make reflects.js methods able to tests reflections with different IDL attribute and content attribute names → Make reflectString able to test reflections with different IDL attribute and content attribute names
Target Milestone: mozilla8 → ---
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.