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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/console-test.js"></script>
5 </head>
6
7 <body onload="runTest()">
8
9 <foo-bar></foo-bar>
10 <foo-bar2></foo-bar2>
11 <p>
12 Tests that logging custom elements uses proper formatting.
kozy 2016/06/08 20:58:04 Usually we put test script in head tag before body
luoe 2016/06/09 19:27:44 Done.
13 </p>
14
15 <script>
16 function registerNonElement()
17 {
18 var nonElementProto = {
19 createdCallback: function()
20 {
21 console.dir(this);
22 }
23 };
24 var nonElementOptions = { prototype: nonElementProto };
25 document.registerElement("foo-bar", nonElementOptions);
26 }
27
28 function registerElement()
29 {
30 var elementProto = Object.create(HTMLElement.prototype);
31 elementProto.createdCallback = function()
32 {
33 console.dir(this);
34 };
35 var elementOptions = { prototype: elementProto };
36 document.registerElement("foo-bar2", elementOptions);
37 }
38
39 function test()
40 {
41 InspectorTest.waitUntilMessageReceived(step1);
42 InspectorTest.evaluateInPage("registerNonElement();");
43
44 function step1()
45 {
46 InspectorTest.waitUntilMessageReceived(step2);
47 InspectorTest.evaluateInPage("registerElement();");
48 }
49
50 function step2()
51 {
52 InspectorTest.dumpConsoleMessages();
53 InspectorTest.completeTest();
54 }
55 }
56 </script>
57 </body>
58 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698