Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: LayoutTests/fast/dom/custom/created-callback.html

Issue 106903007: Let unresolved custom element go through CustomElementCallbackQueue. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated test. Landing again. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/custom/created-callback-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/custom/created-callback.html
diff --git a/LayoutTests/fast/dom/custom/created-callback.html b/LayoutTests/fast/dom/custom/created-callback.html
index ea0b735ac6df8a5f7f9979d7a5caf8b92068d0ad..2819227c483f131525165718039d019c448d443b 100644
--- a/LayoutTests/fast/dom/custom/created-callback.html
+++ b/LayoutTests/fast/dom/custom/created-callback.html
@@ -112,4 +112,33 @@ withFrame(t.step_func(function(frame) {
}));
})();
+
+(function() {
+
+t = async_test('callback is called even if the element is moved to foreign document');
+var callbackInvoked = false;
+
+withFrame(t.step_func(function(originalFrame) {
+ withFrame(function(destinationFrame) {
+ var protoA = Object.create(originalFrame.contentWindow.HTMLElement.prototype);
+ protoA.createdCallback = function() {
+ var toBeMoved = originalFrame.contentDocument.getElementById('toBeMoved');
+ destinationFrame.contentDocument.body.appendChild(toBeMoved);
+ };
+
+ var protoB = Object.create(originalFrame.contentWindow.HTMLElement.prototype);
+ protoB.createdCallback = function() {
+ callbackInvoked = true;
+ };
+
+ originalFrame.contentDocument.registerElement('x-a', {prototype: protoA});
+ originalFrame.contentDocument.registerElement('x-b', {prototype: protoB});
+ originalFrame.contentDocument.body.innerHTML = '<x-a></x-a><x-b id="toBeMoved"></x-b>';
+ assert_true(callbackInvoked);
+
+ t.done();
+ });
+}));
+
+})();
</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/custom/created-callback-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698