mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 746221 - Pull properties for comparison off the prototype to avoid mismatches with expandos. r=past a=test-only
This commit is contained in:
parent
f4b524921e
commit
f7ec058d6b
@ -70,13 +70,18 @@ function autocompletePopupHidden()
|
||||
is(completeNode.value, testStr + "dy", "completeNode is empty");
|
||||
jsterm.setInputValue("");
|
||||
|
||||
// Check the property panel as well.
|
||||
// Check the property panel as well. It's a bit gross to parse the properties
|
||||
// out of the treeView cell text, but nsITreeView doesn't give us a good
|
||||
// structured way to get at the data. :-(
|
||||
let propPanel = jsterm.openPropertyPanel("Test", content.document);
|
||||
let docProps = 0;
|
||||
for (let prop in content.document) {
|
||||
docProps++;
|
||||
}
|
||||
is (propPanel.treeView.rowCount, docProps, "all document properties shown in propertyPanel");
|
||||
let propPanelProps = [];
|
||||
for (let idx = 0; idx < propPanel.treeView.rowCount; ++idx)
|
||||
propPanelProps.push(propPanel.treeView.getCellText(idx, null).split(':')[0]);
|
||||
// NB: We pull the properties off the prototype, rather than off object itself,
|
||||
// so that expandos like |constructor|, which the propPanel can't see, are not
|
||||
// included.
|
||||
for (let prop in Object.getPrototypeOf(content.document))
|
||||
ok(propPanelProps.indexOf(prop) != -1, "Property |" + prop + "| should be reflected in propertyPanel");
|
||||
|
||||
let treeRows = propPanel.treeView._rows;
|
||||
is (treeRows[30].display, "body: Object", "found document.body");
|
||||
|
Loading…
Reference in New Issue
Block a user