Closed
Bug 1250509
Opened 6 years ago
Closed 6 years ago
make pretty print nicer for accessible trees in testing
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: surkov, Assigned: surkov)
Details
Attachments
(1 file)
3.88 KB,
patch
|
yzen
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #8722509 -
Flags: review?(yzenevich)
Comment 1•6 years ago
|
||
Comment on attachment 8722509 [details] [diff] [review] patch Review of attachment 8722509 [details] [diff] [review]: ----------------------------------------------------------------- good with just a couple of nits. ::: accessible/tests/mochitest/common.js @@ +762,5 @@ > return "[ " + getNodePrettyName(aIdentifier) + " ]"; > > if (aIdentifier && typeof aIdentifier === "object" ) { > + var treeObj = normalizeAccTreeObj(aIdentifier); > + if ("role" in treeObj) { nit: if (treeObj.role) {..} @@ +765,5 @@ > + var treeObj = normalizeAccTreeObj(aIdentifier); > + if ("role" in treeObj) { > + function stringifyTree(aObj) { > + var text = roleToString(aObj.role) + ": [ "; > + if ("children" in aObj) { nit: if (aObj.children) @@ +776,5 @@ > + } > + } > + return text + "] "; > + } > + return "{ " + stringifyTree(treeObj) + " }"; nit: `{ ${stringifyTree(treeObj)} }`
Attachment #8722509 -
Flags: review?(yzenevich) → review+
Assignee | ||
Comment 2•6 years ago
|
||
(In reply to Yura Zenevich [:yzen] from comment #1) > ::: accessible/tests/mochitest/common.js > @@ +762,5 @@ > > return "[ " + getNodePrettyName(aIdentifier) + " ]"; > > > > if (aIdentifier && typeof aIdentifier === "object" ) { > > + var treeObj = normalizeAccTreeObj(aIdentifier); > > + if ("role" in treeObj) { > > nit: if (treeObj.role) {..} isn't if (prop in obj) a correct way to check if property is presented in the object? I realize that role is never 0, so they are identical but anyway > nit: `{ ${stringifyTree(treeObj)} }` k
Assignee | ||
Comment 3•6 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/405edcc5dbfaffd76929d92ab50339ed947bd8f9 Bug 1250509 - make pretty print nicer for accessible trees in testing, r=yzen
Comment 4•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/405edcc5dbfa
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Updated•6 years ago
|
Assignee: nobody → surkov.alexander
You need to log in
before you can comment on or make changes to this bug.
Description
•