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

Unified Diff: LayoutTests/fast/dom/custom/document-register-on-create-callback.html

Issue 144023016: Separate Custom Element resolution and upgrade/createdCallback. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months 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/document-register-on-create-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/document-register-on-create-callback.html
diff --git a/LayoutTests/fast/dom/custom/document-register-on-create-callback.html b/LayoutTests/fast/dom/custom/document-register-on-create-callback.html
index a64cd7e4c153523a7c4ecddb0e1252a7f3cbb950..c689984f6723febbdd543dbd14cb1e68a6d8620a 100644
--- a/LayoutTests/fast/dom/custom/document-register-on-create-callback.html
+++ b/LayoutTests/fast/dom/custom/document-register-on-create-callback.html
@@ -1,12 +1,15 @@
<!DOCTYPE html>
-<script src="../../../resources/js-test.js"></script>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
<script>
-description('document.registerElement() in a createdCallback should upgrade elements that are in the same processing queue.');
+(function() {
+
+var test = async_test('document.registerElement() in a createdCallback should upgrade elements that are in the same processing queue.');
var createdElements = [];
var protoA = Object.create(HTMLElement.prototype);
-protoA.createdCallback = function () {
+protoA.createdCallback = function() {
createdElements.push(this.id);
var protoB = Object.create(HTMLElement.prototype);
protoB.createdCallback = function () {
@@ -14,14 +17,16 @@ protoA.createdCallback = function () {
};
document.registerElement('x-b', {prototype: protoB});
- shouldBe('createdElements', '["elemA0", "elemB0"]');
+ test.step(function() {
+ assert_array_equals(createdElements, ['elemA0', 'elemB0', 'elemB1']);
+ test.done();
+ });
};
document.registerElement('x-a', {prototype: protoA});
+
+})();
</script>
<x-b id='elemB0'></x-b>
<x-a id='elemA0'></x-a>
<x-b id='elemB1'></x-b>
-<script>
-shouldBe('createdElements', '["elemA0", "elemB0", "elemB1"]');
-</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/custom/document-register-on-create-callback-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698