diff --git a/usecase/usecase-embedding-android-tests/embeddingapi/AndroidManifest.xml b/usecase/usecase-embedding-android-tests/embeddingapi/AndroidManifest.xml index 137de1bd2..18c1ea073 100644 --- a/usecase/usecase-embedding-android-tests/embeddingapi/AndroidManifest.xml +++ b/usecase/usecase-embedding-android-tests/embeddingapi/AndroidManifest.xml @@ -836,6 +836,15 @@ + + + + + + + + + + + diff --git a/usecase/usecase-embedding-android-tests/embeddingapi/res/values/strings.xml b/usecase/usecase-embedding-android-tests/embeddingapi/res/values/strings.xml index acd168448..b655fabe5 100644 --- a/usecase/usecase-embedding-android-tests/embeddingapi/res/values/strings.xml +++ b/usecase/usecase-embedding-android-tests/embeddingapi/res/values/strings.xml @@ -126,6 +126,7 @@ found in the LICENSE file. XWalkViewWithShouldInterceptLoadRequest XWalkViewWithClearClientCertPreferences XWalkViewWithSetBackgroundColor + XWalkViewWithSetBackgroundColorInLayout XWalkViewWithComputeScroll XWalkViewWithNewLoad XWalkViewGetCertificate diff --git a/usecase/usecase-embedding-android-tests/embeddingapi/src/org/xwalk/embedded/api/sample/basic/XWalkViewWithSetBackgroundColorInLayout.java b/usecase/usecase-embedding-android-tests/embeddingapi/src/org/xwalk/embedded/api/sample/basic/XWalkViewWithSetBackgroundColorInLayout.java new file mode 100644 index 000000000..462b6d380 --- /dev/null +++ b/usecase/usecase-embedding-android-tests/embeddingapi/src/org/xwalk/embedded/api/sample/basic/XWalkViewWithSetBackgroundColorInLayout.java @@ -0,0 +1,44 @@ +// Copyright (c) 2014 Intel Corporation. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.xwalk.embedded.api.sample.basic; + +import org.xwalk.embedded.api.sample.R; + +import org.xwalk.core.XWalkActivity; +import org.xwalk.core.XWalkView; + +import android.app.AlertDialog; +import android.graphics.Color; +import android.os.Bundle; +import android.widget.LinearLayout; + +public class XWalkViewWithSetBackgroundColorInLayout extends XWalkActivity { + private XWalkView mXWalkView; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.container); + } + + @Override + protected void onXWalkReady() { + StringBuffer mess = new StringBuffer(); + mess.append("Test Purpose: \n\n") + .append("Verifies XWalkView can set background color without delay.\n\n") + .append("Expected Result:\n\n") + .append("Test passes if app load the red without flicker."); + new AlertDialog.Builder(this) + .setTitle("Info" ) + .setMessage(mess.toString()) + .setPositiveButton("confirm" , null ) + .show(); + + setContentView(R.layout.xwview_backgroundcolor_layout); + mXWalkView = (XWalkView) findViewById(R.id.xwalkview); + mXWalkView.load("file:///android_asset/index4995_local_text.html", null); + } + +}