* [html5] improve style unit test case @notdanger

Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d2315fb4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d2315fb4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d2315fb4

Branch: refs/heads/0.15-dev
Commit: d2315fb4ac74a7cca7fe33032a80e7e8ed892474
Parents: 229ba3a
Author: erha19 <faterr...@gmail.com>
Authored: Tue Jul 18 11:34:43 2017 +0800
Committer: erha19 <faterr...@gmail.com>
Committed: Tue Jul 18 11:34:43 2017 +0800

----------------------------------------------------------------------
 html5/test/render/vue/utils/style.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d2315fb4/html5/test/render/vue/utils/style.js
----------------------------------------------------------------------
diff --git a/html5/test/render/vue/utils/style.js 
b/html5/test/render/vue/utils/style.js
index 4ef26c0..31b672c 100644
--- a/html5/test/render/vue/utils/style.js
+++ b/html5/test/render/vue/utils/style.js
@@ -17,6 +17,7 @@
  * under the License.
  */
 import {
+  supportHairlines,
   autoPrefix,
   // normalizeStyle,
   normalizeString,
@@ -30,7 +31,12 @@ describe('style', function () {
   // const rect = document.documentElement.getBoundingClientRect()
   // const info = {}
   const { scale, dpr } = init()
-
+  it('should support using 0.5px to paint 1px width border', () => {
+    expect(supportHairlines()).to.be.false
+    window.devicePixelRatio = 2
+    //phantomjs didn't support using 0.5px to paint 1px width border
+    expect(supportHairlines()).to.be.false
+  })
   it('should normalize units numbers', () => {
     expect(normalizeUnitsNum('100px')).to.equal(100 * scale + 'px')
     expect(normalizeUnitsNum('100')).to.equal(100 * scale + 'px')
@@ -68,6 +74,7 @@ describe('autoPrefix', () => {
   const style = {
     width: '200px',
     flexDirection: 'row',
+    flex: 1,
     transform: 'translate3d(100px, 100px, 0)'
   }
 

Reply via email to