Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF0ED17215 for ; Wed, 28 Jan 2015 18:07:17 +0000 (UTC) Received: (qmail 33286 invoked by uid 500); 28 Jan 2015 18:07:18 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 33249 invoked by uid 500); 28 Jan 2015 18:07:18 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 33235 invoked by uid 99); 28 Jan 2015 18:07:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jan 2015 18:07:17 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of agrieve@google.com designates 209.85.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-qc0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jan 2015 18:06:52 +0000 Received: by mail-qc0-f180.google.com with SMTP id r5so17566526qcx.11 for ; Wed, 28 Jan 2015 10:06:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=LMMko3VqRRVEWTs33XX7XOixeeaje+m0/BePfDIMYmg=; b=eEgEMf5nQ85YFyYSyjQWP4IFIy2dfxMaOiMAIm3ncj/NVmLZTqZfmcoSx/PhMSh/lm DZPNsH5bPd2r44LshXvkmj+tDjWfRaBmRO82WoqRGpF0gFd7l0JJzJ7PxhW/pworlILy rrfyzZhvqgLnoKpMTrYNm264WZGFSfhkO5qup5OCSGW4+FGkBRklXKZ95bUosfLtrsil hpabhn8amIeCZhZUi1TfdG1OUNJcfRGUGSfQwn5AyaXAgWW+Xw121zbNkjfYELa+Frt0 LPNv75V3vZpCbI7wja7y2d3X0IHTwtLztInzYv+F7bYUZycVyg/b4gB/FbkjD4nDSByO kxjA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=LMMko3VqRRVEWTs33XX7XOixeeaje+m0/BePfDIMYmg=; b=LD1vyZ00jGfsBrFs/S7MDvKgGA9a+rfunNBb8G/I+Choyp9jZOhsZzJsaYtqdxdY3d 7bLrnS0ZqyrzwZqgR4VgskUUaFdgGSpOKTudrMP+HU+OXuraeZWGAiidwg3cppWEFHcC Z416p+Xwk64QSsvFexhIkGf2d8Iq4jgGihMmk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-type; bh=LMMko3VqRRVEWTs33XX7XOixeeaje+m0/BePfDIMYmg=; b=Pr4AWs4OJo72RnYrWe+bnMQLtYoDEp4AOekm0Co5kR7GI9UqmH4eik2D2iXsfjhUzN 2aAbvL8uBfwjklRs+6X0fEMzi3QKmPoQzg54YRnofn/m7e5uKGrMvnhcb2zDkHbwM5BO li6WNKbIgcVz/y69mHZe9gjTd40NnayvTYfPB3KvyjdQCo4wB1R1txTjcBbNAiRXFMDV Y7N2bNrZO+I/mUBBgev3Zhafb13NzYaCm1VXXaiFc+BnW3axPCLnk9I+yfEJmU4GaEYa 9B7bOm2r+1FnokFcndVdxLEQf4+D3vVVssZyQTtomda4cdovPf2SbtC6V6GIlQQPFKoJ qngA== X-Gm-Message-State: ALoCoQktupYrK2d5WdOMIZwlIl6IAvSa9hRXD2/qNOjNpnR9qWNhforXpNzjhdPyKgmh4x8IpT19 X-Received: by 10.140.46.97 with SMTP id j88mr14859550qga.12.1422468410478; Wed, 28 Jan 2015 10:06:50 -0800 (PST) MIME-Version: 1.0 Sender: agrieve@google.com Received: by 10.140.101.79 with HTTP; Wed, 28 Jan 2015 10:06:30 -0800 (PST) In-Reply-To: References: <1298B14A1D0704468AE73FC92557A162257EFC7D@SHSMSX104.ccr.corp.intel.com> From: Andrew Grieve Date: Wed, 28 Jan 2015 13:06:30 -0500 X-Google-Sender-Auth: KJMeOwmNtgv5-2c0sdFGWh_zPNM Message-ID: Subject: Re: cordova-android 4.0 JUnit tests To: dev Content-Type: multipart/alternative; boundary=001a113a65164fb341050dba3c0c X-Virus-Checked: Checked by ClamAV on apache.org --001a113a65164fb341050dba3c0c Content-Type: text/plain; charset=UTF-8 You can still embed a view using composition. We are not providing any backwards compatibility right now, even with inheritance, because CordovaWebView is no longer a View (it's an interface, which requires an explicit cast to (View), or a call to .getView() to be considered as a View) On Wed, Jan 28, 2015 at 11:26 AM, Joe Bowser wrote: > I completely disagree, and think we should go the inheritance pattern. The > reason for that is that we have to provide backwards compatibility for some > views where the implementation is a view, and there's no dual inheritance > in Java, which is the only way that I can see us accommodating both types > of implementations. If we didn't already have users embedding > CordovaWebView (and seriously guys, if you're reading this, please don't > keep leaving me hanging here, I want you to step up into this > conversation). Also, other views, such as the prototype MozillaView that I > worked on, are implemented so that they inherit from a view. > > Just because it may offer some us some flexibility doesn't mean that it's > worth taking away an entire feature from other users. My most popular > repository after Cordova itself is the example where I show how to embed a > CordovaWebView, so people have been using this feature. > > On Wed Jan 28 2015 at 6:49:18 AM Andrew Grieve > wrote: > > > I'd prefer to go the other way, and change AndroidWebView to composition. > > It's more flexible and does a better job of splitting up groups of APIs. > > > > On Wed, Jan 28, 2015 at 12:49 AM, Hu, Ningxin > > wrote: > > > > > Hi Joe, > > > > > > > > The tests don't work with Crosswalk because Crosswalk's main class > > > doesn't > > > > inherit from a view. This is why we had to change the CordovaWebView > > > > from being a class to being an Interface in the first place. I don't > > > think there is > > > > a way for these tests to work with Crosswalk because of this > > > incompatibility. > > > > I don't think there is a way to re-use these tests because of this > > > fundamental > > > > change. > > > > > > Crosswalk main class (XWalkView) actually inherits from a view (via > > > FrameLayout). See > > > https://crosswalk-project.org/apis/embeddingapidocs_v3/index.html > > > > > > I inspected the commit that changed the XWalkCordovaWebView from > > > inheritance to composition ( > > > https://github.com/MobileChromeApps/cordova-crosswalk-engine/commit/ > > 26029ce8ae6d651a44a90222514cc6902ef8bb4a). > > > The reason was some APIs of CordovaWebView interface (e.g. CanGoBack) > > > conflict with XWalkView internal implementation at that time. And I > > > remembered Ian and me thought CordovaWebView as an interface and > > > compositing of webview probably was a good decouple solution. > > > > > > However, this changed in Crosswalk embedding API 3 (current version) > that > > > we separated the public interface and implementation. I briefly checked > > > that the inheritance approach works with Crosswalk webview now. > > > > > > Folks, do you think we need to align all webview engines to inheritance > > > pattern? > > > > > > Thanks, > > > -ningxin > > > > > > > On Tue Jan 20 2015 at 5:11:54 AM Fu, Junwei > > wrote: > > > > > > > > > Hi, > > > > > > > > > > I pulled cordova-android 4.0 branch, and running JUnit test in > /test > > > > > directory, but there are compiled error as below, and I want reuse > > the > > > > > JUnit tests to test Crosswalk pluggable webView, so I request a PR > > > > > https://github.com/apache/cordova-android/pull/140, could someone > > > > help > > > > > me to review and merge it. > > > > > > > > > > /test/menus.java:37: error: method registerForContextMenu in class > > > > > Activity cannot be applied to given types; > > > > > [javac] super.registerForContextMenu(super.appView); > > > > > reason: actual argument CordovaWebView cannot be converted to View > > > > by > > > > > method invocation conversion > > > > > > > > > > test/splashscreen.java:33: error: method loadUrl in class > > > > > CordovaActivity cannot be applied to given types; > > > > > [javac] > > > > super.loadUrl("file:///android_asset/www/splashscreen/index.html", > > > > > 2000); > > > > > reason: actual and formal argument lists differ in length > > > > > > > > > > Thanks, > > > > > Junwei. > > > > > > > > > > ------------------------------------------------------------ > > --------- > > > > > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org > > > > > For additional commands, e-mail: dev-help@cordova.apache.org > > > > > > > > > > > --001a113a65164fb341050dba3c0c--