mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 09:27:31 +09:00
Bug 1334043 - Part 3: Update tests for connected callback.
Tag UXP Issue #1344
This commit is contained in:
parent
befa1027e3
commit
b477c03089
7 changed files with 6 additions and 84 deletions
|
|
@ -16,7 +16,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1102502
|
|||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var attachedCallbackCount = 0;
|
||||
var connectedCallbackCount = 0;
|
||||
|
||||
var p = Object.create(HTMLElement.prototype);
|
||||
|
||||
|
|
@ -24,12 +24,12 @@ p.createdCallback = function() {
|
|||
ok(true, "createdCallback called.");
|
||||
};
|
||||
|
||||
p.attachedCallback = function() {
|
||||
ok(true, "attachedCallback should be called when the parser creates an element in the document.");
|
||||
attachedCallbackCount++;
|
||||
// attachedCallback should be called twice, once for the element created for innerHTML and
|
||||
p.connectedCallback = function() {
|
||||
ok(true, "connectedCallback should be called when the parser creates an element in the document.");
|
||||
connectedCallbackCount++;
|
||||
// connectedCallback should be called twice, once for the element created for innerHTML and
|
||||
// once for the element created in this document.
|
||||
if (attachedCallbackCount == 2) {
|
||||
if (connectedCallbackCount == 2) {
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue