Permalink
Browse files

* [all] merge with dev

  • Loading branch information...
1 parent a36ecac commit aea1c5b28345ea02405056c243d9529885a0d085 @MrRaindrop MrRaindrop committed Aug 15, 2016
Showing 928 changed files with 42,896 additions and 10,248 deletions.
@@ -1,5 +1,4 @@
-(Please ***REMOVE*** the following description before submiting)
-
+<!--
0. It's ***RECOMMENDED*** to [submit PR](https://github.com/alibaba/weex/pulls) for typo, new demo or tiny bugfix.
0. If this's a ***BUG***, pls provide: course repetition, error/crash log, device model, OS version, App version (playground or other apps).
0. If this's a ***FEATURE***, pls provide: details, pseudo codes if necessary.
@@ -11,3 +10,4 @@
0. 我们***推荐***小问题直接[提 PR](https://github.com/alibaba/weex/pulls),如错别字、新 demo 或 bugfix。
0. 如果是 ***Bug***,请提供:复现步骤(推荐有截图)、error/crash log、设备型号、OS 版本、App 版本(playground 版本或自己的 app)。
0. 如果是***新需求***,请提供:详细描述、应用场景、适当的伪代码(如有)。
+-->
@@ -1,5 +1,4 @@
-(Please ***REMOVE*** the following description before submiting)
-
+<!--
It's ***RECOMMENDED*** to submit typo fix, new demo and tiny bugfix to `dev` branch. New feature and other modifications can be submitted to "domain" branch including `ios`, `android`, `jsfm`, `html5`.
See [Branch Strategy](https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#branch-management) for more detail.
@@ -11,3 +10,4 @@ See [Branch Strategy](https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#b
错别字修改、新 demo、较小的 bugfix 都可以直接提到 `dev` 分支;新需求以及任何你不确定影响面的改动,请提交到对应“领域”的分支(`ios`、`android`、`jsfm`、`html5`)。
查看完整的[分支策略 (英文)](https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#branch-management)。
+-->
View
@@ -12,7 +12,11 @@ Please ***INSTALL [Git for Windows](https://git-scm.com/download/win)*** and run
## Meet Weex
-* [Install Playground](http://alibaba.github.io/weex/download.html).
+* Install [Weex Playground App](http://alibaba.github.io/weex/download.html) to see examples we already written.
+* If you want to write a demo, install [weex-toolkit](https://www.npmjs.com/package/weex-toolkit) in [Node.js](http://nodejs.org/) 4.0+ and
+* Run `weex init` to generate & start a simple project in an empty folder.
+* Follow the instructions in the project README.
+* Enjoy it.
## Use Weex
@@ -59,6 +63,11 @@ On Android Platform , Weex code is executed in [weex_v8core](https://github.com/
See [SCRIPTS.md](./SCRIPTS.md) for more information.
+
+## IDE Plugin & Syntax Highlight
+
+See [Weex Community](https://github.com/alibaba/weex/wiki/Weex-Community) Wiki page
+
## FAQ
See [FAQ](http://alibaba.github.io/weex/doc/faq.html) for more information.
@@ -74,4 +83,3 @@ See [FAQ](http://alibaba.github.io/weex/doc/faq.html) for more information.
See [Weex Contributing Guide](./CONTRIBUTING.md) for more information.
-
@@ -204,9 +204,11 @@
*/
package com.alibaba.weex.commons.adapter;
+import android.net.Uri;
import android.text.TextUtils;
import android.widget.ImageView;
+import com.squareup.picasso.Callback;
import com.squareup.picasso.Picasso;
import com.taobao.weex.WXEnvironment;
import com.taobao.weex.WXSDKManager;
@@ -221,7 +223,7 @@ public ImageAdapter() {
@Override
public void setImage(final String url, final ImageView view,
- WXImageQuality quality, WXImageStrategy strategy) {
+ WXImageQuality quality, final WXImageStrategy strategy) {
WXSDKManager.getInstance().postOnUiThread(new Runnable() {
@@ -241,9 +243,38 @@ public void run() {
if (view.getLayoutParams().width <= 0 || view.getLayoutParams().height <= 0) {
return;
}
+
+
+ if(!TextUtils.isEmpty(strategy.placeHolder)){
+ Picasso.Builder builder=new Picasso.Builder(WXEnvironment.getApplication());
+ Picasso picasso=builder.build();
+ picasso.load(Uri.parse(strategy.placeHolder)).into(view);
+
+ view.setTag(strategy.placeHolder.hashCode(),picasso);
+ }
+
+
Picasso.with(WXEnvironment.getApplication())
.load(temp)
- .into(view);
+ .into(view, new Callback() {
+ @Override
+ public void onSuccess() {
+ if(strategy.getImageListener()!=null){
+ strategy.getImageListener().onImageFinish(url,view,true,null);
+ }
+
+ if(!TextUtils.isEmpty(strategy.placeHolder)){
+ ((Picasso) view.getTag(strategy.placeHolder.hashCode())).cancelRequest(view);
+ }
+ }
+
+ @Override
+ public void onError() {
+ if(strategy.getImageListener()!=null){
+ strategy.getImageListener().onImageFinish(url,view,false,null);
+ }
+ }
+ });
}
},0);
}
@@ -117,7 +117,7 @@ public void run() {
@Override
public void onFailure(Throwable cause) {
mContext.sendBroadcast(new Intent(ACTION_DEBUG_SERVER_CONNECT_FAILED));
- WXLogUtils.d("connect debugger server failure!! " + cause.toString());
+ WXLogUtils.d("connect debugger server failure!! ", cause);
}
});
@@ -28,6 +28,24 @@ public WxDebug() {
}
@ChromeDevtoolsMethod
+ public void enable(JsonRpcPeer peer, JSONObject params) {
+ Context context = WXEnvironment.getApplication();
+ if (context != null) {
+ WXSDKEngine.reload(context, true);
+ context.sendBroadcast(new Intent(IWXDebugProxy.ACTION_DEBUG_INSTANCE_REFRESH));
+ }
+ }
+
+ @ChromeDevtoolsMethod
+ public void disable(JsonRpcPeer peer, JSONObject params) {
+ Context context = WXEnvironment.getApplication();
+ if (context != null) {
+ WXSDKEngine.reload(context, false);
+ context.sendBroadcast(new Intent(IWXDebugProxy.ACTION_DEBUG_INSTANCE_REFRESH));
+ }
+ }
+
+ @ChromeDevtoolsMethod
public void callNative(JsonRpcPeer peer, JSONObject params) {
if (params != null) {
DebugBridge.getInstance().callNative(
@@ -8,11 +8,10 @@ android {
applicationId "com.alibaba.weex"
minSdkVersion 15
targetSdkVersion 23
- versionCode 1
- versionName "0.5.2.2"
+ versionCode 5
+ versionName "0.5.2.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk{
- abiFilters "armeabi-v7a"
abiFilters "x86"
abiFilters "armeabi"
}
@@ -0,0 +1,39 @@
+package com.alibaba.weex.uitest.TC_AG;
+import com.alibaba.weex.WXPageActivity;
+import com.alibaba.weex.util.TestFlow;
+import java.util.HashMap;
+import org.junit.Before;
+import org.junit.Test;
+
+public class AG_AHref_A_Href extends TestFlow {
+ public AG_AHref_A_Href() {
+ super(WXPageActivity.class);
+ }
+
+ @Before
+ public void setUp() throws InterruptedException {
+ super.setUp();
+ HashMap testMap = new <String, Object> HashMap();
+ testMap.put("testComponet", "AG_AHref");
+ testMap.put("testChildCaseInit", "AG_AHref_A_Href");
+ testMap.put("step1",new HashMap(){
+ {
+ put("click", "href0");
+ put("screenshot", "AG_AHref_A_Href_01_href0");
+ }
+ });
+ testMap.put("step2",new HashMap(){
+ {
+ put("click", "href1");
+ put("screenshot", "AG_AHref_A_Href_02_href1");
+ }
+ });
+ super.setTestMap(testMap);
+ }
+
+ @Test
+ public void doTest(){
+ super.testByTestMap();
+ }
+
+}
@@ -0,0 +1,39 @@
+package com.alibaba.weex.uitest.TC_AG;
+import com.alibaba.weex.WXPageActivity;
+import com.alibaba.weex.util.TestFlow;
+import java.util.HashMap;
+import org.junit.Before;
+import org.junit.Test;
+
+public class AG_Border_A_Border_Bottom_Color extends TestFlow {
+ public AG_Border_A_Border_Bottom_Color() {
+ super(WXPageActivity.class);
+ }
+
+ @Before
+ public void setUp() throws InterruptedException {
+ super.setUp();
+ HashMap testMap = new <String, Object> HashMap();
+ testMap.put("testComponet", "AG_Border");
+ testMap.put("testChildCaseInit", "AG_Border_A_Border_Bottom_Color");
+ testMap.put("step1",new HashMap(){
+ {
+ put("click", "#FF0000");
+ put("screenshot", "AG_Border_A_Border_Bottom_Color_01_#FF0000");
+ }
+ });
+ testMap.put("step2",new HashMap(){
+ {
+ put("click", "#00FFFF");
+ put("screenshot", "AG_Border_A_Border_Bottom_Color_02_#00FFFF");
+ }
+ });
+ super.setTestMap(testMap);
+ }
+
+ @Test
+ public void doTest(){
+ super.testByTestMap();
+ }
+
+}
@@ -0,0 +1,39 @@
+package com.alibaba.weex.uitest.TC_AG;
+import com.alibaba.weex.WXPageActivity;
+import com.alibaba.weex.util.TestFlow;
+import java.util.HashMap;
+import org.junit.Before;
+import org.junit.Test;
+
+public class AG_Border_A_Border_Bottom_Left_Radius extends TestFlow {
+ public AG_Border_A_Border_Bottom_Left_Radius() {
+ super(WXPageActivity.class);
+ }
+
+ @Before
+ public void setUp() throws InterruptedException {
+ super.setUp();
+ HashMap testMap = new <String, Object> HashMap();
+ testMap.put("testComponet", "AG_Border");
+ testMap.put("testChildCaseInit", "AG_Border_A_Border_Bottom_Left_Radius");
+ testMap.put("step1",new HashMap(){
+ {
+ put("click", "10");
+ put("screenshot", "AG_Border_A_Border_Bottom_Left_Radius_01_10");
+ }
+ });
+ testMap.put("step2",new HashMap(){
+ {
+ put("click", "20");
+ put("screenshot", "AG_Border_A_Border_Bottom_Left_Radius_02_20");
+ }
+ });
+ super.setTestMap(testMap);
+ }
+
+ @Test
+ public void doTest(){
+ super.testByTestMap();
+ }
+
+}
@@ -0,0 +1,39 @@
+package com.alibaba.weex.uitest.TC_AG;
+import com.alibaba.weex.WXPageActivity;
+import com.alibaba.weex.util.TestFlow;
+import java.util.HashMap;
+import org.junit.Before;
+import org.junit.Test;
+
+public class AG_Border_A_Border_Bottom_Right_Radius extends TestFlow {
+ public AG_Border_A_Border_Bottom_Right_Radius() {
+ super(WXPageActivity.class);
+ }
+
+ @Before
+ public void setUp() throws InterruptedException {
+ super.setUp();
+ HashMap testMap = new <String, Object> HashMap();
+ testMap.put("testComponet", "AG_Border");
+ testMap.put("testChildCaseInit", "AG_Border_A_Border_Bottom_Right_Radius");
+ testMap.put("step1",new HashMap(){
+ {
+ put("click", "10");
+ put("screenshot", "AG_Border_A_Border_Bottom_Right_Radius_01_10");
+ }
+ });
+ testMap.put("step2",new HashMap(){
+ {
+ put("click", "20");
+ put("screenshot", "AG_Border_A_Border_Bottom_Right_Radius_02_20");
+ }
+ });
+ super.setTestMap(testMap);
+ }
+
+ @Test
+ public void doTest(){
+ super.testByTestMap();
+ }
+
+}
@@ -0,0 +1,45 @@
+package com.alibaba.weex.uitest.TC_AG;
+import com.alibaba.weex.WXPageActivity;
+import com.alibaba.weex.util.TestFlow;
+import java.util.HashMap;
+import org.junit.Before;
+import org.junit.Test;
+
+public class AG_Border_A_Border_Bottom_Width extends TestFlow {
+ public AG_Border_A_Border_Bottom_Width() {
+ super(WXPageActivity.class);
+ }
+
+ @Before
+ public void setUp() throws InterruptedException {
+ super.setUp();
+ HashMap testMap = new <String, Object> HashMap();
+ testMap.put("testComponet", "AG_Border");
+ testMap.put("testChildCaseInit", "AG_Border_A_Border_Bottom_Width");
+ testMap.put("step1",new HashMap(){
+ {
+ put("click", "0");
+ put("screenshot", "AG_Border_A_Border_Bottom_Width_01_0");
+ }
+ });
+ testMap.put("step2",new HashMap(){
+ {
+ put("click", "1");
+ put("screenshot", "AG_Border_A_Border_Bottom_Width_02_1");
+ }
+ });
+ testMap.put("step3",new HashMap(){
+ {
+ put("click", "3");
+ put("screenshot", "AG_Border_A_Border_Bottom_Width_03_3");
+ }
+ });
+ super.setTestMap(testMap);
+ }
+
+ @Test
+ public void doTest(){
+ super.testByTestMap();
+ }
+
+}
Oops, something went wrong.

0 comments on commit aea1c5b

Please sign in to comment.