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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/dom-statistics.html-disabled

Issue 2566493004: [DevTools] removed inspector/dom-statistics.html-disabled (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/dom-statistics-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script>
5
6 function test()
7 {
8 function callback(error, result)
9 {
10 for (var i = 0; i < result.length; i++) {
11 var url = result[i].documentURI;
12 if (!url)
13 continue;
14 var index = url.lastIndexOf("/");
15 if (index != -1)
16 url = url.substring(index + 1);
17 result[i].documentURI = "..." + url;
18
19 result[i].nodeCount.sort(function(a, b) {
20 return a.nodeName.localeCompare(b.nodeName);
21 });
22 result[i].listenerCount.sort(function(a, b) {
23 return a.type.localeCompare(b.type);
24 });
25 }
26
27 function stringCompare(a, b)
28 {
29 if (a && b)
30 return a.localeCompare(b);
31 if (!a && !b)
32 return 0;
33 if (a)
34 return 1;
35 return -1;
36 }
37
38 result.sort(function(a, b) {
39 var r = stringCompare(a.documentURI, b.documentURI);
40 if (r)
41 return r;
42 return stringCompare(a.title, b.title);
43 });
44
45 InspectorTest.addResult("result = " + JSON.stringify(result, null, 4));
46 InspectorTest.completeTest();
47 }
48 MemoryAgent.getDOMNodeCount(callback);
49 }
50
51 var detachedDivs = [];
52 function createDetachedNode()
53 {
54 var detachedDiv = document.createElement("div");
55 detachedDiv.addEventListener("click", function(e) {});
56 detachedDiv.addEventListener("mouseover", function(e) {});
57 detachedDiv.appendChild(document.createElement("div"));
58 return detachedDiv;
59 }
60
61 function prepareAndRunTest()
62 {
63 var p = document.getElementById("paragraph");
64 p.addEventListener("click", function(e) {});
65 p.addEventListener("mouseover", function(e) {});
66 document.body.appendChild(document.createElement("div"));
67 detachedDivs.push(createDetachedNode());
68 detachedDivs.push(createDetachedNode());
69
70 runTest();
71 }
72
73 </script>
74 </head>
75
76 <body onload="prepareAndRunTest()">
77 <iframe src="about:blank"></iframe>
78 <p id="paragraph" onclick="alert(1)">
79 Tests that per document Node count is correctly calculated by the Memory agent.
80 <a href="https://bugs.webkit.org/show_bug.cgi?id=74100">Bug 74100.</a>
81 <a href="https://bugs.webkit.org/show_bug.cgi?id=74298">Bug 74298.</a>
82 </p>
83 </body>
84 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/dom-statistics-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698