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

Unified Diff: LayoutTests/fast/css/variables/cssom-read.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-read.html
diff --git a/LayoutTests/fast/css/variables/cssom-read.html b/LayoutTests/fast/css/variables/cssom-read.html
new file mode 100644
index 0000000000000000000000000000000000000000..c646b081afcbf16b689a032660391575d6642a07
--- /dev/null
+++ b/LayoutTests/fast/css/variables/cssom-read.html
@@ -0,0 +1,38 @@
+<!doctype html>
+
+<pre style="var-a: override me; var-a: apple; var-b: banana;"></pre>
+
+<script>
+if (window.testRunner) {
+ window.testRunner.dumpAsText();
+}
+
+var pre = document.querySelector("pre");
+
+pre.innerText += "Count vars: " + pre.style.var.size + "\n";
+pre.innerText += "\n";
+
+pre.innerText += "Access vars directly:\n";
+pre.innerText += "a: " + pre.style.var.get("a") + "\n";
+pre.innerText += "b: " + pre.style.var.get("b") + "\n";
+pre.innerText += "\n";
+
+pre.innerText += "Access non existent var:\n";
+pre.innerText += "z: " + pre.style.var.get("z") + "\n";
+pre.innerText += "\n";
+
+pre.innerText += "Setting c to carrot and d to dog...\n";
+pre.style.var.set("c", "carrot");
+pre.style.var.set("d", "dog");
+pre.innerText += "\n";
+
+pre.innerText += "Count vars: " + pre.style.var.size + "\n";
+pre.innerText += "\n";
+
+pre.innerText += "Access vars directly:\n";
+pre.innerText += "a: " + pre.style.var.get("a") + "\n";
+pre.innerText += "b: " + pre.style.var.get("b") + "\n";
+pre.innerText += "c: " + pre.style.var.get("c") + "\n";
+pre.innerText += "d: " + pre.style.var.get("d") + "\n";
+
+</script>
« no previous file with comments | « LayoutTests/fast/css/variables/cssom-persistence-expected.txt ('k') | LayoutTests/fast/css/variables/cssom-read-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698