diff options
author | Julien Dramaix <julien.dramaix@gmail.com> | 2011-01-27 22:01:45 +0000 |
---|---|---|
committer | Julien Dramaix <julien.dramaix@gmail.com> | 2011-01-27 22:01:45 +0000 |
commit | d2e8b8f25d222ec12de95ed57c3471ff6573e038 (patch) | |
tree | 3e8d7989bd4af41678f2ef4bde29b1c824a24b00 /gwtquery-core/src/test | |
parent | 3759cf696131454c9f35ef037a96e699f6b7caef (diff) | |
download | gwtquery-d2e8b8f25d222ec12de95ed57c3471ff6573e038.tar.gz gwtquery-d2e8b8f25d222ec12de95ed57c3471ff6573e038.zip |
add position properties
Diffstat (limited to 'gwtquery-core/src/test')
-rw-r--r-- | gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCssTest.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCssTest.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCssTest.java index b35c3ec2..846279bd 100644 --- a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCssTest.java +++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCssTest.java @@ -24,6 +24,7 @@ import com.google.gwt.dom.client.Style.Float; import com.google.gwt.dom.client.Style.FontStyle; import com.google.gwt.dom.client.Style.ListStyleType; import com.google.gwt.dom.client.Style.Overflow; +import com.google.gwt.dom.client.Style.Position; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.dom.client.Style.VerticalAlign; import com.google.gwt.dom.client.Style.Visibility; @@ -718,6 +719,28 @@ public class GQueryCssTest extends GWTTestCase { assertEquals("50px", $("#test").css(CSS.PADDING_RIGHT)); } + public void testPositionProperty() { + + $(e).html("<div id='test'>Content</div>"); + + $("#test").css(CSS.POSITION, Position.ABSOLUTE); + assertEquals("absolute", $("#test").css("position")); + assertEquals("absolute", $("#test").css(CSS.POSITION)); + + $("#test").css(CSS.POSITION, Position.FIXED); + assertEquals("fixed", $("#test").css("position")); + assertEquals("fixed", $("#test").css(CSS.POSITION)); + + $("#test").css(CSS.POSITION, Position.RELATIVE); + assertEquals("relative", $("#test").css("position")); + assertEquals("relative", $("#test").css(CSS.POSITION)); + + $("#test").css(CSS.POSITION, Position.STATIC); + assertEquals("static", $("#test").css("position")); + assertEquals("static", $("#test").css(CSS.POSITION)); + + } + public void testTextAlignProperty() { $(e).html("<div id='test'>Content</div>"); |