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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap.html

Issue 1590193002: Partial implementation of inline StylePropertyMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@maps
Patch Set: Update tests Created 4 years, 10 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: third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap.html b/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap.html
new file mode 100644
index 0000000000000000000000000000000000000000..562be042ca9f58460bf0dddf9e71dbbbae9d3ac2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/typedcssom/inlineStylePropertyMap.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+
+<div id="testElement"></div>
+
+<script>
+
+test(function() {
+ assert_equals(null, testElement.styleMap.get('width'));
+
+ testElement.styleMap.set('width', new SimpleLength(10, 'px'));
+ assert_equals('10px', testElement.styleMap.get('width').cssString);
+}, "Setting and getting round trips.");
+
+test(function() {
+ testElement.style.width = '10px';
+ assert_equals(new SimpleLength(10, 'px'), testElement.styleMap.get('width'));
+}, "Changes to element.style are reflected in the element.styleMap");
+
+test(function() {
+ testElement.styleMap.set('width', new SimpleLength(10, 'px'));
+ assert_equals('10px', testElement.style.width);
+}, "changes to element.styleMap are reflected in element.style");
+
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/core.gypi » ('j') | third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698