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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/css/variables/cssom-delete.html
diff --git a/LayoutTests/fast/css/variables/cssom-delete.html b/LayoutTests/fast/css/variables/cssom-delete.html
new file mode 100644
index 0000000000000000000000000000000000000000..5a42f2164a8c43f4c4f0a78764b01e2f6004e8c4
--- /dev/null
+++ b/LayoutTests/fast/css/variables/cssom-delete.html
@@ -0,0 +1,34 @@
+<!doctype html>
+
+<style>
+ div {
+ background-color: var(color);
+ border-style: var(border);
+ text-decoration: var(decoration);
+ }
+</style>
+
+<div style="var-color: green; var-border: solid">
+ This div should be green with a solid border and no strikethrough.
+ <div id="innerA" style="var-color: darkred; var-border: dashed">
+ This div should be green with a solid border and no strikethrough.
+ <div id="innerB" style="var-decoration: line-through">This div should be green with a solid border and no strikethrough.</div>
+ </div>
+</div>
+<pre id="output"></pre>
+
+<script>
+var innerA = document.querySelector("#innerA");
+var innerB = document.querySelector("#innerB");
+var output = document.querySelector("#output");
+
+innerA.style.var.delete("color");
+innerA.style.var.set("border", "");
+innerB.style.var.clear();
+
+output.innerText += "Test access after removal:\n";
+output.innerText += " delete border: " + (innerA.style.var.get("border") ? "fail" : "pass") + "\n";
+output.innerText += " set empty color: " + (innerA.style.var.get("color") ? "fail" : "pass") + "\n";
+output.innerText += " clear decoration: " + (innerB.style.var.get("decoration") ? "fail" : "pass") + "\n";
+output.innerText += "Variable counts after removal: " + innerA.style.var.size + " " + innerB.style.var.size;
+</script>
« 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