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

RESOLVED FIXED in mozilla8

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

Trunk
mozilla8
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
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?
(Assignee)

Comment 1

6 years ago
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.
Assignee: nobody → mounir
Status: NEW → ASSIGNED
Attachment #544093 - Flags: review?(Ms2ger)
(Assignee)

Updated

6 years ago
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+
(Assignee)

Comment 3

6 years ago
Pushed:
http://hg.mozilla.org/mozilla-central/rev/f9f7e6821ba6
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs review]
Target Milestone: --- → mozilla8
(Assignee)

Updated

6 years ago
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 → ---

Updated

6 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.