Last modified: 2014-03-11 02:05:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46808, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44808 - VisualEditor: ce.ContentBranchNode tests fails in Firefox due to object key order
VisualEditor: ce.ContentBranchNode tests fails in Firefox due to object key o...
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Technical Debt (Other open bugs)
unspecified
All All
: Low enhancement
: ---
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-09 01:53 UTC by Roan Kattouw
Modified: 2014-03-11 02:05 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Roan Kattouw 2013-02-09 01:53:48 UTC
This test works in Chrome, but in Firefox it fails with:

Expected: 	

"a<b>b<span typeof=\"mw:Entity\" class=\"ve-ce-leafNode ve-ce-MWEntityNode\" contenteditable=\"false\">c</span>d<div class=\"ve-ce-leafNode ve-ce-alienNode ve-ce-alienInlineNode\" contenteditable=\"false\"><tt>e</tt></div></b>"

Result: 	

"a<b>b<span class=\"ve-ce-leafNode ve-ce-MWEntityNode\" typeof=\"mw:Entity\" contenteditable=\"false\">c</span>d<div class=\"ve-ce-leafNode ve-ce-alienNode ve-ce-alienInlineNode\" contenteditable=\"false\"><tt>e</tt></div></b>"

(the difference is in the order of the class and typeof attributes)

We should probably implement DOM comparison instead of string comparison in the ce.ContentBranchNode test suite.
Comment 1 Krinkle 2013-02-22 21:44:52 UTC
Not sure if it is caused by the javasript object keys. May be related to how WebKit/Geck order the element attributes when serialising the html.

If the former:
 ve.getHash or assert.deepEqual

If the latter:
 assert.equalDomElement
Comment 2 Roan Kattouw 2013-04-04 00:02:25 UTC
This specific case is fixed in https://gerrit.wikimedia.org/r/#/c/57240 by using equalDomElement. However, another case has appeared: recent code introduced full HTML preservation in mw:Image and the attribute order in the HTML serialization matters there too, so now that test passes in Chrome but fails in Firefox (getDataFromDom test 4).

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


Navigation
Links