You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/08/12 08:27:02 UTC

[GitHub] [cordova-android] knight9999 opened a new pull request #1321: fix: dirty fix SystemWebViewEngine by using history.back instead of g…

knight9999 opened a new pull request #1321:
URL: https://github.com/apache/cordova-android/pull/1321


   
   ### Platforms affected
   android
   
   
   ### Motivation and Context
   To pass the BackButtonMultipageTest.testViaHref() on Android 11 (SDK30) .
   
   i.e. This PR fix the following error
   ```
   junit.framework.AssertionFailedError
   	at junit.framework.Assert.fail(Assert.java:48)
   	at junit.framework.Assert.assertTrue(Assert.java:20)
   	at junit.framework.Assert.assertTrue(Assert.java:27)
   	at org.apache.cordova.unittests.BackButtonMultipageTest$3.run(BackButtonMultipageTest.java:85)
   ```
   in BackButtonMultipageTest.
   
   ### Description
   if we use the `window.location = new_url` in javascript and make a page transition,
   SDK29 or before => we can go back to previous page by `webView.goBack()`.
   SDK30 => we cannot go back to previous page by `webView.goBack()`.
   
   I don't know this is a bug or specification in SDK 30.
   Anyway I used `history.back()` in javascript instead on SDK 30. 
   
   ### Testing
   Open the project `test/androidx` by AndroidStudio,
   and execute the BackButtonMultipageTest on Pixel 3 API 30 and API 29 in my local environment.
   
   
   
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   - [ ] I added automated test coverage as appropriate for this change
   - [ ] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
   - [ ] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [ ] I've updated the documentation if necessary
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org