Add a test for functionalities of GeckoSessionTestRule.
MozReview-Commit-ID: 9k9Fh1una20
--HG--
extra : rebase_source : f2558c452febf9f333ec4fed1955a0285ca9b246
Add a rule for setting up a GeckoSession for a JUnit4 test and letting
the test wait for listener invocations and to verify listener behavior.
MozReview-Commit-ID: 20ij409yY1Z
--HG--
extra : rebase_source : 50f8a01aad41938910710421b97d5dcc97594a06
Add GeckoSession.getScrollListener() so GeckoSessionTestRule can use it.
MozReview-Commit-ID: DLDlz5wz3cP
--HG--
extra : rebase_source : c196810da282f4ede6cb753081ef4d38af862909
GeckoSession consumers may want to refer to individual keys through a
GeckoSessionSettings.Key<> variable.
MozReview-Commit-ID: HK5wcs0uugD
--HG--
extra : rebase_source : 23e2489eed328bf0a08358c58c633d527d8a85c2
Right now there's no good way for a GeckoSession consumer to make a copy
of a GeckoSessionSettings object.
MozReview-Commit-ID: 199K5J51Y9x
--HG--
extra : rebase_source : 99c81c34ab2203e3517e07d286f865f5e93869c8
Kotlin has several nice features for writing tests, such as lambdas and
default implementations for interface methods. This patch adds Kotlin
support to the geckoview module build.gradle. We don't want to use
Kotlin in non-test code yet, so the patch ensures that only test code
contains Kotlin files.
MozReview-Commit-ID: FcQiHj20xlB
--HG--
extra : rebase_source : e304d25d09291bc0a3faa29bf36f9d01eadc8524
Pass --appname org.mozilla.geckoview.test to 'mach mochitest' or
'mach reftest'. This runs the tests without e10s currently.
MozReview-Commit-ID: 7TIvA3zRCw2
This eliminates a race where the JS side thinks it has a listener, and
expects a reply, but will never get one because it was unregistered
while the message was in-flight. GeckoSessionHandler dispatches
on the Android UI thread, which is where listeners are set/unset, so
we do not need any synchronization.
MozReview-Commit-ID: 5W3hsQ1cmb7
It may be nice to also log failed state transitions, but we seem to have too
many of those for it to be very useful right now.
MozReview-Commit-ID: 7z4UMyWQp2F
This adds a new geckoview_test module, which contains a
test runner Activity. We can then use JUnit4 + Espresso to
exercise the GeckoView APIs (such as GeckoSession).
MozReview-Commit-ID: FEMAZhpasLW
This allows apps to decide which GeckoSession should handle a load that
will be in a new window (e.g., window.open()).
MozReview-Commit-ID: BkJM93489Ga
This was oversight when landing Bug 1419581, coupled with dedicated
testing by Grisha. We don't expose all CONFIG values as DEFINES by
default, and I forgot to add the relevant value to the exposure list.
MozReview-Commit-ID: GUYNWampBAJ
--HG--
extra : rebase_source : f946f2630f2e9120d03b05a4677815e73ab6851a
Use the current principal to get the origin, so things work under e10s.
Also reorganize some of the code in checkIdentity.
MozReview-Commit-ID: 2heqVMQ7vam
--HG--
extra : rebase_source : 7e67d223aaf366115ac2b3e35bfcb56fba9766f2
closeConnection is a new API introduced in N. We don't really support it
at the moment but we also don't want the default behavior, so we
implement a dummy.
MozReview-Commit-ID: JY1Tl30X2s7
--HG--
extra : rebase_source : a64371a05aed9db957df2a97da5b23c90760cdb1
Getting the selection offsets in onCreateInputConnection can fail
because of us being on a wrong thread. The solution is to cache the last
selection offsets and use those in onCreateInputConnection.
MozReview-Commit-ID: AOlZsuOvzHm
--HG--
extra : rebase_source : 42f35bc60219707fc29db7cc2803f64313806244
We're currently determining whether a node is a media element by checking if the node's classname is HTMLMediaElement; but that's an abstract class and thus the condition is never satisfied. This checks against the concrete HTMLVideoElement and HTMLAudioElement classes instead.
Function queryExists added to StringUtils to check
if a given URL allows for arguments.
Tests for said function added to TestStringUtils.
Function loadUrlOrKeywordSearch in BrowserApp.java updated to also pass
the entire entered string along regardless of whether or not the first
words are keyword bookmarks iff there is additional text after the
keyword bookmark, and the keyword bookmark does not accept any input arguments
MozReview-Commit-ID: 2eyi5Botd3F
--HG--
extra : rebase_source : a08dd11a1595051a2dc727cc361cebecc14fa8c8
Display a message on startup when the APK is corrupt. Right now the
"wrong SDK" message is displayed. I think we can potentially reuse that
message for Beta, but we need a different message for Nightly.
MozReview-Commit-ID: 9NEw252Ytkc
On the second pass after failing the first time to load libraries,
enable CRC verification and detect if the APK is corrupt. In that case,
instead of crashing, we send out an event to the application.
MozReview-Commit-ID: 4b97Z8EUHZe
To reliably detect corrupt APK, this patch adds a GeckoLoader.verifyCRC
call to enable verification of CRC before extracting libs.
MozReview-Commit-ID: 5EpIfwREGIv
We had some issues with tabs closed shortly before backgrounding Firefox re-
appearing during session restore, however in hindsight bug 1282830 (closing a
zombie tab didn't trigger a session store file write) seems a more likely cause
for that than my initial theory from bug 1256277 comment 6 (tab events
dispatched *just* before backgrounding might be processed only after our
application-background handling), because as far as I can tell the latter theory
actually requires really split-second timing.
With that in mind, the differing, smaller minimum file write interval while in
background can be removed again.
MozReview-Commit-ID: GSQZYKeYME6
--HG--
extra : rebase_source : 598f49df98b7a09d63cd7e0aad6ad079916fad99