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

Side by Side Diff: LayoutTests/inspector/profiler/selector-profiler-url.html

Issue 21049007: DevTools: Drop CSS Selector Profiler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove forgotten test Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/inspector/profiler/selector-profiler-url-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 <style>
4 #input:focus {
5 color: green;
6 }
7 </style>
8 <script src="../../http/tests/inspector/inspector-test.js"></script>
9 <script>
10
11 function focus()
12 {
13 document.getElementById("input").focus();
14 document.width;
15 }
16
17 function test()
18 {
19 CSSAgent.startSelectorProfiler();
20 InspectorTest.evaluateInPage("focus()", step1);
21
22 function step1()
23 {
24 CSSAgent.stopSelectorProfiler(step2);
25 }
26
27 function step2(error, profile)
28 {
29 if (error) {
30 InspectorTest.addResult(error);
31 InspectorTest.completeTest();
32 return;
33 }
34
35 const selector = "#input:focus";
36 for (var i = 0; i < profile.data.length; ++i) {
37 var entry = profile.data[i];
38 if (entry.selector === selector) {
39 var segments = entry.url.split("/");
40 var url = "<empty>";
41 if (segments.length > 3) {
42 segments.splice(0, segments.length - 3);
43 url = segments.join("/");
44 }
45 InspectorTest.addResult(selector + " stylesheet URL: " + url);
46 break;
47 }
48 }
49 InspectorTest.completeTest();
50 }
51 }
52
53 </script>
54 </head>
55
56 <body onload="runTest()">
57 <p>
58 Tests that CSS selector profile entries contain valid stylesheet URLs. <a href=" https://bugs.webkit.org/show_bug.cgi?id=104225">Bug 104225</a>.
59 </p>
60
61 <input type="text" id="input">Value</input>
62 </body>
63 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/profiler/selector-profiler-url-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698