Index: LayoutTests/fast/html/imports/import-custom-element-onload.html |
diff --git a/LayoutTests/fast/html/imports/import-custom-element-onload.html b/LayoutTests/fast/html/imports/import-custom-element-onload.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3042d2e7c87fd1a7838a8d2c014d5af173778efd |
--- /dev/null |
+++ b/LayoutTests/fast/html/imports/import-custom-element-onload.html |
@@ -0,0 +1,29 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<script> |
+hello = Object.create(HTMLElement.prototype); |
+hello.ids = []; |
+hello.createdCallback = function() { |
+ hello.ids.push(this.id); |
+}; |
+ |
+document.registerElement('x-hello', {prototype: hello}); |
+ |
+t = async_test('Custom elements are upgraded when onload is called.'); |
dominicc (has gone to gerrit)
2014/04/25 02:14:50
This isn't clear; use "should be" instead of "are"
|
+ |
+function ready() |
+{ |
dominicc (has gone to gerrit)
2014/04/25 02:14:50
Again, I think this brace goes on the previous lin
|
+ t.step(function() { |
+ assert_array_equals(["1", "2", "3"], hello.ids); |
dominicc (has gone to gerrit)
2014/04/25 02:14:50
Stick to one kind of quote character for string li
|
+ t.done(); |
+ }); |
+} |
+</script> |
+<link rel="import" href="resources/import-custom-element-onload-child.html" onload="ready()"> |
+</head> |
+<body> |
+</body> |
+</html> |