cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gonzalez <martin.c.glez.g...@gmail.com>
Subject Cordova android native test
Date Fri, 30 Jan 2015 21:56:16 GMT
Hi all,

Recently tested cordova-android master branch and found out a commit that
it's triggering an issue that it got solved a while ago indirectly.
Info:
CB-8317
ccceaeaca
Link:
https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;a=commit;h=ccceaeaca2d72fb9708100ab2f70adb903a27d66
breaks: CB-7371

To avoid future regressions, Joe suggest to create a native test that would
recreate the conditions to verify that the issue is not present.

Here's the deal, the current Cordova Native test suite, with the app
itself, I can't recreate it, MainTestActivity class doesn't get affect at
all, although with a cordova project that uses a single activity it can be
recreate easily.
If I go to any of the other activities and recreate it, that activity gets
destroyed and gets back to the first one(MainTestActivity).
The only way to recreate the problem using that test suite is by using
Error URL (errorurl class) test, which triggers a destroy of the previous
activity caused by not locate the html resource in the path provided.
In that specific test, in that activity and after the previous activity is
closed, in there I can perform the manual test and recreate the problem.

I've added the code to change the configuration and perform a recreation in
that specific test, but that would mean, that it can't go back to the
previous one where all other test live.
Another would be call the activity to perform config changes, pause the
main, and get back to it, apply the configuration in that one and then
trigger the recreation onResume, by listening the configuration changes, or
adding a broadcastreceiver.

Test sample project with a single activity:
-->Change the config
-->Triger recreation.
Expected: it should recreate the activity
Result (current master): it crash the app.

steps to recreate manually:
1.- Create a project
2.- platform add cordova-android (master)
3.- build & deploy
4.- once launched, minimize it & go to settings
5.- Select another language, and then resume the app, by using the home
button.
At that point crashes

Does anybody have any idea, to perform such as test without having to kill
the main activity?
any other ideas about how to recreate the scenario?

Thanks devs.

-- 
Regards,
Martin Gonzalez

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message