From f576d8f0fe2a2203e6ad5fdd1a319b8991322756 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Mon, 20 Jan 2020 19:49:20 -0500 Subject: Bug 1396620 - Part 1: Remove created callback for custom elements Tag UXP Issue #1344 --- dom/base/test/chrome/registerElement_ep.js | 4 ++-- .../test/chrome/test_registerElement_content.xul | 23 ++++++++++------------ dom/base/test/chrome/test_registerElement_ep.xul | 4 ++-- 3 files changed, 14 insertions(+), 17 deletions(-) (limited to 'dom/base/test/chrome') diff --git a/dom/base/test/chrome/registerElement_ep.js b/dom/base/test/chrome/registerElement_ep.js index de32ba51c..9189593c0 100644 --- a/dom/base/test/chrome/registerElement_ep.js +++ b/dom/base/test/chrome/registerElement_ep.js @@ -1,8 +1,8 @@ var proto = Object.create(HTMLElement.prototype); proto.magicNumber = 42; -proto.createdCallback = function() { +proto.connectedCallback = function() { finishTest(this.magicNumber === 42); }; document.registerElement("x-foo", { prototype: proto }); -document.createElement("x-foo"); +document.firstChild.appendChild(document.createElement("x-foo")); diff --git a/dom/base/test/chrome/test_registerElement_content.xul b/dom/base/test/chrome/test_registerElement_content.xul index 9a918f2d7..bf00ed53d 100644 --- a/dom/base/test/chrome/test_registerElement_content.xul +++ b/dom/base/test/chrome/test_registerElement_content.xul @@ -21,19 +21,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1130028 diff --git a/dom/base/test/chrome/test_registerElement_ep.xul b/dom/base/test/chrome/test_registerElement_ep.xul index 6f1745268..b6a160c2e 100644 --- a/dom/base/test/chrome/test_registerElement_ep.xul +++ b/dom/base/test/chrome/test_registerElement_ep.xul @@ -26,8 +26,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1130028 SimpleTest.waitForExplicitFinish(); function finishTest(canSeePrototype) { - ok(true, "createdCallback called when reigsterElement was called with an extended principal."); - ok(canSeePrototype, "createdCallback should be able to see custom prototype."); + ok(true, "connectedCallback called when reigsterElement was called with an extended principal."); + ok(canSeePrototype, "connectedCallback should be able to see custom prototype."); SimpleTest.finish(); } -- cgit v1.2.3