Closed
Bug 1147416
Opened 10 years ago
Closed 9 years ago
[e10s] browser_markupview_tag_edit_12.js causes unsafe CPOW usage warnings
Categories
(DevTools :: Inspector, defect)
DevTools
Inspector
Tracking
(e10s+)
RESOLVED
DUPLICATE
of bug 1093593
Tracking | Status | |
---|---|---|
e10s | + | --- |
People
(Reporter: mconley, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [unsafe-cpow-usage])
Mined from test logs
In browser/devtools/markupview/test/browser_markupview_tag_edit_12.js:
https://hg.mozilla.org/projects/holly/file/50e197279ad5/browser/devtools/markupview/test/browser_markupview_tag_edit_12.js#l40
https://hg.mozilla.org/projects/holly/file/50e197279ad5/browser/devtools/markupview/test/browser_markupview_tag_edit_12.js#l41
https://hg.mozilla.org/projects/holly/file/50e197279ad5/browser/devtools/markupview/test/browser_markupview_tag_edit_12.js#l44
https://hg.mozilla.org/projects/holly/file/50e197279ad5/browser/devtools/markupview/test/browser_markupview_tag_edit_12.js#l45
function* testAttributeEditing(inspector) {
info("Testing focus position after attribute editing");
// Modifying attributes reorders them in the internal representation to move
// the modified attribute to the end. breadcrumbs.js will update attributes
// to match original order if you selectNode before modifying attributes.
// So, hacky workaround for consistency with manual testing.
// Should be removed after Bug 1093593.
yield selectNode("#attr", inspector);
info("Setting the first non-id attribute in edit mode");
yield activateFirstAttribute("#attr", inspector); // focuses id
collapseSelectionAndTab(inspector); // focuses the first attr after id
// Detect the attributes order from the DOM, instead of assuming an order in
// the test, because the NamedNodeMap returned by element.attributes doesn't
// guaranty any specific order.
// Filter out the id attribute as the markup-view places it first anyway.
let attrs = getNodeAttributesOtherThanId("#attr");
info("Editing this attribute, keeping the same name, and tabbing to the next");
yield editAttributeAndTab(attrs[0].name + '="99"', inspector); <-- causes unsafe CPOW usage warning
checkFocusedAttribute(attrs[1].name, true); <-- causes unsafe CPOW usage warning
info("Editing the new focused attribute, keeping the name, and tabbing to the previous");
yield editAttributeAndTab(attrs[1].name + '="99"', inspector, true); <-- causes unsafe CPOW usage warning
checkFocusedAttribute(attrs[0].name, true); <-- causes unsafe CPOW usage warning
info("Editing attribute name, changes attribute order");
yield editAttributeAndTab("d='4'", inspector);
checkFocusedAttribute("id", true);
// Escape of the currently focused field for the next test
EventUtils.sendKey("escape", inspector.panelWin);
}
...
https://hg.mozilla.org/projects/holly/file/50e197279ad5/browser/devtools/markupview/test/browser_markupview_tag_edit_12.js#l77
function* testAttributeDeletion(inspector) {
info("Testing focus position after attribute deletion");
// Modifying attributes reorders them in the internal representation to move
// the modified attribute to the end. breadcrumbs.js will update attributes
// to match original order if you selectNode before modifying attributes.
// So, hacky workaround for consistency with manual testing.
// Should be removed after Bug 1093593.
yield selectNode("#delattr", inspector);
info("Setting the first non-id attribute in edit mode");
yield activateFirstAttribute("#delattr", inspector); // focuses id
collapseSelectionAndTab(inspector); // focuses the first attr after id
// Detect the attributes order from the DOM, instead of assuming an order in
// the test, because the NamedNodeMap returned by element.attributes doesn't
// guaranty any specific order.
// Filter out the id attribute as the markup-view places it first anyway.
let attrs = getNodeAttributesOtherThanId("#delattr");
info("Entering an invalid attribute to delete the attribute");
yield editAttributeAndTab('"', inspector);
checkFocusedAttribute(attrs[1].name, true); <-- causes unsafe CPOW usage warning
info("Deleting the last attribute");
yield editAttributeAndTab(" ", inspector);
// Check we're on the newattr element
let focusedAttr = Services.focus.focusedElement;
ok(focusedAttr.classList.contains("styleinspector-propertyeditor"), "in newattr");
is(focusedAttr.tagName, "input", "newattr is active");
}
...
https://hg.mozilla.org/projects/holly/file/50e197279ad5/browser/devtools/markupview/test/browser_markupview_tag_edit_12.js#l114
function getNodeAttributesOtherThanId(selector) {
return [...getNode(selector).attributes].filter(attr => attr.name !== "id"); <-- causes unsafe CPOW usage warning
}
Reporter | ||
Updated•10 years ago
|
tracking-e10s:
m8+ → ---
Whiteboard: [unsafe-cpow-usage]
Comment 2•9 years ago
|
||
Inspector bug triage. Filter on CLIMBING SHOES
Fixed by Bug 1093593.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•