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

Unified Diff: third_party/WebKit/LayoutTests/inspector/console/console-log-custom-elements.html

Issue 2056433002: DevTools: properly format custom elements without nodenames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 6 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 | third_party/WebKit/LayoutTests/inspector/console/console-log-custom-elements-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/console/console-log-custom-elements.html
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-log-custom-elements.html b/third_party/WebKit/LayoutTests/inspector/console/console-log-custom-elements.html
new file mode 100644
index 0000000000000000000000000000000000000000..2d5d81da1f4f6d97d50a209485cd7e0e83ecd332
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/console/console-log-custom-elements.html
@@ -0,0 +1,57 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/console-test.js"></script>
+<script>
+function registerNonElement()
+{
+ var nonElementProto = {
+ createdCallback: function()
+ {
+ console.dir(this);
+ }
+ };
+ var nonElementOptions = { prototype: nonElementProto };
+ document.registerElement("foo-bar", nonElementOptions);
+}
+
+function registerElement()
+{
+ var elementProto = Object.create(HTMLElement.prototype);
+ elementProto.createdCallback = function()
+ {
+ console.dir(this);
+ };
+ var elementOptions = { prototype: elementProto };
+ document.registerElement("foo-bar2", elementOptions);
+}
+
+function test()
+{
+ InspectorTest.waitUntilMessageReceived(step1);
+ InspectorTest.evaluateInPage("registerNonElement();");
+
+ function step1()
+ {
+ InspectorTest.waitUntilMessageReceived(step2);
+ InspectorTest.evaluateInPage("registerElement();");
+ }
+
+ function step2()
+ {
+ InspectorTest.dumpConsoleMessages();
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+
+<body onload="runTest()">
+<foo-bar></foo-bar>
+<foo-bar2></foo-bar2>
+<p>
+Tests that logging custom elements uses proper formatting.
+</p>
+
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/console/console-log-custom-elements-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698