| 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>
|
|
|