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

Side by Side Diff: LayoutTests/fast/css/variables/cssom-delete.html

Issue 18311002: Partial implementation of CSSVariablesMap for CSS Variables CSSOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased onto ToT, cleaned up includes Created 7 years, 5 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
OLDNEW
(Empty)
1 <!doctype html>
2
3 <style>
4 div {
5 background-color: var(color);
6 border-style: var(border);
7 text-decoration: var(decoration);
8 }
9 </style>
10
11 <div style="var-color: green; var-border: solid">
12 This div should be green with a solid border and no strikethrough.
13 <div id="innerA" style="var-color: darkred; var-border: dashed">
14 This div should be green with a solid border and no strikethrough.
15 <div id="innerB" style="var-decoration: line-through">This div should be green with a solid border and no strikethrough.</div>
16 </div>
17 </div>
18 <pre id="output"></pre>
19
20 <script>
21 var innerA = document.querySelector("#innerA");
22 var innerB = document.querySelector("#innerB");
23 var output = document.querySelector("#output");
24
25 innerA.style.var.delete("color");
26 innerA.style.var.set("border", "");
27 innerB.style.var.clear();
28
29 output.innerText += "Test access after removal:\n";
30 output.innerText += " delete border: " + (innerA.style.var.get("border") ? "f ail" : "pass") + "\n";
31 output.innerText += " set empty color: " + (innerA.style.var.get("color") ? " fail" : "pass") + "\n";
32 output.innerText += " clear decoration: " + (innerB.style.var.get("decoration ") ? "fail" : "pass") + "\n";
33 output.innerText += "Variable counts after removal: " + innerA.style.var.size + " " + innerB.style.var.size;
34 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/variables/cssom-create-expected.html ('k') | LayoutTests/fast/css/variables/cssom-delete-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698