You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/06/02 02:49:55 UTC

[01/36] incubator-weex git commit: * [android] enable network inspector on playground

Repository: incubator-weex
Updated Branches:
  refs/heads/0.14-dev 76dd7751a -> 6c30b4371


* [android] enable network inspector on playground


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

Branch: refs/heads/0.14-dev
Commit: cceeabf3d41c98ee896d75eb6b1515fadf982327
Parents: 42f2a85
Author: moxun.ljf <fu...@foxmail.com>
Authored: Wed May 3 09:42:15 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Wed May 3 09:42:15 2017 +0800

----------------------------------------------------------------------
 android/commons/build.gradle                    |   1 +
 .../adapter/DefaultWebSocketAdapter.java        |  54 +++++-
 .../weex/commons/util/RequestIdGenerator.java   |  15 ++
 .../weex/commons/util/WSEventReporter.java      | 192 +++++++++++++++++++
 .../java/com/alibaba/weex/WXApplication.java    |   2 +
 .../extend/adapter/InterceptWXHttpAdapter.java  |  57 +++---
 android/playground/build.gradle                 |   1 +
 .../com/taobao/weex/bridge/WXBridgeManager.java |   1 +
 8 files changed, 291 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cceeabf3/android/commons/build.gradle
----------------------------------------------------------------------
diff --git a/android/commons/build.gradle b/android/commons/build.gradle
index 64090ab..a47f0c2 100644
--- a/android/commons/build.gradle
+++ b/android/commons/build.gradle
@@ -45,6 +45,7 @@ dependencies {
     compile project(':weex_sdk')
     compile 'com.squareup.picasso:picasso:2.5.2'
     compile 'com.facebook.fresco:fresco:0.10.0'
+    compile 'com.taobao.android.weex_inspection:protocol:1.1.2'
 
     provided 'com.taobao.android:weex_analyzer:0.1.0.5'
     provided 'com.squareup.okhttp:okhttp:2.3.0'

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cceeabf3/android/commons/src/main/java/com/alibaba/weex/commons/adapter/DefaultWebSocketAdapter.java
----------------------------------------------------------------------
diff --git a/android/commons/src/main/java/com/alibaba/weex/commons/adapter/DefaultWebSocketAdapter.java b/android/commons/src/main/java/com/alibaba/weex/commons/adapter/DefaultWebSocketAdapter.java
index 2529730..22810dc 100644
--- a/android/commons/src/main/java/com/alibaba/weex/commons/adapter/DefaultWebSocketAdapter.java
+++ b/android/commons/src/main/java/com/alibaba/weex/commons/adapter/DefaultWebSocketAdapter.java
@@ -20,6 +20,8 @@ package com.alibaba.weex.commons.adapter;
 
 import android.support.annotation.Nullable;
 
+import com.alibaba.weex.commons.util.WSEventReporter;
+import com.squareup.okhttp.Headers;
 import com.squareup.okhttp.OkHttpClient;
 import com.squareup.okhttp.Request;
 import com.squareup.okhttp.Response;
@@ -28,9 +30,13 @@ import com.squareup.okhttp.ws.WebSocketCall;
 import com.squareup.okhttp.ws.WebSocketListener;
 import com.taobao.weex.appfram.websocket.IWebSocketAdapter;
 import com.taobao.weex.appfram.websocket.WebSocketCloseCodes;
+import com.taobao.weex.http.Status;
 
 import java.io.EOFException;
 import java.io.IOException;
+import java.lang.reflect.Field;
+import java.util.HashMap;
+import java.util.Map;
 
 import okio.Buffer;
 import okio.BufferedSource;
@@ -43,10 +49,12 @@ public class DefaultWebSocketAdapter implements IWebSocketAdapter {
 
     private WebSocket ws;
     private EventListener eventListener;
+    private WSEventReporter wsEventReporter;
 
     @Override
-    public void connect(String url, @Nullable String protocol, EventListener listener) {
+    public void connect(String url, @Nullable final String protocol, EventListener listener) {
         this.eventListener = listener;
+        this.wsEventReporter = WSEventReporter.newInstance();
         OkHttpClient okHttpClient = new OkHttpClient();
 
         Request.Builder builder = new Request.Builder();
@@ -56,17 +64,51 @@ public class DefaultWebSocketAdapter implements IWebSocketAdapter {
         }
 
         builder.url(url);
+        wsEventReporter.created(url);
+
+        Request wsRequest = builder.build();
+        WebSocketCall webSocketCall = WebSocketCall.create(okHttpClient, wsRequest);
+
+        try {
+            Field field = WebSocketCall.class.getDeclaredField("request");
+            field.setAccessible(true);
+            Request realRequest = (Request) field.get(webSocketCall);
+            Headers wsHeaders = realRequest.headers();
+            Map<String, String> headers = new HashMap<>();
+            for (String name : wsHeaders.names()) {
+                headers.put(name, wsHeaders.values(name).toString());
+            }
+            wsEventReporter.willSendHandshakeRequest(headers, null);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
 
-        WebSocketCall.create(okHttpClient, builder.build()).enqueue(new WebSocketListener() {
+        webSocketCall.enqueue(new WebSocketListener() {
             @Override
             public void onOpen(WebSocket webSocket, Request request, Response response) throws IOException {
                 ws = webSocket;
                 eventListener.onOpen();
+                Headers wsHeaders = response.headers();
+                Map<String, String> headers = new HashMap<>();
+                for (String name : wsHeaders.names()) {
+                    headers.put(name, wsHeaders.values(name).toString());
+                }
+                wsEventReporter.handshakeResponseReceived(response.code(),
+                        Status.getStatusText(String.valueOf(response.code())),
+                        headers);
             }
 
             @Override
             public void onMessage(BufferedSource payload, WebSocket.PayloadType type) throws IOException {
-                eventListener.onMessage(payload.readUtf8());
+                if (type == WebSocket.PayloadType.BINARY) {
+                    wsEventReporter.frameReceived(payload.readByteArray());
+                } else {
+                    String message = payload.readUtf8();
+                    eventListener.onMessage(message);
+                    wsEventReporter.frameReceived(message);
+                }
                 payload.close();
             }
 
@@ -78,6 +120,7 @@ public class DefaultWebSocketAdapter implements IWebSocketAdapter {
             @Override
             public void onClose(int code, String reason) {
                 eventListener.onClose(code, reason, true);
+                wsEventReporter.closed();
             }
 
             @Override
@@ -85,8 +128,10 @@ public class DefaultWebSocketAdapter implements IWebSocketAdapter {
                 e.printStackTrace();
                 if (e instanceof EOFException) {
                     eventListener.onClose(WebSocketCloseCodes.CLOSE_NORMAL.getCode(), WebSocketCloseCodes.CLOSE_NORMAL.name(), true);
+                    wsEventReporter.closed();
                 } else {
                     eventListener.onError(e.getMessage());
+                    wsEventReporter.frameError(e.getMessage());
                 }
             }
         });
@@ -100,9 +145,12 @@ public class DefaultWebSocketAdapter implements IWebSocketAdapter {
                 ws.sendMessage(WebSocket.PayloadType.TEXT, buffer.buffer());
                 buffer.flush();
                 buffer.close();
+
+                wsEventReporter.frameSent(data);
             } catch (Exception e) {
                 e.printStackTrace();
                 reportError(e.getMessage());
+                wsEventReporter.frameError(e.getMessage());
             }
         } else {
             reportError("WebSocket is not ready");

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cceeabf3/android/commons/src/main/java/com/alibaba/weex/commons/util/RequestIdGenerator.java
----------------------------------------------------------------------
diff --git a/android/commons/src/main/java/com/alibaba/weex/commons/util/RequestIdGenerator.java b/android/commons/src/main/java/com/alibaba/weex/commons/util/RequestIdGenerator.java
new file mode 100644
index 0000000..35619e9
--- /dev/null
+++ b/android/commons/src/main/java/com/alibaba/weex/commons/util/RequestIdGenerator.java
@@ -0,0 +1,15 @@
+package com.alibaba.weex.commons.util;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Created by moxun on 17/4/20.
+ */
+
+public class RequestIdGenerator {
+    private static final AtomicInteger sIdGenerator = new AtomicInteger(0);
+
+    public static int nextRequestId() {
+        return sIdGenerator.getAndIncrement();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cceeabf3/android/commons/src/main/java/com/alibaba/weex/commons/util/WSEventReporter.java
----------------------------------------------------------------------
diff --git a/android/commons/src/main/java/com/alibaba/weex/commons/util/WSEventReporter.java b/android/commons/src/main/java/com/alibaba/weex/commons/util/WSEventReporter.java
new file mode 100644
index 0000000..720f0de
--- /dev/null
+++ b/android/commons/src/main/java/com/alibaba/weex/commons/util/WSEventReporter.java
@@ -0,0 +1,192 @@
+package com.alibaba.weex.commons.util;
+
+import android.support.annotation.Nullable;
+import android.util.Pair;
+
+import com.taobao.weex.devtools.inspector.network.NetworkEventReporter;
+import com.taobao.weex.devtools.inspector.network.NetworkEventReporterManager;
+import com.taobao.weex.devtools.inspector.network.SimpleBinaryInspectorWebSocketFrame;
+import com.taobao.weex.devtools.inspector.network.SimpleTextInspectorWebSocketFrame;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by moxun on 17/4/20.
+ */
+
+public class WSEventReporter {
+
+    private String requestId;
+    private NetworkEventReporter reporter;
+    private WSRequest request;
+
+    public static WSEventReporter newInstance() {
+        return new WSEventReporter();
+    }
+
+    private WSEventReporter() {
+        requestId = String.valueOf(RequestIdGenerator.nextRequestId());
+        reporter = NetworkEventReporterManager.get();
+    }
+
+    public void created(String url) {
+        if (reporter != null) {
+            reporter.webSocketCreated(requestId, url);
+        }
+    }
+
+    public void closed() {
+        if (reporter != null) {
+            reporter.webSocketClosed(requestId);
+        }
+    }
+
+    public void willSendHandshakeRequest(Map<String, String> headers, @Nullable String friendlyName) {
+        if (reporter != null) {
+            request = new WSRequest(requestId, friendlyName, headers);
+            reporter.webSocketWillSendHandshakeRequest(request);
+        }
+    }
+
+    public void handshakeResponseReceived(int code, String phrase, Map<String, String> responseHeaders) {
+        if (reporter != null) {
+            reporter.webSocketHandshakeResponseReceived(new WSResponse(requestId, code, phrase, responseHeaders, request));
+        }
+    }
+
+    public void frameSent(String frame) {
+        if (reporter != null) {
+            reporter.webSocketFrameSent(new SimpleTextInspectorWebSocketFrame(requestId, frame));
+        }
+    }
+
+    public void frameSent(byte[] frame) {
+        if (reporter != null) {
+            reporter.webSocketFrameSent(new SimpleBinaryInspectorWebSocketFrame(requestId, frame));
+        }
+    }
+
+    public void frameReceived(String frame) {
+        if (reporter != null) {
+            reporter.webSocketFrameReceived(new SimpleTextInspectorWebSocketFrame(requestId, frame));
+        }
+    }
+
+    public void frameReceived(byte[] frame) {
+        if (reporter != null) {
+            reporter.webSocketFrameReceived(new SimpleBinaryInspectorWebSocketFrame(requestId, frame));
+        }
+    }
+
+    public void frameError(String msg) {
+        if (reporter != null) {
+            reporter.webSocketFrameError(requestId, msg);
+        }
+    }
+
+    private static class WSRequest extends WSHeaderCommon implements NetworkEventReporter.InspectorWebSocketRequest {
+
+        private String id;
+        private String name;
+
+        public WSRequest(String id, String name, Map<String, String> headers) {
+            attachHeaders(headers);
+            this.id = id;
+            this.name = name;
+            if (this.name == null) {
+                this.name = "WS Connection " + id;
+            }
+        }
+
+        @Override
+        public String id() {
+            return id;
+        }
+
+        @Override
+        public String friendlyName() {
+            return name;
+        }
+    }
+
+    private static class WSResponse extends WSHeaderCommon implements NetworkEventReporter.InspectorWebSocketResponse {
+
+        private String id;
+        private int code;
+        private String phrase;
+        private WSHeaderCommon headers;
+
+        public WSResponse(String id, int code, String phrase, Map<String, String> responseHeaders, WSHeaderCommon headers) {
+            attachHeaders(responseHeaders);
+            this.id = id;
+            this.code = code;
+            this.phrase = phrase;
+            this.headers = headers;
+        }
+
+        @Override
+        public String requestId() {
+            return id;
+        }
+
+        @Override
+        public int statusCode() {
+            return code;
+        }
+
+        @Override
+        public String reasonPhrase() {
+            return phrase;
+        }
+
+        @Nullable
+        @Override
+        public NetworkEventReporter.InspectorHeaders requestHeaders() {
+            return headers;
+        }
+    }
+
+    private static class WSHeaderCommon implements NetworkEventReporter.InspectorHeaders {
+
+        private List<Pair<String, String>> headerList = new ArrayList<>();
+
+        public void attachHeaders(Map<String, String> headers) {
+            for (Map.Entry<String, String> entry : headers.entrySet()) {
+                headerList.add(new Pair<>(entry.getKey(), entry.getValue()));
+            }
+        }
+
+        public void addHeader(String key, String value) {
+            headerList.add(new Pair<>(key, value));
+        }
+
+
+        @Override
+        public int headerCount() {
+            return headerList.size();
+        }
+
+        @Override
+        public String headerName(int index) {
+            return headerList.get(index).first;
+        }
+
+        @Override
+        public String headerValue(int index) {
+            return headerList.get(index).second;
+        }
+
+        @Nullable
+        @Override
+        public String firstHeaderValue(String name) {
+            for (Pair<String, String> pair : headerList) {
+                if (pair.first.equals(name)) {
+                    return pair.second;
+                }
+            }
+            return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cceeabf3/android/playground/app/src/main/java/com/alibaba/weex/WXApplication.java
----------------------------------------------------------------------
diff --git a/android/playground/app/src/main/java/com/alibaba/weex/WXApplication.java b/android/playground/app/src/main/java/com/alibaba/weex/WXApplication.java
index 170b404..283a44f 100644
--- a/android/playground/app/src/main/java/com/alibaba/weex/WXApplication.java
+++ b/android/playground/app/src/main/java/com/alibaba/weex/WXApplication.java
@@ -26,6 +26,7 @@ import com.alibaba.weex.commons.adapter.DefaultWebSocketAdapterFactory;
 import com.alibaba.weex.commons.adapter.ImageAdapter;
 import com.alibaba.weex.commons.adapter.JSExceptionAdapter;
 import com.alibaba.weex.extend.PlayDebugAdapter;
+import com.alibaba.weex.extend.adapter.InterceptWXHttpAdapter;
 import com.alibaba.weex.extend.component.RichText;
 import com.alibaba.weex.extend.component.WXComponentSyncTest;
 import com.alibaba.weex.extend.component.WXMask;
@@ -67,6 +68,7 @@ public class WXApplication extends Application {
                                .setDebugAdapter(new PlayDebugAdapter())
                                .setWebSocketAdapterFactory(new DefaultWebSocketAdapterFactory())
                                .setJSExceptionAdapter(new JSExceptionAdapter())
+                               .setHttpAdapter(new InterceptWXHttpAdapter())
                                .build()
                           );
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cceeabf3/android/playground/app/src/main/java/com/alibaba/weex/extend/adapter/InterceptWXHttpAdapter.java
----------------------------------------------------------------------
diff --git a/android/playground/app/src/main/java/com/alibaba/weex/extend/adapter/InterceptWXHttpAdapter.java b/android/playground/app/src/main/java/com/alibaba/weex/extend/adapter/InterceptWXHttpAdapter.java
index 0fa6067..58c8254 100644
--- a/android/playground/app/src/main/java/com/alibaba/weex/extend/adapter/InterceptWXHttpAdapter.java
+++ b/android/playground/app/src/main/java/com/alibaba/weex/extend/adapter/InterceptWXHttpAdapter.java
@@ -36,46 +36,45 @@ import java.net.HttpURLConnection;
 
 public class InterceptWXHttpAdapter extends DefaultWXHttpAdapter {
 
-    private IEventReporterDelegate eventReporterDelegate;
-
     @NonNull
     @Override
     public IEventReporterDelegate getEventReporterDelegate() {
-        if (eventReporterDelegate == null) {
-            eventReporterDelegate = new IEventReporterDelegate() {
+        return new IEventReporterDelegate() {
 
-                WeexURLConnectionManager manager = new WeexURLConnectionManager(null);
+            WeexURLConnectionManager manager = new WeexURLConnectionManager(null);
 
-                @Override
-                public void preConnect(HttpURLConnection connection, @Nullable String body) {
-                    SimpleRequestEntity requestEntity = null;
-                    if (body != null) {
-                        requestEntity = new ByteArrayRequestEntity(body.getBytes());
-                    }
+            @Override
+            public void preConnect(HttpURLConnection connection, @Nullable String body) {
+                SimpleRequestEntity requestEntity = null;
+                if (body != null) {
+                    requestEntity = new ByteArrayRequestEntity(body.getBytes());
+                }
 
+                try {
                     manager.preConnect(connection, requestEntity);
+                } catch (Throwable throwable) {
+                    manager.httpExchangeFailed(new IOException("Exception on preConnect", throwable));
                 }
+            }
 
-                @Override
-                public void postConnect() {
-                    try {
-                        manager.postConnect();
-                    } catch (IOException e) {
-                        e.printStackTrace();
-                    }
+            @Override
+            public void postConnect() {
+                try {
+                    manager.postConnect();
+                } catch (IOException e) {
+                    e.printStackTrace();
                 }
+            }
 
-                @Override
-                public InputStream interpretResponseStream(@Nullable InputStream inputStream) {
-                    return manager.interpretResponseStream(inputStream);
-                }
+            @Override
+            public InputStream interpretResponseStream(@Nullable InputStream inputStream) {
+                return manager.interpretResponseStream(inputStream);
+            }
 
-                @Override
-                public void httpExchangeFailed(IOException e) {
-                    manager.httpExchangeFailed(e);
-                }
-            };
-        }
-        return eventReporterDelegate;
+            @Override
+            public void httpExchangeFailed(IOException e) {
+                manager.httpExchangeFailed(e);
+            }
+        };
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cceeabf3/android/playground/build.gradle
----------------------------------------------------------------------
diff --git a/android/playground/build.gradle b/android/playground/build.gradle
index 65ab77f..f08b50c 100755
--- a/android/playground/build.gradle
+++ b/android/playground/build.gradle
@@ -12,6 +12,7 @@ buildscript {
 
 allprojects {
     repositories {
+        maven { url "http://mvnrepo.alibaba-inc.com/mvn/repository" }
         mavenCentral()
         jcenter()
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cceeabf3/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index e056663..65cd60e 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
@@ -206,6 +206,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
         // ignore
       }
 
+      //FIXME:
       WXServiceManager.execAllCacheJsService();
     }
     if (remoteDebug && mWxDebugProxy != null) {


[11/36] incubator-weex git commit: + [test] add testcase

Posted by so...@apache.org.
+ [test] add testcase


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

Branch: refs/heads/0.14-dev
Commit: ca5c57e58d528cced9db348572fafe4e791b3906
Parents: da396f4
Author: moxun.ljf <fu...@foxmail.com>
Authored: Fri May 26 11:52:47 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Fri May 26 11:52:47 2017 +0800

----------------------------------------------------------------------
 .../WeexDemo.xcodeproj/project.pbxproj          |   4 +-
 test/mocha.opts                                 |   3 +-
 test/pages/components/scroller-fixed.vue        |  14 +-
 test/pages/components/slider-common.vue         | 229 +++++++++++++++++++
 test/screenshot/border-android.png              | Bin 196752 -> 207443 bytes
 test/scripts/components/recycler.test.js        |   6 +-
 test/scripts/components/scroller-fixed.test.js  |   5 +-
 test/scripts/components/slider-common.test.js   | 100 ++++++++
 8 files changed, 346 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ca5c57e5/ios/playground/WeexDemo.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/ios/playground/WeexDemo.xcodeproj/project.pbxproj b/ios/playground/WeexDemo.xcodeproj/project.pbxproj
index feced52..a9d61fc 100644
--- a/ios/playground/WeexDemo.xcodeproj/project.pbxproj
+++ b/ios/playground/WeexDemo.xcodeproj/project.pbxproj
@@ -491,7 +491,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n";
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n";
 			showEnvVarsInLog = 0;
 		};
 		84361D6F1CA10F8E00F43825 /* [CP] Copy Pods Resources */ = {
@@ -536,7 +536,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n";
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n";
 			showEnvVarsInLog = 0;
 		};
 		C715566148067A7FFAB7797D /* [CP] Copy Pods Resources */ = {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ca5c57e5/test/mocha.opts
----------------------------------------------------------------------
diff --git a/test/mocha.opts b/test/mocha.opts
index 78b2a18..63b406d 100644
--- a/test/mocha.opts
+++ b/test/mocha.opts
@@ -1,2 +1 @@
---recursive
---bail
\ No newline at end of file
+--recursive
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ca5c57e5/test/pages/components/scroller-fixed.vue
----------------------------------------------------------------------
diff --git a/test/pages/components/scroller-fixed.vue b/test/pages/components/scroller-fixed.vue
index 50c7c82..538edcb 100644
--- a/test/pages/components/scroller-fixed.vue
+++ b/test/pages/components/scroller-fixed.vue
@@ -1,10 +1,12 @@
 <template>
-  <scroller ref="container" class="container" @scroll="onscroll">
-      <div><text>{{vp}}|{{p1}}|{{p2}}</text></div>
-    <div v-for="item in items" style="background-color:yellow;height:300"><text >row</text></div>
-    <div ref="panel" class="fixed-panel"></div>
-    <div ref="panel2" class="fixed-panel2"></div>
-  </scroller>
+  <div>
+    <scroller ref="container" class="container" @scroll="onscroll">
+      <div test-id='div_1' style="position:fixed; top: 0; left: 100px;"><text test-id='text_1'>{{vp}}|{{p1}}|{{p2}}</text></div>
+      <div v-for="item in items" style="background-color:yellow;height:300"><text >row</text></div>
+      <div ref="panel" class="fixed-panel"></div>
+      <div ref="panel2" class="fixed-panel2"></div>
+    </scroller>
+  </div>
 </template>
 <style>
   .container {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ca5c57e5/test/pages/components/slider-common.vue
----------------------------------------------------------------------
diff --git a/test/pages/components/slider-common.vue b/test/pages/components/slider-common.vue
new file mode 100644
index 0000000..841f5ca
--- /dev/null
+++ b/test/pages/components/slider-common.vue
@@ -0,0 +1,229 @@
+<template>
+  <div style="padding: 23px">
+    <div class="segment">
+      <text class="segment-title">OnScroll & OnChange Event</text>
+      <div class="debug-panel" style="margin: 10px">
+        <text test-id='s1_p'>{{progress}}</text>
+        <text test-id='s1_f'>{{flag}}</text>
+        <text test-id='s1_d'>{{direction}}</text>
+        <text test-id='s1_i'>{{index}}</text>
+      </div>
+      <div style="height: 60px; flex-direction: row;">
+        <div test-id='s1_page0' style="flex: 1;background-color: darkcyan;justify-content: center;align-items: center"
+             @click="goto(0)">
+          <text class="page-title">Page 1</text>
+        </div>
+        <div test-id='s1_page1' style="flex: 1;background-color: aquamarine;justify-content: center;align-items: center"
+             @click="goto(1)">
+          <text class="page-title">Page 2</text>
+        </div>
+        <div test-id='s1_page2' style="flex: 1;background-color: darkcyan;justify-content: center;align-items: center"
+             @click="goto(2)">
+          <text class="page-title">Page 3</text>
+        </div>
+      </div>
+      <div style="height: 10px;background-color: skyblue">
+        <div :style="{ width: '233px', height: '10px', marginLeft: progress, backgroundColor: 'black' }"></div>
+      </div>
+      <slider test-id='slider_1' ref="slider_1" class="slider" interval="4500" @change="onchange" append="tree"
+              :index="index"
+              @scroll="onscroll" offset-x-accuracy="0.01">
+        <div class="frame" v-for="img in imageList">
+          <image class="image" resize="cover" :src="img.src"></image>
+          <text class="title">{{img.title}}</text>
+        </div>
+        <indicator style="height: 20px"></indicator>
+      </slider>
+    </div>
+    <div class="segment" style="margin-top: 20px">
+      <text class="segment-title">Infinite Scroll = true</text>
+      <div class="debug-panel">
+        <text test-id='s2_switch' :style="{ height: '48px', padding: '10px', backgroundColor: bg1, fontWeight: 'bold' }"
+              @click="toggle(1, true)">{{status1}}
+        </text>
+        <div style="flex-direction: row">
+          <text style="padding: 10px;">switch count:</text>
+          <text test-id='s2_count' style="font-size: 40px;margin-right: 10px;color: green">{{count1}}</text>
+        </div>
+      </div>
+      <slider test-id='slider_2' class="slider" :auto-play="autoPlay1" interval="500" @change="update(1)">
+        <div class="frame" v-for="img in imageList2">
+          <image class="image" resize="cover" :src="img.src"></image>
+          <text class="title">{{img.title}}</text>
+        </div>
+      </slider>
+    </div>
+
+    <div class="segment" style="margin-top: 20px">
+      <text class="segment-title">Infinite Scroll = false</text>
+      <div class="debug-panel">
+        <text test-id='s3_switch' :style="{ height: '48px', padding: '10px', backgroundColor: bg2, fontWeight: 'bold' }"
+              @click="toggle(2, true)">{{status2}}
+        </text>
+        <div style="flex-direction: row">
+          <text style="padding: 10px;">switch count:</text>
+          <text test-id='s3_count' style="font-size: 40px;margin-right: 10px;color: green">{{count2}}</text>
+        </div>
+      </div>
+      <slider test-id='slider_3' class="slider" infinite="false" :auto-play="autoPlay2" interval="500"
+              @change="update(2)">
+        <div class="frame" v-for="img in imageList2">
+          <image class="image" resize="cover" :src="img.src"></image>
+          <text class="title">{{img.title}}</text>
+        </div>
+        <indicator style="height: 20px"></indicator>
+      </slider>
+    </div>
+  </div>
+</template>
+<style scoped>
+  .page-title {
+    color: black;
+    font-size: 30px;
+    font-weight: bold;
+  }
+
+  .segment-title {
+    font-size: 30px;
+    background-color: lightgray;
+    padding: 10px;
+  }
+
+  .segment {
+    border-color: black;
+    border-width: 2px;
+  }
+
+  .image {
+    width: 700px;
+    height: 200px;
+  }
+
+  .slider {
+    width: 700px;
+    height: 200px;
+  }
+
+  .title {
+    position: absolute;
+    top: 20px;
+    left: 20px;
+    padding-left: 20px;
+    width: 200px;
+    color: #FFFFFF;
+    font-size: 36px;
+    line-height: 60px;
+    background-color: rgba(0, 0, 0, 0.3);
+  }
+
+  .frame {
+    width: 700px;
+    height: 200px;
+  }
+
+  .debug-panel {
+    flex-direction: row;
+    justify-content: space-between;
+  }
+</style>
+<script>
+  module.exports = {
+    data: {
+      imageList: [{
+        title: 'Page 1',
+        src: 'https://gd2.alicdn.com/bao/uploaded/i2/T14H1LFwBcXXXXXXXX_!!0-item_pic.jpg'
+      }, {
+        title: 'Page 2',
+        src: 'https://gd1.alicdn.com/bao/uploaded/i1/TB1PXJCJFXXXXciXFXXXXXXXXXX_!!0-item_pic.jpg'
+      }, {
+        title: 'Page 3',
+        src: 'https://gd3.alicdn.com/bao/uploaded/i3/TB1x6hYLXXXXXazXVXXXXXXXXXX_!!0-item_pic.jpg'
+      }],
+      imageList2: [{
+        title: 'Page 1',
+        src: 'https://gd2.alicdn.com/bao/uploaded/i2/T14H1LFwBcXXXXXXXX_!!0-item_pic.jpg'
+      }, {
+        title: 'Page 2',
+        src: 'https://gd1.alicdn.com/bao/uploaded/i1/TB1PXJCJFXXXXciXFXXXXXXXXXX_!!0-item_pic.jpg'
+      }],
+      index: 0,
+      progress: 0,
+      ratio: 0,
+      direction: 'unknown',
+      count: 0,
+      switchCount: 0,
+      flag: false,
+      autoPlay1: false,
+      autoPlay2: false,
+      bg1: 'greenyellow',
+      bg2: 'greenyellow'
+      ,
+      status1: 'PLAY'
+      ,
+      status2: 'PLAY'
+      ,
+      count1: 0
+      ,
+      count2: 0
+    },
+    methods: {
+      goto(i) {
+        this.index = i;
+        this.progress = i * 233;
+      },
+      onscroll(e) {
+        var ratio = parseFloat(e.offsetXRatio);
+        if (Math.abs(ratio) > 0.05) {
+          if (ratio < 0) {
+            this.direction = 'left';
+          } else if (ratio > 0) {
+            this.direction = 'right';
+          }
+        }
+        this.progress = 233 * this.index + 233 * -ratio;
+        this.count++;
+        this.flag = this.count / 100 < this.switchCount;
+      },
+      onchange(e) {
+        this.goto(parseInt(e.index));
+        this.switchCount++;
+      },
+      update(index) {
+        console.log('update switch count >>>')
+        if (index == 1) {
+          this.count1++;
+        } else if (index == 2) {
+          this.count2++;
+        }
+      },
+      toggle(index, repeat) {
+        var self = this;
+        if (index == 1) {
+          if (this.autoPlay1) {
+            this.status1 = 'PLAY';
+            this.bg1 = 'greenyellow';
+          } else {
+            this.status1 = 'STOP';
+            this.bg1 = 'red';
+          }
+          this.autoPlay1 = !this.autoPlay1;
+        } else if (index == 2) {
+          if (this.autoPlay2) {
+            this.status2 = 'PLAY';
+            this.bg2 = 'greenyellow';
+          } else {
+            this.status2 = 'STOP';
+            this.bg2 = 'red';
+          }
+          this.autoPlay2 = !this.autoPlay2;
+        }
+
+        if (repeat) {
+          setTimeout(function () {
+            self.toggle(index, false);
+          }, 5000);
+        }
+      },
+    },
+  };
+</script>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ca5c57e5/test/screenshot/border-android.png
----------------------------------------------------------------------
diff --git a/test/screenshot/border-android.png b/test/screenshot/border-android.png
index 637bd99..851e4b9 100644
Binary files a/test/screenshot/border-android.png and b/test/screenshot/border-android.png differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ca5c57e5/test/scripts/components/recycler.test.js
----------------------------------------------------------------------
diff --git a/test/scripts/components/recycler.test.js b/test/scripts/components/recycler.test.js
index 32586ff..025fec2 100644
--- a/test/scripts/components/recycler.test.js
+++ b/test/scripts/components/recycler.test.js
@@ -366,15 +366,15 @@ describe('recycler @ignore-android @ignore-ios', function () {
       console.log(text)
       originContentOffset = Number.parseInt(text.replace('Content Offset:-',''))
     })
-    .touch('drag', {fromX:recyclerWidth / 2, fromY:screenHeight / 5, toX:recyclerWidth / 2, toY: screenHeight * 4 / 5,duration:2})
+    .touch('drag', {fromX:recyclerWidth / 2, fromY:screenHeight / 5, toX:recyclerWidth / 2, toY: screenHeight * 4 / 5, duration: 2})
     .sleep(1000)
-    .touch('drag', {fromX:recyclerWidth / 2, fromY:screenHeight / 5, toX:recyclerWidth / 2, toY: screenHeight * 4 / 5,duration:2})
+    .touch('drag', {fromX:recyclerWidth / 2, fromY:screenHeight / 5, toX:recyclerWidth / 2, toY: screenHeight * 4 / 5, duration: 2})
     .elementById('stickyText1')
     .text()
     .then(text => {
       console.log(text)
       const contentOffset = Number.parseInt(text.replace('Content Offset:-',''))
-      assert.isOk(originContentOffset - contentOffset > 20 / scaleFactor)
+      assert.isOk(originContentOffset - contentOffset > screenHeight / scaleFactor)
     })
     .elementById('fixed1')
     .click()

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ca5c57e5/test/scripts/components/scroller-fixed.test.js
----------------------------------------------------------------------
diff --git a/test/scripts/components/scroller-fixed.test.js b/test/scripts/components/scroller-fixed.test.js
index 3902be3..3ca8381 100644
--- a/test/scripts/components/scroller-fixed.test.js
+++ b/test/scripts/components/scroller-fixed.test.js
@@ -32,7 +32,7 @@ describe('scroller fixed position item ', function () {
   before(function () {
     return util.init(driver)
       .get(util.getPage('/components/scroller-fixed.js'))
-      .waitForElementByXPath('//scroller[1]/div[1]',util.getGETActionWaitTimeMills(),1000)
+      .waitForElementById('div_1',util.getGETActionWaitTimeMills(),1000)
   });
 
   after(function () {
@@ -43,7 +43,8 @@ describe('scroller fixed position item ', function () {
   it('#1 position:fixed items', () => {
     return driver
     .dragUpAndDown()
-    .elementByXPath('//scroller[1]/div[1]/text[1]')
+    .sleep(1000)
+    .elementById('text_1')
     .text()
     .then((text)=>{
         var parts = text.split("|");

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ca5c57e5/test/scripts/components/slider-common.test.js
----------------------------------------------------------------------
diff --git a/test/scripts/components/slider-common.test.js b/test/scripts/components/slider-common.test.js
new file mode 100644
index 0000000..80855cd
--- /dev/null
+++ b/test/scripts/components/slider-common.test.js
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+'use strict';
+
+var _ = require('macaca-utils');
+var assert = require('chai').assert
+var wd = require('weex-wd')
+var path = require('path');
+var os = require('os');
+var util = require("../util.js");
+
+describe('slider common', function () {
+  this.timeout(util.getTimeoutMills());
+  var driver = util.createDriver(wd);
+
+  before(function () {
+    return util.init(driver)
+      .get(util.getPage('/components/slider-common.js'))
+      .waitForElementById('slider_1', util.getGETActionWaitTimeMills(), 1000)
+  });
+
+  after(function () {
+    return util.quit(driver);
+  });
+
+
+  it('#1 OnScroll & onChange Event', () => {
+    return driver
+      .sleep(3000)
+      .elementById('s1_page1')
+      .click()
+      .elementById('s1_p')
+      .text()
+      .then(t => {
+        assert.equal(t, '233')
+      })
+      .elementById('s1_i')
+      .text()
+      .then(t => {
+        assert.equal(t, '1')
+      })
+      .elementById('slider_1')
+      .touch('drag', {fromX: 1000, toX: -1000, fromY: 700, toY: 700, duration: 5, steps:100})
+      .elementById('s1_f')
+      .text()
+      .then(t => {
+        assert.equal('true', t)
+      })
+      .elementById('s1_d')
+      .text()
+      .then(t => {
+        assert.equal('left', t)
+      })
+      .elementById('s1_i')
+      .text()
+      .then(t => {
+        assert.equal('2', t)
+      })
+  })
+
+  it('#2 Infinite scroll = true', () => {
+    return driver.sleep(3000)
+      .elementById('s2_switch')
+      .click()
+      .sleep(5000)
+      .elementById('s2_count')
+      .text()
+      .then(t => {
+        assert.notEqual(1, parseInt(t))
+      })
+  })
+
+  it('#3 Infinite scroll = false', () => {
+    return driver.sleep(3000)
+      .elementById('s3_switch')
+      .click()
+      .sleep(5000)
+      .elementById('s3_count')
+      .text()
+      .then(t => {
+        assert.equal(1, parseInt(t))
+      })
+  })
+});
\ No newline at end of file


[02/36] incubator-weex git commit: * [android] ignore fire the oninput event after setText called

Posted by so...@apache.org.
* [android] ignore fire the oninput event after setText called


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

Branch: refs/heads/0.14-dev
Commit: f76394ae1d2dccf02d3c23b577db4490240dc597
Parents: 9e93fc6
Author: moxun.ljf <fu...@foxmail.com>
Authored: Wed May 3 16:09:57 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Wed May 3 16:09:57 2017 +0800

----------------------------------------------------------------------
 .../taobao/weex/ui/component/AbstractEditComponent.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f76394ae/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
index c5aa02b..7cc54ee 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
@@ -73,6 +73,7 @@ public abstract class AbstractEditComponent extends WXComponent<WXEditText> {
   private List<TextView.OnEditorActionListener> mEditorActionListeners;
   private boolean mListeningKeyboard = false;
   private SoftKeyboardDetector.Unregister mUnregister;
+  private boolean mIgnoreNextOnInputEvent = false;
 
   public AbstractEditComponent(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, boolean isLazy) {
     super(instance, dom, parent, isLazy);
@@ -155,6 +156,7 @@ public abstract class AbstractEditComponent extends WXComponent<WXEditText> {
 
     editText.setTextSize(TypedValue.COMPLEX_UNIT_PX, WXStyle.getFontSize(getDomObject().getStyles(),getInstance().getInstanceViewPortWidth()));
     editText.setText(getDomObject().getAttrs().optString(Constants.Name.VALUE));
+    mIgnoreNextOnInputEvent = true;
   }
 
 
@@ -224,10 +226,15 @@ public abstract class AbstractEditComponent extends WXComponent<WXEditText> {
             return;
           }
 
+          mBeforeText = s.toString();
+
+          if (mIgnoreNextOnInputEvent) {
+            mIgnoreNextOnInputEvent = false;
+            return;
+          }
+
           String event = domObject.getEvents().contains(Constants.Event.INPUT) ? Constants.Event.INPUT : null;
           fireEvent(event, s.toString());
-
-          mBeforeText = s.toString();
         }
 
         @Override
@@ -442,6 +449,7 @@ public abstract class AbstractEditComponent extends WXComponent<WXEditText> {
 
     view.setText(value);
     view.setSelection(value == null?0:value.length());
+    mIgnoreNextOnInputEvent = true;
   }
 
   @WXComponentProp(name = Constants.Name.COLOR)


[09/36] incubator-weex git commit: + [android] prevent crash when selection range not fit text length

Posted by so...@apache.org.
+ [android] prevent crash when selection range not fit text length


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

Branch: refs/heads/0.14-dev
Commit: c6c05d80f03454c98bba83ac2871bcb9d5161564
Parents: 8acc6e6
Author: moxun.ljf <fu...@foxmail.com>
Authored: Fri May 19 16:20:23 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Fri May 19 16:20:23 2017 +0800

----------------------------------------------------------------------
 .../java/com/taobao/weex/ui/component/AbstractEditComponent.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c6c05d80/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
index c5aa02b..1f20818 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
@@ -655,6 +655,10 @@ public abstract class AbstractEditComponent extends WXComponent<WXEditText> {
   public void setSelectionRange(int selectionStart, int selectionEnd) {
     EditText hostView;
     if ((hostView = getHostView()) != null) {
+      int length = getHostView().length();
+      if (selectionStart > length || selectionEnd > length) {
+        return;
+      }
       focus();
       hostView.setSelection(selectionStart, selectionEnd);
     }


[20/36] incubator-weex git commit: Update mocha.opts

Posted by so...@apache.org.
Update mocha.opts

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

Branch: refs/heads/0.14-dev
Commit: ca513c743ef330a5b588c1fa30bcc61a90ebbcfa
Parents: 4cfaa8f
Author: moxun <fu...@foxmail.com>
Authored: Fri May 26 18:19:53 2017 +0800
Committer: GitHub <no...@github.com>
Committed: Fri May 26 18:19:53 2017 +0800

----------------------------------------------------------------------
 test/mocha.opts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ca513c74/test/mocha.opts
----------------------------------------------------------------------
diff --git a/test/mocha.opts b/test/mocha.opts
index 1197146..f8baf14 100644
--- a/test/mocha.opts
+++ b/test/mocha.opts
@@ -1,2 +1,2 @@
 --recursive
----bail 
+--bail


[03/36] incubator-weex git commit: Merge remote-tracking branch 'remotes/upstream/0.13-dev' into android-feature-enable-inspector

Posted by so...@apache.org.
Merge remote-tracking branch 'remotes/upstream/0.13-dev' into android-feature-enable-inspector


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

Branch: refs/heads/0.14-dev
Commit: 42fd6af71c5ea850eb13e985304244c997c97032
Parents: cceeabf 9e93fc6
Author: moxun.ljf <fu...@foxmail.com>
Authored: Thu May 4 16:03:36 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Thu May 4 16:03:36 2017 +0800

----------------------------------------------------------------------
 .travis.yml                                     |  5 ++
 android/run-ci.sh                               |  2 +-
 .../java/com/taobao/weex/utils/WXUtilsTest.java | 16 ++--
 dangerfile-junit.js                             | 80 ++++++++++++++++++++
 dangerfile.js                                   |  4 +-
 package.json                                    |  7 +-
 6 files changed, 100 insertions(+), 14 deletions(-)
----------------------------------------------------------------------



[05/36] incubator-weex git commit: * [android] remove fixme

Posted by so...@apache.org.
* [android] remove fixme


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

Branch: refs/heads/0.14-dev
Commit: fde08a0d4bb54bb39a9fdd7e4adf2d9969706e13
Parents: 099c838
Author: moxun.ljf <fu...@foxmail.com>
Authored: Thu May 4 16:13:40 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Thu May 4 16:13:40 2017 +0800

----------------------------------------------------------------------
 .../sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java   | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fde08a0d/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index 65cd60e..e056663 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
@@ -206,7 +206,6 @@ public class WXBridgeManager implements Callback,BactchExecutor {
         // ignore
       }
 
-      //FIXME:
       WXServiceManager.execAllCacheJsService();
     }
     if (remoteDebug && mWxDebugProxy != null) {


[15/36] incubator-weex git commit: + [android] only allow inspection on debug mode

Posted by so...@apache.org.
+ [android] only allow inspection on debug mode


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

Branch: refs/heads/0.14-dev
Commit: dbb9603c84467ec77bba4df06b78726a34086981
Parents: dbfda76
Author: moxun.ljf <fu...@foxmail.com>
Authored: Fri May 26 18:03:14 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Fri May 26 18:03:14 2017 +0800

----------------------------------------------------------------------
 .../src/main/java/com/taobao/weex/bridge/WXBridgeManager.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/dbb9603c/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index 0a2e7ff..6a745f6 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
@@ -173,14 +173,14 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   }
 
   private void initWXBridge(boolean remoteDebug) {
-    if (remoteDebug) {
+    if (remoteDebug && WXEnvironment.isApkDebugable()) {
       WXEnvironment.sDebugServerConnectable = true;
     }
 
     if (mWxDebugProxy != null) {
       mWxDebugProxy.stop(false);
     }
-    if (WXEnvironment.sDebugServerConnectable) {
+    if (WXEnvironment.sDebugServerConnectable && WXEnvironment.isApkDebugable()) {
       if (WXEnvironment.getApplication() != null) {
         try {
           Class clazz = Class.forName("com.taobao.weex.devtools.debug.DebugServerProxy");


[22/36] incubator-weex git commit: Update mocha.opts

Posted by so...@apache.org.
Update mocha.opts

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

Branch: refs/heads/0.14-dev
Commit: 8b170844d743748d8dcd3aa8df71e809d5f8c98a
Parents: 57f73e9
Author: moxun <fu...@foxmail.com>
Authored: Fri May 26 18:20:54 2017 +0800
Committer: GitHub <no...@github.com>
Committed: Fri May 26 18:20:54 2017 +0800

----------------------------------------------------------------------
 test/mocha.opts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8b170844/test/mocha.opts
----------------------------------------------------------------------
diff --git a/test/mocha.opts b/test/mocha.opts
index 6fb0959..f8baf14 100644
--- a/test/mocha.opts
+++ b/test/mocha.opts
@@ -1,2 +1,2 @@
 --recursive
---bail 
+--bail


[35/36] incubator-weex git commit: + [test] replace border screenshot image

Posted by so...@apache.org.
+ [test] replace border screenshot image


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

Branch: refs/heads/0.14-dev
Commit: d273d679a29ed2e7fc42f6a4612cfb27044c7889
Parents: e47d27d
Author: moxun.ljf <fu...@foxmail.com>
Authored: Thu Jun 1 16:34:57 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Thu Jun 1 16:34:57 2017 +0800

----------------------------------------------------------------------
 test/screenshot/border-android.png | Bin 207443 -> 196752 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d273d679/test/screenshot/border-android.png
----------------------------------------------------------------------
diff --git a/test/screenshot/border-android.png b/test/screenshot/border-android.png
index 851e4b9..637bd99 100644
Binary files a/test/screenshot/border-android.png and b/test/screenshot/border-android.png differ


[30/36] incubator-weex git commit: Merge branch 'android-bugfix-input-selection-out-of-range' of github.com:misakuo/incubator-weex into 0.13-dev

Posted by so...@apache.org.
Merge branch 'android-bugfix-input-selection-out-of-range' of github.com:misakuo/incubator-weex into 0.13-dev


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

Branch: refs/heads/0.14-dev
Commit: 9d96b65525212cf96f10d4ad9d17062484267d12
Parents: 54bdd6c c6c05d8
Author: sospartan <so...@apache.org>
Authored: Thu Jun 1 10:51:14 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Thu Jun 1 10:51:14 2017 +0800

----------------------------------------------------------------------
 .../java/com/taobao/weex/ui/component/AbstractEditComponent.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------



[31/36] incubator-weex git commit: Merge branch 'android-feature-enable-inspector' of github.com:misakuo/incubator-weex into 0.13-dev

Posted by so...@apache.org.
Merge branch 'android-feature-enable-inspector' of github.com:misakuo/incubator-weex into 0.13-dev


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

Branch: refs/heads/0.14-dev
Commit: 3fd712a04a89f2624057fc59d20ece7c9f68c6ca
Parents: 9d96b65 006685c
Author: sospartan <so...@apache.org>
Authored: Thu Jun 1 10:51:45 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Thu Jun 1 10:51:45 2017 +0800

----------------------------------------------------------------------
 android/commons/build.gradle                    |   1 +
 .../adapter/DefaultWebSocketAdapter.java        |  54 +++++-
 .../weex/commons/util/RequestIdGenerator.java   |  15 ++
 .../weex/commons/util/WSEventReporter.java      | 192 +++++++++++++++++++
 android/playground/app/build.gradle             |   2 +-
 .../java/com/alibaba/weex/WXApplication.java    |   2 +
 .../extend/adapter/InterceptWXHttpAdapter.java  |  57 +++---
 7 files changed, 290 insertions(+), 33 deletions(-)
----------------------------------------------------------------------



[19/36] incubator-weex git commit: Update mocha.opts

Posted by so...@apache.org.
Update mocha.opts

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

Branch: refs/heads/0.14-dev
Commit: 4cfaa8fd0f0ba4b4ecee3aae27f7285c99ab4892
Parents: adf5acc
Author: moxun <fu...@foxmail.com>
Authored: Fri May 26 18:19:41 2017 +0800
Committer: GitHub <no...@github.com>
Committed: Fri May 26 18:19:41 2017 +0800

----------------------------------------------------------------------
 test/mocha.opts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4cfaa8fd/test/mocha.opts
----------------------------------------------------------------------
diff --git a/test/mocha.opts b/test/mocha.opts
index 2203e43..1197146 100644
--- a/test/mocha.opts
+++ b/test/mocha.opts
@@ -1,2 +1,2 @@
 --recursive
----bail
+---bail 


[12/36] incubator-weex git commit: + [test] update testcase

Posted by so...@apache.org.
+ [test] update testcase


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

Branch: refs/heads/0.14-dev
Commit: cce536225f304622b1c52aafad53a1f0f3ff89d3
Parents: ca5c57e
Author: moxun.ljf <fu...@foxmail.com>
Authored: Fri May 26 17:35:45 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Fri May 26 17:35:45 2017 +0800

----------------------------------------------------------------------
 ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m |  2 +-
 test/pages/components/slider-common.vue             |  4 ++--
 test/scripts/components/recycler.test.js            |  6 +++---
 test/scripts/components/slider-common.test.js       | 13 ++++++++++++-
 test/scripts/util.js                                | 12 ++++++++++++
 5 files changed, 30 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cce53622/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m
----------------------------------------------------------------------
diff --git a/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m b/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m
index 946660d..7914dc5 100644
--- a/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m
+++ b/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m
@@ -28,7 +28,7 @@
         return @YES;
     }
     if ([keys[0] isEqualToString:@"iOS_weex_ext_config"] && [keys[1] isEqualToString:@"slider_class_name"]){
-        return @"WXCycleSliderComponent";
+        return @"WXSliderComponent";
     }
     if ([keys[0] isEqualToString:@"weex_prerender_config"] && [keys[1] isEqualToString:@"is_switch_on"]){
         return @YES;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cce53622/test/pages/components/slider-common.vue
----------------------------------------------------------------------
diff --git a/test/pages/components/slider-common.vue b/test/pages/components/slider-common.vue
index 841f5ca..f050b0e 100644
--- a/test/pages/components/slider-common.vue
+++ b/test/pages/components/slider-common.vue
@@ -182,14 +182,14 @@
         }
         this.progress = 233 * this.index + 233 * -ratio;
         this.count++;
-        this.flag = this.count / 100 < this.switchCount;
+        this.flag = this.count <= 100;
       },
       onchange(e) {
         this.goto(parseInt(e.index));
         this.switchCount++;
+        this.count = 0;
       },
       update(index) {
-        console.log('update switch count >>>')
         if (index == 1) {
           this.count1++;
         } else if (index == 2) {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cce53622/test/scripts/components/recycler.test.js
----------------------------------------------------------------------
diff --git a/test/scripts/components/recycler.test.js b/test/scripts/components/recycler.test.js
index 025fec2..a6eafa8 100644
--- a/test/scripts/components/recycler.test.js
+++ b/test/scripts/components/recycler.test.js
@@ -43,7 +43,7 @@ describe('recycler @ignore-android @ignore-ios', function () {
   });
 
   after(function () {
-      return util.quit(driver); 
+      return util.quit(driver);
   })
 
   let scaleFactor = 0
@@ -361,7 +361,7 @@ describe('recycler @ignore-android @ignore-ios', function () {
     .elementById((isAndroid ? 'cell27' : 'cell28'))
     .click()
     .elementById('stickyText1')
-    .text() 
+    .text()
     .then(text => {
       console.log(text)
       originContentOffset = Number.parseInt(text.replace('Content Offset:-',''))
@@ -391,7 +391,7 @@ describe('recycler @ignore-android @ignore-ios', function () {
       console.log(text)
       originContentOffset = Number.parseInt(text.replace('Content Offset:-',''))
     })
-    .touch('drag', {fromX:recyclerWidth / 2, fromY:screenHeight / 5, toX:recyclerWidth / 2, toY: screenHeight * 4 / 5})
+    .touch('drag', {fromX:recyclerWidth / 2, fromY:screenHeight / 5, toX:recyclerWidth / 2, toY: screenHeight * 4 / 5,duration: 2})
     .elementById('stickyText1')
     .text()
     .then(text => {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cce53622/test/scripts/components/slider-common.test.js
----------------------------------------------------------------------
diff --git a/test/scripts/components/slider-common.test.js b/test/scripts/components/slider-common.test.js
index 80855cd..c2a7b0c 100644
--- a/test/scripts/components/slider-common.test.js
+++ b/test/scripts/components/slider-common.test.js
@@ -25,10 +25,21 @@ var path = require('path');
 var os = require('os');
 var util = require("../util.js");
 
+const platform = process.env.platform.toLowerCase() || 'android';
+const isAndroid = platform === 'android';
+var dragOption = {};
+
 describe('slider common', function () {
   this.timeout(util.getTimeoutMills());
   var driver = util.createDriver(wd);
 
+  if (isAndroid) {
+    dragOption = {fromX: 1000, toX: -1000, fromY: 700, toY: 700, duration: 5, steps: 100};
+  } else {
+    //TODO: add drag option for iOS
+    dragOption = {fromX:350, fromY:150, toX:650, toY: 150, duration: 2}
+  }
+
   before(function () {
     return util.init(driver)
       .get(util.getPage('/components/slider-common.js'))
@@ -56,7 +67,7 @@ describe('slider common', function () {
         assert.equal(t, '1')
       })
       .elementById('slider_1')
-      .touch('drag', {fromX: 1000, toX: -1000, fromY: 700, toY: 700, duration: 5, steps:100})
+      .swipeLeft(1, 0.4)
       .elementById('s1_f')
       .text()
       .then(t => {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cce53622/test/scripts/util.js
----------------------------------------------------------------------
diff --git a/test/scripts/util.js b/test/scripts/util.js
index 00275d7..a56c096 100644
--- a/test/scripts/util.js
+++ b/test/scripts/util.js
@@ -155,6 +155,18 @@ module.exports = {
                     .sleep(1000)
                 })
             })
+          driverFactory.addPromiseChainMethod('swipeLeft', function (distanceRatio, yRatio) {
+                return this
+                  .getWindowSize()
+                  .then(size => {
+                    let y = yRatio * size.height;
+                    let startX = size.width * 0.8;
+                    let endX = startX - size.width * distanceRatio;
+                    return this
+                      .touch('drag', {fromX: startX, toX: endX, fromY: y, toY: y, duration: 1})
+                      .sleep(1000)
+                  })
+          })
             driver = driverFactory.initPromiseChain();
             driver.configureHttp({
                 timeout: 100000


[04/36] incubator-weex git commit: Merge remote-tracking branch 'remotes/upstream/0.13-dev' into android-feature-enable-inspector

Posted by so...@apache.org.
Merge remote-tracking branch 'remotes/upstream/0.13-dev' into android-feature-enable-inspector

# Conflicts:
#	android/playground/build.gradle


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

Branch: refs/heads/0.14-dev
Commit: 099c838af39b6f4f15f14b2479ff3811c395f716
Parents: 42fd6af 2aafe9d
Author: moxun.ljf <fu...@foxmail.com>
Authored: Thu May 4 16:10:06 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Thu May 4 16:10:06 2017 +0800

----------------------------------------------------------------------
 .travis.yml                                     |   3 +-
 WeexSDK.podspec                                 |   2 +-
 android/.gitignore                              |   4 +-
 android/README.md                               |   6 +
 android/build.gradle                            |  44 +++
 android/codeStyleSettings.xml                   | 393 +++++++++++++++++++
 android/commons/build.gradle                    |  38 +-
 android/gradle.properties                       |  16 +
 android/gradle/wrapper/gradle-wrapper.jar       | Bin 0 -> 52266 bytes
 .../gradle/wrapper/gradle-wrapper.properties    |   6 +
 android/gradlew                                 | 164 ++++++++
 android/gradlew.bat                             |  90 +++++
 android/license/LICENSE                         |  16 +
 android/playground/LICENSE                      | 202 ----------
 android/playground/NOTICE                       |   7 -
 android/playground/README.md                    |   5 -
 android/playground/app/build.gradle             |  27 +-
 android/playground/build.gradle                 |  23 --
 android/playground/codeStyleSettings.xml        | 393 -------------------
 android/playground/gradle.properties            |  16 -
 .../gradle/wrapper/gradle-wrapper.jar           | Bin 51018 -> 0 bytes
 .../gradle/wrapper/gradle-wrapper.properties    |   8 -
 android/playground/gradlew                      | 164 --------
 android/playground/gradlew.bat                  |  90 -----
 android/playground/settings.gradle              |  10 -
 android/run-ci.sh                               |   4 +-
 android/sdk/.gitignore                          |   3 +-
 android/sdk/NOTICE                              |  13 -
 android/sdk/build.gradle                        |  51 +--
 android/sdk/gradle/wrapper/gradle-wrapper.jar   | Bin 53637 -> 0 bytes
 .../gradle/wrapper/gradle-wrapper.properties    |   7 -
 android/sdk/gradlew                             | 160 --------
 android/sdk/gradlew.bat                         |  90 -----
 android/sdk/license/LICENSE                     |  16 -
 .../license/license-gradle-plugin-0.12.1.jar    | Bin 329739 -> 0 bytes
 .../license/maven-license-plugin-1.10.b1.jar    | Bin 57954 -> 0 bytes
 android/sdk/license/plexus-utils-3.0.24.jar     | Bin 247351 -> 0 bytes
 .../com/taobao/weex/ui/view/WXImageView.java    |  31 +-
 android/sdk/unittest.sh                         |   3 -
 android/settings.gradle                         |   9 +
 android/weex_debug/build.gradle                 |  35 +-
 .../gradle/wrapper/gradle-wrapper.jar           | Bin 51018 -> 0 bytes
 .../gradle/wrapper/gradle-wrapper.properties    |   6 -
 android/weex_debug/gradlew                      | 164 --------
 android/weex_debug/gradlew.bat                  |  90 -----
 ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m |  69 +++-
 .../WeexSDK/Sources/Component/WXAComponent.m    |   8 +-
 .../Sources/Component/WXImageComponent.m        |   9 +-
 .../Sources/Component/WXVideoComponent.m        |  12 +-
 .../WeexSDK/Sources/Component/WXWebComponent.m  |  10 +-
 ios/sdk/WeexSDK/Sources/Manager/WXRuleManager.m |   8 +-
 ios/sdk/WeexSDK/Sources/Module/WXStreamModule.m |   6 +-
 .../Sources/Protocol/WXURLRewriteProtocol.h     |   5 +-
 ios/sdk/WeexSDK/Sources/Utility/WXDefine.h      |   2 +-
 test/run.sh                                     |   2 +-
 test/scripts/util.js                            |   2 +-
 56 files changed, 917 insertions(+), 1625 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/099c838a/android/commons/build.gradle
----------------------------------------------------------------------


[29/36] incubator-weex git commit: Merge branch 'android-bugfix-default-style' of github.com:misakuo/incubator-weex into 0.13-dev

Posted by so...@apache.org.
Merge branch 'android-bugfix-default-style' of github.com:misakuo/incubator-weex into 0.13-dev


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

Branch: refs/heads/0.14-dev
Commit: 54bdd6c95068c35d599391fe70623a90f2ac003d
Parents: a0d9d92 51c5875
Author: sospartan <so...@apache.org>
Authored: Thu Jun 1 10:50:46 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Thu Jun 1 10:50:46 2017 +0800

----------------------------------------------------------------------
 .../taobao/weex/ui/component/WXComponent.java   | 23 ++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[28/36] incubator-weex git commit: * [android] prevent NPE on init Inspector

Posted by so...@apache.org.
* [android] prevent NPE on init Inspector


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

Branch: refs/heads/0.14-dev
Commit: a0d9d92149f61adc160f4e04ed0ecaef5ed861c7
Parents: 7c89305
Author: sospartan <so...@apache.org>
Authored: Thu Jun 1 10:49:49 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Thu Jun 1 10:49:49 2017 +0800

----------------------------------------------------------------------
 .../com/taobao/weex/bridge/WXBridgeManager.java | 45 +++++++++-----------
 1 file changed, 20 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a0d9d921/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index e056663..6a745f6 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
@@ -58,7 +58,6 @@ import com.taobao.weex.utils.batch.BactchExecutor;
 import com.taobao.weex.utils.batch.Interceptor;
 
 import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -174,39 +173,35 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   }
 
   private void initWXBridge(boolean remoteDebug) {
-    if (remoteDebug) {
+    if (remoteDebug && WXEnvironment.isApkDebugable()) {
       WXEnvironment.sDebugServerConnectable = true;
     }
 
     if (mWxDebugProxy != null) {
       mWxDebugProxy.stop(false);
     }
-    if (WXEnvironment.sDebugServerConnectable) {
-      try {
-        Class clazz =  Class.forName("com.taobao.weex.devtools.debug.DebugServerProxy");
-        if (clazz != null) {
-          Constructor constructor = clazz.getConstructor(Context.class, WXBridgeManager.class);
-          if (constructor != null) {
-            mWxDebugProxy = (IWXDebugProxy) constructor.newInstance(
-                WXEnvironment.getApplication(), WXBridgeManager.this);
-            if (mWxDebugProxy != null) {
-              mWxDebugProxy.start();
+    if (WXEnvironment.sDebugServerConnectable && WXEnvironment.isApkDebugable()) {
+      if (WXEnvironment.getApplication() != null) {
+        try {
+          Class clazz = Class.forName("com.taobao.weex.devtools.debug.DebugServerProxy");
+          if (clazz != null) {
+            Constructor constructor = clazz.getConstructor(Context.class, WXBridgeManager.class);
+            if (constructor != null) {
+              mWxDebugProxy = (IWXDebugProxy) constructor.newInstance(
+                      WXEnvironment.getApplication(), WXBridgeManager.this);
+              if (mWxDebugProxy != null) {
+                mWxDebugProxy.start();
+              }
             }
           }
+        } catch (Throwable e) {
+          //Ignore, It will throw Exception on Release environment
         }
-      } catch (ClassNotFoundException e) {
-        // ignore
-      } catch (NoSuchMethodException e) {
-        // ignore
-      } catch (InstantiationException e) {
-        // ignore
-      } catch (IllegalAccessException e) {
-        // ignore
-      } catch (InvocationTargetException e) {
-        // ignore
+        WXServiceManager.execAllCacheJsService();
+      } else {
+        WXLogUtils.e("WXBridgeManager", "WXEnvironment.sApplication is null, skip init Inspector");
+        WXLogUtils.w("WXBridgeManager", new Throwable("WXEnvironment.sApplication is null when init Inspector"));
       }
-
-      WXServiceManager.execAllCacheJsService();
     }
     if (remoteDebug && mWxDebugProxy != null) {
       mWXBridge = mWxDebugProxy.getWXBridge();
@@ -892,7 +887,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
     mWXBridge.execJS(instanceId, namespace, function, args);
   }
 
-  private void invokeInitFramework(Message msg) {   
+  private void invokeInitFramework(Message msg) {
     String framework = "";
     if (msg.obj != null) {
       framework = (String) msg.obj;


[33/36] incubator-weex git commit: Merge branch 'android-bugfix-inspector-npe' of github.com:misakuo/incubator-weex into 0.13-dev

Posted by so...@apache.org.
Merge branch 'android-bugfix-inspector-npe' of github.com:misakuo/incubator-weex into 0.13-dev


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

Branch: refs/heads/0.14-dev
Commit: 592e212302be1576de09bb992e0ab4b4d3c1b528
Parents: c6e4fa2 dbb9603
Author: sospartan <so...@apache.org>
Authored: Thu Jun 1 10:53:25 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Thu Jun 1 10:53:25 2017 +0800

----------------------------------------------------------------------

----------------------------------------------------------------------



[26/36] incubator-weex git commit: Merge branch '0.13-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into example-feature-testcase

Posted by so...@apache.org.
Merge branch '0.13-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into example-feature-testcase


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

Branch: refs/heads/0.14-dev
Commit: fc817d80e506d6715b8228a842abb79b51a32083
Parents: 4a3eacc d7f53c1
Author: 齐山 <su...@163.com>
Authored: Sat May 27 11:59:10 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Sat May 27 11:59:10 2017 +0800

----------------------------------------------------------------------
 android/build.gradle                                         | 8 ++++----
 .../sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java | 3 +--
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[36/36] incubator-weex git commit: Merge branch '0.13-dev' into 0.14-dev

Posted by so...@apache.org.
Merge branch '0.13-dev' into 0.14-dev


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

Branch: refs/heads/0.14-dev
Commit: 6c30b43718a804ada914e150bbf1429c11408627
Parents: 76dd775 d273d67
Author: sospartan <so...@apache.org>
Authored: Fri Jun 2 10:49:38 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Fri Jun 2 10:49:38 2017 +0800

----------------------------------------------------------------------
 android/build.gradle                            |   8 +-
 android/commons/build.gradle                    |   1 +
 .../adapter/DefaultWebSocketAdapter.java        |  54 ++++-
 .../weex/commons/util/RequestIdGenerator.java   |  15 ++
 .../weex/commons/util/WSEventReporter.java      | 192 ++++++++++++++++
 android/playground/app/build.gradle             |   2 +-
 .../java/com/alibaba/weex/WXApplication.java    |   2 +
 .../extend/adapter/InterceptWXHttpAdapter.java  |  57 +++--
 .../com/taobao/weex/bridge/WXBridgeManager.java |  45 ++--
 .../com/taobao/weex/common/WXPerformance.java   |   9 +-
 .../ui/component/AbstractEditComponent.java     |  16 +-
 .../taobao/weex/ui/component/WXComponent.java   |  23 +-
 .../java/com/taobao/weex/utils/WXViewUtils.java |   3 +-
 .../java/com/taobao/weex/WXSDKEngineTest.java   |   1 -
 test/mocha.opts                                 |   2 +-
 test/pages/components/scroller-fixed.vue        |  14 +-
 test/pages/components/slider-common.vue         | 229 +++++++++++++++++++
 test/scripts/components/recycler.test.js        |  12 +-
 test/scripts/components/scroller-fixed.test.js  |   5 +-
 test/scripts/components/slider-common.test.js   | 100 ++++++++
 test/scripts/util.js                            |  24 ++
 21 files changed, 729 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/6c30b437/android/build.gradle
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/6c30b437/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
----------------------------------------------------------------------


[18/36] incubator-weex git commit: Update mocha.opts

Posted by so...@apache.org.
Update mocha.opts

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

Branch: refs/heads/0.14-dev
Commit: adf5accfd17b6551bcd109ae4e81548ab757d625
Parents: 6404623
Author: moxun <fu...@foxmail.com>
Authored: Fri May 26 18:19:19 2017 +0800
Committer: GitHub <no...@github.com>
Committed: Fri May 26 18:19:19 2017 +0800

----------------------------------------------------------------------
 test/mocha.opts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/adf5accf/test/mocha.opts
----------------------------------------------------------------------
diff --git a/test/mocha.opts b/test/mocha.opts
index 63b406d..2203e43 100644
--- a/test/mocha.opts
+++ b/test/mocha.opts
@@ -1 +1,2 @@
---recursive
\ No newline at end of file
+--recursive
+---bail


[16/36] incubator-weex git commit: Update project.pbxproj

Posted by so...@apache.org.
Update project.pbxproj

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

Branch: refs/heads/0.14-dev
Commit: d7bd8b947fc2ea738a5223b1917356559723f8df
Parents: 4ba0859
Author: moxun <fu...@foxmail.com>
Authored: Fri May 26 18:17:42 2017 +0800
Committer: GitHub <no...@github.com>
Committed: Fri May 26 18:17:42 2017 +0800

----------------------------------------------------------------------
 ios/playground/WeexDemo.xcodeproj/project.pbxproj | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d7bd8b94/ios/playground/WeexDemo.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/ios/playground/WeexDemo.xcodeproj/project.pbxproj b/ios/playground/WeexDemo.xcodeproj/project.pbxproj
index a9d61fc..feced52 100644
--- a/ios/playground/WeexDemo.xcodeproj/project.pbxproj
+++ b/ios/playground/WeexDemo.xcodeproj/project.pbxproj
@@ -491,7 +491,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n";
+			shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n";
 			showEnvVarsInLog = 0;
 		};
 		84361D6F1CA10F8E00F43825 /* [CP] Copy Pods Resources */ = {
@@ -536,7 +536,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n";
+			shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n";
 			showEnvVarsInLog = 0;
 		};
 		C715566148067A7FFAB7797D /* [CP] Copy Pods Resources */ = {


[10/36] incubator-weex git commit: + [android] provide default style for border

Posted by so...@apache.org.
+ [android] provide default style for border


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

Branch: refs/heads/0.14-dev
Commit: 51c5875759e6c5899e18d08dbdc893652c1ae4dc
Parents: 8acc6e6
Author: moxun.ljf <fu...@foxmail.com>
Authored: Mon May 22 16:51:31 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Mon May 22 16:51:31 2017 +0800

----------------------------------------------------------------------
 .../taobao/weex/ui/component/WXComponent.java   | 23 ++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51c58757/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index 4de2a32..659cb16 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -1369,8 +1369,27 @@ public abstract class  WXComponent<T extends View> implements IWXObject, IWXActi
      */
   @CheckResult
   protected Object convertEmptyProperty(String propName, Object originalValue) {
-    if (Constants.Name.BACKGROUND_COLOR.equals(propName)) {
-      return "transparent";
+    switch (propName) {
+      case Constants.Name.BACKGROUND_COLOR:
+        return "transparent";
+      case Constants.Name.BORDER_RADIUS:
+      case Constants.Name.BORDER_BOTTOM_LEFT_RADIUS:
+      case Constants.Name.BORDER_BOTTOM_RIGHT_RADIUS:
+      case Constants.Name.BORDER_TOP_LEFT_RADIUS:
+      case Constants.Name.BORDER_TOP_RIGHT_RADIUS:
+        return 0;
+      case Constants.Name.BORDER_WIDTH:
+      case Constants.Name.BORDER_TOP_WIDTH:
+      case Constants.Name.BORDER_LEFT_WIDTH:
+      case Constants.Name.BORDER_RIGHT_WIDTH:
+      case Constants.Name.BORDER_BOTTOM_WIDTH:
+        return 0;
+      case Constants.Name.BORDER_COLOR:
+      case Constants.Name.BORDER_TOP_COLOR:
+      case Constants.Name.BORDER_LEFT_COLOR:
+      case Constants.Name.BORDER_RIGHT_COLOR:
+      case Constants.Name.BORDER_BOTTOM_COLOR:
+        return "black";
     }
     return originalValue;
   }


[23/36] incubator-weex git commit: + [test] add swipeRight function

Posted by so...@apache.org.
+ [test] add swipeRight function


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

Branch: refs/heads/0.14-dev
Commit: 4a3eacc209ff6075d625f1f752a6abcecf609eac
Parents: 8b17084
Author: moxun.ljf <fu...@foxmail.com>
Authored: Sat May 27 09:45:25 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Sat May 27 09:45:25 2017 +0800

----------------------------------------------------------------------
 test/scripts/util.js | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4a3eacc2/test/scripts/util.js
----------------------------------------------------------------------
diff --git a/test/scripts/util.js b/test/scripts/util.js
index a56c096..775426c 100644
--- a/test/scripts/util.js
+++ b/test/scripts/util.js
@@ -167,6 +167,18 @@ module.exports = {
                       .sleep(1000)
                   })
           })
+          driverFactory.addPromiseChainMethod('swipeRight', function (distanceRatio, yRatio) {
+            return this
+              .getWindowSize()
+              .then(size => {
+                let y = yRatio * size.height;
+                let startX = size.width * 0.2;
+                let endX = startX + size.width * distanceRatio;
+                return this
+                  .touch('drag', {fromX: startX, toX: endX, fromY: y, toY: y, duration: 1})
+                  .sleep(1000)
+              })
+          })
             driver = driverFactory.initPromiseChain();
             driver.configureHttp({
                 timeout: 100000


[06/36] incubator-weex git commit: * [android] add gradle wrapper

Posted by so...@apache.org.
* [android] add gradle wrapper


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

Branch: refs/heads/0.14-dev
Commit: 718bb7592c467164ba9c89c0651b8c620931af4a
Parents: fde08a0
Author: moxun.ljf <fu...@foxmail.com>
Authored: Mon May 8 14:27:16 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Mon May 8 14:27:16 2017 +0800

----------------------------------------------------------------------
 .../gradle/wrapper/gradle-wrapper.jar           | Bin 0 -> 53636 bytes
 .../gradle/wrapper/gradle-wrapper.properties    |   6 +
 android/playground/gradlew                      | 160 +++++++++++++++++++
 android/playground/gradlew.bat                  |  90 +++++++++++
 4 files changed, 256 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/718bb759/android/playground/gradle/wrapper/gradle-wrapper.jar
----------------------------------------------------------------------
diff --git a/android/playground/gradle/wrapper/gradle-wrapper.jar b/android/playground/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..13372ae
Binary files /dev/null and b/android/playground/gradle/wrapper/gradle-wrapper.jar differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/718bb759/android/playground/gradle/wrapper/gradle-wrapper.properties
----------------------------------------------------------------------
diff --git a/android/playground/gradle/wrapper/gradle-wrapper.properties b/android/playground/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..04e285f
--- /dev/null
+++ b/android/playground/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Mon Dec 28 10:00:20 PST 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/718bb759/android/playground/gradlew
----------------------------------------------------------------------
diff --git a/android/playground/gradlew b/android/playground/gradlew
new file mode 100644
index 0000000..9d82f78
--- /dev/null
+++ b/android/playground/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/718bb759/android/playground/gradlew.bat
----------------------------------------------------------------------
diff --git a/android/playground/gradlew.bat b/android/playground/gradlew.bat
new file mode 100644
index 0000000..8a0b282
--- /dev/null
+++ b/android/playground/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega


[27/36] incubator-weex git commit: * [android] add jslibVersion and SdkVersion perf point for perf analysis

Posted by so...@apache.org.
* [android] add jslibVersion and SdkVersion perf point for perf analysis


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

Branch: refs/heads/0.14-dev
Commit: 7c89305539d46d25f44cba3b6a48807a6011a78e
Parents: fc817d8
Author: sospartan <so...@apache.org>
Authored: Thu Jun 1 10:48:42 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Thu Jun 1 10:48:42 2017 +0800

----------------------------------------------------------------------
 .../src/main/java/com/taobao/weex/common/WXPerformance.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7c893055/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java b/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java
index 19a9872..229a475 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java
@@ -280,7 +280,14 @@ public class WXPerformance {
               + " firstScreenRenderTime:" + screenRenderTime
               + " firstScreenJSFExecuteTime:" + firstScreenJSFExecuteTime
               + " componentCount:" + componentCount
-              + "  totalTime:" + totalTime;
+              + " JSTemplateSize:" + JSTemplateSize
+              + " SDKInitTime:" + WXEnvironment.sSDKInitTime
+              + " totalTime:" + totalTime
+              + " JSLibVersion:" + JSLibVersion
+              + " WXSDKVersion:" + WXSDKVersion
+              + " pageName:" + pageName
+              + " useScroller:" + useScroller;
+
   }
 
   public String getErrMsg() {


[14/36] incubator-weex git commit: + [android] prevent NPE on init Inspector

Posted by so...@apache.org.
+ [android] prevent NPE on init Inspector


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

Branch: refs/heads/0.14-dev
Commit: dbfda762a84a78ea15e93e16141b0abcf02b30e6
Parents: da396f4
Author: moxun.ljf <fu...@foxmail.com>
Authored: Fri May 26 17:46:26 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Fri May 26 17:46:26 2017 +0800

----------------------------------------------------------------------
 .../com/taobao/weex/bridge/WXBridgeManager.java | 41 +++++++++-----------
 1 file changed, 18 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/dbfda762/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index e056663..0a2e7ff 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
@@ -58,7 +58,6 @@ import com.taobao.weex.utils.batch.BactchExecutor;
 import com.taobao.weex.utils.batch.Interceptor;
 
 import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -182,31 +181,27 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       mWxDebugProxy.stop(false);
     }
     if (WXEnvironment.sDebugServerConnectable) {
-      try {
-        Class clazz =  Class.forName("com.taobao.weex.devtools.debug.DebugServerProxy");
-        if (clazz != null) {
-          Constructor constructor = clazz.getConstructor(Context.class, WXBridgeManager.class);
-          if (constructor != null) {
-            mWxDebugProxy = (IWXDebugProxy) constructor.newInstance(
-                WXEnvironment.getApplication(), WXBridgeManager.this);
-            if (mWxDebugProxy != null) {
-              mWxDebugProxy.start();
+      if (WXEnvironment.getApplication() != null) {
+        try {
+          Class clazz = Class.forName("com.taobao.weex.devtools.debug.DebugServerProxy");
+          if (clazz != null) {
+            Constructor constructor = clazz.getConstructor(Context.class, WXBridgeManager.class);
+            if (constructor != null) {
+              mWxDebugProxy = (IWXDebugProxy) constructor.newInstance(
+                      WXEnvironment.getApplication(), WXBridgeManager.this);
+              if (mWxDebugProxy != null) {
+                mWxDebugProxy.start();
+              }
             }
           }
+        } catch (Throwable e) {
+          //Ignore, It will throw Exception on Release environment
         }
-      } catch (ClassNotFoundException e) {
-        // ignore
-      } catch (NoSuchMethodException e) {
-        // ignore
-      } catch (InstantiationException e) {
-        // ignore
-      } catch (IllegalAccessException e) {
-        // ignore
-      } catch (InvocationTargetException e) {
-        // ignore
+        WXServiceManager.execAllCacheJsService();
+      } else {
+        WXLogUtils.e("WXBridgeManager", "WXEnvironment.sApplication is null, skip init Inspector");
+        WXLogUtils.w("WXBridgeManager", new Throwable("WXEnvironment.sApplication is null when init Inspector"));
       }
-
-      WXServiceManager.execAllCacheJsService();
     }
     if (remoteDebug && mWxDebugProxy != null) {
       mWXBridge = mWxDebugProxy.getWXBridge();
@@ -892,7 +887,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
     mWXBridge.execJS(instanceId, namespace, function, args);
   }
 
-  private void invokeInitFramework(Message msg) {   
+  private void invokeInitFramework(Message msg) {
     String framework = "";
     if (msg.obj != null) {
       framework = (String) msg.obj;


[25/36] incubator-weex git commit: * [android] downgrade to api 23 as compiling issues.

Posted by so...@apache.org.
* [android] downgrade to api 23 as compiling issues.


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

Branch: refs/heads/0.14-dev
Commit: d7f53c19c48ad6062fca0f31648878038eba4e32
Parents: 5094776
Author: YorkShen <sh...@gmail.com>
Authored: Sat May 27 11:19:06 2017 +0800
Committer: YorkShen <sh...@gmail.com>
Committed: Sat May 27 11:19:06 2017 +0800

----------------------------------------------------------------------
 android/build.gradle | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d7f53c19/android/build.gradle
----------------------------------------------------------------------
diff --git a/android/build.gradle b/android/build.gradle
index 25d281b..746e508 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -29,12 +29,12 @@ subprojects {
         }
     }
     ext {
-        compileSdkVersion=24
-        buildToolsVersion="24.0.3"
+        compileSdkVersion=23
+        buildToolsVersion="23.0.3"
         minSdkVersion=14
         appMinSdkVersion=15
-        targetSdkVersion=24
-        supportLibVersion="24.2.0"
+        targetSdkVersion=23
+        supportLibVersion="23.4.0"
         fastjsonLibVersion="1.1.46.android"
     }
 }


[07/36] incubator-weex git commit: + [android] update dependencies

Posted by so...@apache.org.
+ [android] update dependencies


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

Branch: refs/heads/0.14-dev
Commit: 347b8e76ac5dbe64e02241b71b6461c6772f9332
Parents: 718bb75
Author: moxun.ljf <fu...@foxmail.com>
Authored: Fri May 19 15:57:38 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Fri May 19 15:57:38 2017 +0800

----------------------------------------------------------------------
 android/commons/build.gradle        | 2 +-
 android/playground/app/build.gradle | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/347b8e76/android/commons/build.gradle
----------------------------------------------------------------------
diff --git a/android/commons/build.gradle b/android/commons/build.gradle
index 055825b..9f5c82c 100644
--- a/android/commons/build.gradle
+++ b/android/commons/build.gradle
@@ -37,7 +37,7 @@ dependencies {
     compile project(':weex_sdk')
     compile 'com.squareup.picasso:picasso:2.5.2'
     compile 'com.facebook.fresco:fresco:0.10.0'
-    compile 'com.taobao.android.weex_inspection:protocol:1.1.2'
+    compile 'com.taobao.android.weex_inspection:protocol:1.1.4.1'
 
     provided 'com.taobao.android:weex_analyzer:0.1.0.5'
     provided 'com.squareup.okhttp:okhttp:2.3.0'

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/347b8e76/android/playground/app/build.gradle
----------------------------------------------------------------------
diff --git a/android/playground/app/build.gradle b/android/playground/app/build.gradle
index c1d5da1..bc50f70 100755
--- a/android/playground/app/build.gradle
+++ b/android/playground/app/build.gradle
@@ -105,5 +105,5 @@ dependencies {
     compile 'com.jakewharton.scalpel:scalpel:1.1.2'
     compile 'com.taobao.android.weex_inspection:urlconnection_interceptor:1.0.0'
     compile 'com.android.support.test.espresso:espresso-idling-resource:2.2.2'
-    compile 'com.taobao.android:weex_inspector:0.10.0.5@aar'
+    compile 'com.taobao.android:weex_inspector:0.11.0'
 }
\ No newline at end of file


[08/36] incubator-weex git commit: + [android] remove gradle wrapper

Posted by so...@apache.org.
+ [android] remove gradle wrapper


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

Branch: refs/heads/0.14-dev
Commit: 006685c885451c6e05ef94184ad22aff8e986758
Parents: 347b8e7
Author: moxun.ljf <fu...@foxmail.com>
Authored: Fri May 19 16:01:21 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Fri May 19 16:01:21 2017 +0800

----------------------------------------------------------------------
 .../gradle/wrapper/gradle-wrapper.jar           | Bin 53636 -> 0 bytes
 .../gradle/wrapper/gradle-wrapper.properties    |   6 -
 android/playground/gradlew                      | 160 -------------------
 android/playground/gradlew.bat                  |  90 -----------
 4 files changed, 256 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/006685c8/android/playground/gradle/wrapper/gradle-wrapper.jar
----------------------------------------------------------------------
diff --git a/android/playground/gradle/wrapper/gradle-wrapper.jar b/android/playground/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 13372ae..0000000
Binary files a/android/playground/gradle/wrapper/gradle-wrapper.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/006685c8/android/playground/gradle/wrapper/gradle-wrapper.properties
----------------------------------------------------------------------
diff --git a/android/playground/gradle/wrapper/gradle-wrapper.properties b/android/playground/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 04e285f..0000000
--- a/android/playground/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Dec 28 10:00:20 PST 2015
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/006685c8/android/playground/gradlew
----------------------------------------------------------------------
diff --git a/android/playground/gradlew b/android/playground/gradlew
deleted file mode 100644
index 9d82f78..0000000
--- a/android/playground/gradlew
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-    JAVACMD=`cygpath --unix "$JAVACMD"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/006685c8/android/playground/gradlew.bat
----------------------------------------------------------------------
diff --git a/android/playground/gradlew.bat b/android/playground/gradlew.bat
deleted file mode 100644
index 8a0b282..0000000
--- a/android/playground/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem  Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega


[32/36] incubator-weex git commit: Merge branch 'android-bugfix-oninput' of github.com:misakuo/incubator-weex into 0.13-dev

Posted by so...@apache.org.
Merge branch 'android-bugfix-oninput' of github.com:misakuo/incubator-weex into 0.13-dev


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

Branch: refs/heads/0.14-dev
Commit: c6e4fa264d937543f438dc4360f77af902c1ccb6
Parents: 3fd712a f76394a
Author: sospartan <so...@apache.org>
Authored: Thu Jun 1 10:52:23 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Thu Jun 1 10:52:23 2017 +0800

----------------------------------------------------------------------
 .../taobao/weex/ui/component/AbstractEditComponent.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c6e4fa26/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
----------------------------------------------------------------------


[13/36] incubator-weex git commit: + [test] remove platform judgement

Posted by so...@apache.org.
+ [test] remove platform judgement


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

Branch: refs/heads/0.14-dev
Commit: 4ba08598c8598995b80f00dbb12e59fd7ee66766
Parents: cce5362
Author: moxun.ljf <fu...@foxmail.com>
Authored: Fri May 26 17:37:15 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Fri May 26 17:37:15 2017 +0800

----------------------------------------------------------------------
 test/scripts/components/slider-common.test.js | 11 -----------
 1 file changed, 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4ba08598/test/scripts/components/slider-common.test.js
----------------------------------------------------------------------
diff --git a/test/scripts/components/slider-common.test.js b/test/scripts/components/slider-common.test.js
index c2a7b0c..73f54c6 100644
--- a/test/scripts/components/slider-common.test.js
+++ b/test/scripts/components/slider-common.test.js
@@ -25,21 +25,10 @@ var path = require('path');
 var os = require('os');
 var util = require("../util.js");
 
-const platform = process.env.platform.toLowerCase() || 'android';
-const isAndroid = platform === 'android';
-var dragOption = {};
-
 describe('slider common', function () {
   this.timeout(util.getTimeoutMills());
   var driver = util.createDriver(wd);
 
-  if (isAndroid) {
-    dragOption = {fromX: 1000, toX: -1000, fromY: 700, toY: 700, duration: 5, steps: 100};
-  } else {
-    //TODO: add drag option for iOS
-    dragOption = {fromX:350, fromY:150, toX:650, toY: 150, duration: 2}
-  }
-
   before(function () {
     return util.init(driver)
       .get(util.getPage('/components/slider-common.js'))


[17/36] incubator-weex git commit: Update WXConfigCenterDefaultImpl.m

Posted by so...@apache.org.
Update WXConfigCenterDefaultImpl.m

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

Branch: refs/heads/0.14-dev
Commit: 64046231845be0bbe5d87541aa80f49d2f0e6a76
Parents: d7bd8b9
Author: moxun <fu...@foxmail.com>
Authored: Fri May 26 18:18:02 2017 +0800
Committer: GitHub <no...@github.com>
Committed: Fri May 26 18:18:02 2017 +0800

----------------------------------------------------------------------
 ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/64046231/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m
----------------------------------------------------------------------
diff --git a/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m b/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m
index 7914dc5..946660d 100644
--- a/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m
+++ b/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m
@@ -28,7 +28,7 @@
         return @YES;
     }
     if ([keys[0] isEqualToString:@"iOS_weex_ext_config"] && [keys[1] isEqualToString:@"slider_class_name"]){
-        return @"WXSliderComponent";
+        return @"WXCycleSliderComponent";
     }
     if ([keys[0] isEqualToString:@"weex_prerender_config"] && [keys[1] isEqualToString:@"is_switch_on"]){
         return @YES;


[24/36] incubator-weex git commit: * [android] Update Build.VERSION.SKD_INT to 24

Posted by so...@apache.org.
* [android] Update Build.VERSION.SKD_INT to 24


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

Branch: refs/heads/0.14-dev
Commit: 50947769c15994a299caffd09d11fc7b7bd26a6b
Parents: da396f4
Author: YorkShen <sh...@gmail.com>
Authored: Sat May 27 10:59:17 2017 +0800
Committer: YorkShen <sh...@gmail.com>
Committed: Sat May 27 10:59:17 2017 +0800

----------------------------------------------------------------------
 android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/50947769/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
index cde5de9..c6120d5 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
@@ -28,7 +28,6 @@ import android.graphics.RectF;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.LayerDrawable;
 import android.os.Build;
-import android.os.Build.VERSION_CODES;
 import android.support.annotation.IntDef;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
@@ -408,7 +407,7 @@ public class WXViewUtils {
    * As the compile version of weex_sdk is 23, so API level 24 has to be hard-code.
    */
   private static boolean clipCanvasIfAnimationExist() {
-    return Build.VERSION.SDK_INT != VERSION_CODES.N;
+    return Build.VERSION.SDK_INT != 24;
   }
 
   /**


[34/36] incubator-weex git commit: * [android] fix unit test

Posted by so...@apache.org.
* [android] fix unit test


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

Branch: refs/heads/0.14-dev
Commit: e47d27d60393de953db3a0b74baaa4b8fb62fcef
Parents: 592e212
Author: sospartan <so...@apache.org>
Authored: Thu Jun 1 15:10:28 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Thu Jun 1 15:10:28 2017 +0800

----------------------------------------------------------------------
 android/sdk/src/test/java/com/taobao/weex/WXSDKEngineTest.java | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e47d27d6/android/sdk/src/test/java/com/taobao/weex/WXSDKEngineTest.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/test/java/com/taobao/weex/WXSDKEngineTest.java b/android/sdk/src/test/java/com/taobao/weex/WXSDKEngineTest.java
index a60c44f..a65f5bb 100644
--- a/android/sdk/src/test/java/com/taobao/weex/WXSDKEngineTest.java
+++ b/android/sdk/src/test/java/com/taobao/weex/WXSDKEngineTest.java
@@ -93,7 +93,6 @@ public class WXSDKEngineTest {
 
     assertFalse(WXSDKEngine.registerModuleWithFactory(null,new TestModuleFactory(TestModule.class),true));
     assertTrue(WXSDKEngine.registerModuleWithFactory("test1",new TestModuleFactory(TestModule.class),true));
-    assertFalse(WXSDKEngine.registerModuleWithFactory("test1",null,true));
   }
 
 


[21/36] incubator-weex git commit: Update mocha.opts

Posted by so...@apache.org.
Update mocha.opts

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

Branch: refs/heads/0.14-dev
Commit: 57f73e9c7d4a12e79ec6dbbcb60118b3d74e23bb
Parents: ca513c7
Author: moxun <fu...@foxmail.com>
Authored: Fri May 26 18:20:32 2017 +0800
Committer: GitHub <no...@github.com>
Committed: Fri May 26 18:20:32 2017 +0800

----------------------------------------------------------------------
 test/mocha.opts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/57f73e9c/test/mocha.opts
----------------------------------------------------------------------
diff --git a/test/mocha.opts b/test/mocha.opts
index f8baf14..6fb0959 100644
--- a/test/mocha.opts
+++ b/test/mocha.opts
@@ -1,2 +1,2 @@
 --recursive
---bail
+--bail