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

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: Removed unused IDL callback definition Created 7 years, 6 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..4b83f7ee3f401a098a45ce1e61d3b416166613c1
--- /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.innerHTML += "Test access after removal:\n";
+output.innerHTML += " delete border: " + (innerA.style.var.get("border") ? "fail" : "pass") + "\n";
+output.innerHTML += " set empty color: " + (innerA.style.var.get("color") ? "fail" : "pass") + "\n";
+output.innerHTML += " clear decoration: " + (innerB.style.var.get("decoration") ? "fail" : "pass") + "\n";
+output.innerHTML += "Variable counts after removal: " + innerA.style.var.size + " " + innerB.style.var.size;
+</script>

Powered by Google App Engine
This is Rietveld 408576698