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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-3/styles-variables.html

Issue 1521323002: Show custom properties in the computed style pane of the inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
(Empty)
1 <html>
2 <head>
3 <style>
4 body {
5 --a: red;
6 }
7
8 #id1 {
9 --b: 44px;
10 }
11
12 #id2 {
13 --a: green;
14 }
15
16 </style>
17 <script src="../../../http/tests/inspector/inspector-test.js"></script>
18 <script src="../../../http/tests/inspector/elements-test.js"></script>
19 <script>
20
21 function test()
22 {
23 InspectorTest.selectNodeAndWaitForStylesWithComputed("id1", step1);
24 function step1(node)
25 {
26 InspectorTest.addResult("==== Computed style for ID1 ====");
27 InspectorTest.dumpSelectedElementStyles(false, true);
28 InspectorTest.cssModel.computedStylePromise(node.id).then(
29 function(style) {
30 InspectorTest.addResult("value of --a: " + style.get("--a"));
31 InspectorTest.selectNodeAndWaitForStylesWithComputed("id2", step 2);
32 });
33 }
34
35 function step2(node)
36 {
37 InspectorTest.addResult("==== Computed style for ID2 ====");
38 InspectorTest.dumpSelectedElementStyles(false, true);
39 InspectorTest.cssModel.computedStylePromise(node.id).then(
40 function(style) {
41 InspectorTest.addResult("value of --b: " + style.get("--b"));
42 InspectorTest.completeTest();
43 });
44 }
45
46 }
47 </script>
48 </head>
49
50 <body onload="runTest()">
51 <p>
52 Tests that computed styles expand and allow tracing to style rules.
53 </p>
54
55 <div id="id1">
56 <div id="id2">
57 </div>
58 </div>
59
60 </body>
61 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698