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

Unified Diff: sky/tests/custom-elements/registration.sky

Issue 943013002: Implement Custom Elements (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: attributeChanged***d***Callback Created 5 years, 10 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
Index: sky/tests/custom-elements/registration.sky
diff --git a/sky/tests/custom-elements/registration.sky b/sky/tests/custom-elements/registration.sky
new file mode 100644
index 0000000000000000000000000000000000000000..1a2627380d6629450059f4d4f80ec62a0caa9b53
--- /dev/null
+++ b/sky/tests/custom-elements/registration.sky
@@ -0,0 +1,27 @@
+<import src="../resources/dump-as-text.sky" />
+<script>
+import "dart:sky";
+
+class FooElement extends Element {
+ FooElement() : super("foo");
+
+ attachedCallback() {
+ print("PASS: FooElement attached.");
+ }
+
+ detachedCallback() {
+ }
+
+ attributeChangedCallbackCount(String name, String oldValue, String newValue) {
+ }
+}
+
+void main() {
+ document.registerElement("foo", FooElement);
+}
+</script>
+<foo />
+<script>
+// This script element creates a microtask checkpoint and ensures that
+// the <foo /> attached callback runs before the test ends.
+</script>

Powered by Google App Engine
This is Rietveld 408576698