Closed
Bug 889216
Opened 11 years ago
Closed 7 years ago
Panel issue: TypeError: container is null when setting panel.contentURL to a data URI
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: evold, Unassigned)
References
Details
Atm I am trying this:
exports["test Panel"] = function(assert, done) {
const loader = Loader(module);
const { Panel } = loader.require('sdk/panel');
let { document } = getMostRecentBrowserWindow();
let lastPopup = document.getElementById('mainPopupSet').lastChild;
let panel = Panel({
contentURL: URL("data:text/html;charset=utf-8,old-page"),
onShow: function() {
let panelEle = document.getElementById('mainPopupSet').lastChild;
assert.notEqual(lastPopup, panelEle, "the panel element was added");
assert.equal(panelEle.nodeName, "panel", 'the panel ele is a panel ele');
assert.equal(panelEle.getAttribute("type"), "arrow", 'the panel is a arrow type');
panelEle.setAttribute('data-jetpack-test-panel', 'true');
assert.strictEqual(panelEle, document.getElementsByAttribute('data-jetpack-test-panel', 'true')[0], "the panel element was found");
panelEle = null;
panel.contentURL = "data:text/html;charset=utf-8,new-page";
panel = null;
done();
})
}
}).show();
};
I get this error:
(jetpack-sdk)EVMBPR:jetpack-sdk erik_vold$ cfx test -v -o -b /Applications/FirefoxNightly.app/ -f panel:leak
Using binary at '/Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin'.
Using profile at '/var/folders/lc/2v6jzk5525gd4l6zr5hxt2yc0000gn/T/tmpDmp_q_.mozrunner'.
Running tests on Firefox 25.0a1/Gecko 25.0a1 ({ec8030f7-c20a-464f-9b0e-13a3a9e97384}) under darwin/x86.
info: addon-sdk: executing 'tests/test-panel.test Panel'
info: addon-sdk: pass: the panel element was added
info: addon-sdk: pass: the panel ele is a panel ele
info: addon-sdk: pass: the panel is a arrow type
info: addon-sdk: pass: the panel element was found
error: addon-sdk: Unable to apply panel style
error: addon-sdk: An exception occurred.
TypeError: container is null
resource://extensions.modules.e91737a0-5410-43d5-b39b-aa102a772f32-at-jetpack.commonjs.path/sdk/panel/utils.js 349
Traceback (most recent call last):
File "resource://extensions.modules.e91737a0-5410-43d5-b39b-aa102a772f32-at-jetpack.commonjs.path/sdk/panel/utils.js", line 247, in onContentReady
style(panel);
File "resource://extensions.modules.e91737a0-5410-43d5-b39b-aa102a772f32-at-jetpack.commonjs.path/sdk/panel/utils.js", line 349, in style
if (container.firstChild)
info: addon-sdk: [JavaScript Error: "addon-sdk: Unable to apply panel style
"]
info: addon-sdk: [JavaScript Error: "addon-sdk: An exception occurred.
TypeError: container is null
resource://extensions.modules.e91737a0-5410-43d5-b39b-aa102a772f32-at-jetpack.commonjs.path/sdk/panel/utils.js 349
Traceback (most recent call last):
File "resource://extensions.modules.e91737a0-5410-43d5-b39b-aa102a772f32-at-jetpack.commonjs.path/sdk/panel/utils.js", line 247, in onContentReady
style(panel);
File "resource://extensions.modules.e91737a0-5410-43d5-b39b-aa102a772f32-at-jetpack.commonjs.path/sdk/panel/utils.js", line 349, in style
if (container.firstChild)
Updated•11 years ago
|
Priority: -- → P2
Summary: Panel issue: TypeError: container is null → Panel issue: TypeError: container is null when setting panel.contentURL to a data URI
Comment 1•7 years ago
|
||
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•