Commit Graph

25573 Commits

Author SHA1 Message Date
Jim Chen
3bf8f7cdd1 Bug 1439410 - 5. Add test for GeckoSessionTestRule; r=snorp
Add a test for functionalities of GeckoSessionTestRule.

MozReview-Commit-ID: 9k9Fh1una20

--HG--
extra : rebase_source : f2558c452febf9f333ec4fed1955a0285ca9b246
2018-02-22 18:39:12 -05:00
Jim Chen
e59ef3e43d Bug 1439410 - 4. Add JUnit4 rule for testing GeckoSession; r=snorp
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
2018-02-22 18:39:12 -05:00
Jim Chen
448584018f Bug 1439410 - 3b. Add GeckoSession.getScrollListener(); r=jchen
Add GeckoSession.getScrollListener() so GeckoSessionTestRule can use it.

MozReview-Commit-ID: DLDlz5wz3cP

--HG--
extra : rebase_source : c196810da282f4ede6cb753081ef4d38af862909
2018-02-22 18:39:11 -05:00
Jim Chen
9c6f644de4 Bug 1439410 - 3a. Make GeckoSessionSettings.Key<> public; r=snorp
GeckoSession consumers may want to refer to individual keys through a
GeckoSessionSettings.Key<> variable.

MozReview-Commit-ID: HK5wcs0uugD

--HG--
extra : rebase_source : 23e2489eed328bf0a08358c58c633d527d8a85c2
2018-02-22 18:39:11 -05:00
Jim Chen
8f827ce7f6 Bug 1439410 - 2. Add copy constructor for GeckoSessionSettings; r=snorp
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
2018-02-22 18:39:11 -05:00
Jim Chen
290fc0830c Bug 1439410 - 1. Enable Kotlin for geckoview tests; r=nalexander
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
2018-02-22 18:39:11 -05:00
James Willcox
bf50533bd6 No bug, followup for linting failures r=me
MozReview-Commit-ID: At5TO40eKhJ
2018-02-22 09:52:14 -06:00
James Willcox
a47a1c6678 Bug 1291387 - Make mochitest and reftest work against TestRunnerActivity r=gbrown,jchen
Pass --appname org.mozilla.geckoview.test to 'mach mochitest' or
'mach reftest'. This runs the tests without e10s currently.

MozReview-Commit-ID: 7TIvA3zRCw2
2018-02-22 09:18:37 -06:00
James Willcox
75c6e9c7ff Bug 1291387 - Handle errors when using EventDispatcher.sendRequestForResult in GeckoView JS modules r=jchen
MozReview-Commit-ID: EOLO59ZbTOR
2018-02-22 09:18:36 -06:00
James Willcox
ef799498f8 Bug 1291387 - Reply with an error in GeckoSessionHandler when no listener registered r=jchen
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
2018-02-22 09:18:36 -06:00
James Willcox
158da574a3 Bug 1291387 - Log GeckoThread state transitions r=jchen
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
2018-02-22 09:18:35 -06:00
James Willcox
2562ac0bd4 Bug 1422019 - Stand up initial GeckoView tests r=nalexander,jchen
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
2018-02-22 09:18:35 -06:00
Nick Alexander
f994854ec0 Bug 1422019 - Fix errors in |mach android archive-geckoview|. r=snorp
MozReview-Commit-ID: Gzbv1Y6agsM
2018-02-22 09:18:34 -06:00
Nick Alexander
872fdab41b Bug 1422019 - Fix diagnostic requiring |mach package|. r=snorp
No idea when this broke -- probably the transition to Gradle 4 -- but
this seems to work.  As suggested at
https://discuss.gradle.org/t/copy-task-how-to-fail-on-no-source/25581/2.

MozReview-Commit-ID: 8oGazgLZT3J
2018-02-22 09:18:34 -06:00
James Willcox
9ba68c37c5 Bug 1422019 - Make resource://android/asset work again with GeckoView r=jchen
MozReview-Commit-ID: FYD4cOaNBza
2018-02-22 09:18:33 -06:00
James Willcox
5201ec1c4f Bug 1439747 - Add GeckoSession.ContentListener.onCloseRequest() r=jchen,droeh
MozReview-Commit-ID: CPUVfe1LKDW
2018-02-22 09:18:33 -06:00
James Willcox
e7c0c03f32 Bug 1432485 - Add GeckoSession.NavigationListener.onNewSession r=jchen,esawin
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
2018-02-22 09:18:32 -06:00
Dorel Luca
6ad641c5c4 Merge mozilla-inboud to mozilla-central. a=merge 2018-02-22 11:59:54 +02:00
Eugen Sawin
05eba99d35 Bug 1432235 - [1.2] Move GeckoView API classes to org.mozilla.geckoview. r=snorp,jchen 2018-02-22 00:46:26 +01:00
Grigory Kruglov
09f51f2e63 Bug 1429735 - Pre: cleanup some unused helper methods r=nalexander
MozReview-Commit-ID: vpnFdFYf4V

--HG--
extra : rebase_source : 16b8edf20f862f9f7dbb9feb6124d6d104424bb5
2018-01-23 16:05:11 -05:00
Nick Alexander
5d736e0310 Bug 1439459 - Expose MOZ_ANDROID_GOOGLE_PLAY_SERVICES to AndroidManifest.xml. r=Grisha
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
2018-02-20 10:06:13 -08:00
Zibi Braniecki
cd219b53b0 Bug 1431260 - Switch Android code to read multilocale.txt. r=rnewman
MozReview-Commit-ID: 6S4VaAvDako

--HG--
extra : rebase_source : 90bc489755aab0e58a67be16c0114833744c6a0c
extra : source : 3e1d4584acb20b4b0b201fe0d29363010d0dfa7c
2018-02-13 23:42:34 -08:00
Zibi Braniecki
dba8ca857b Bug 1431260 - Switch multilocale.json to multilocale.txt in the build system. r=gps
MozReview-Commit-ID: 6S4VaAvDako

--HG--
extra : rebase_source : 29cc2e3416413363a40e77c10a95db7736497948
2018-02-13 23:42:14 -08:00
Mark Banner
2762cbd5c2 Bug 1439838 - Enable ESLint rule no-unused-vars for the same directories in mobile/android as no-undef. r=JanH
MozReview-Commit-ID: 1popN3tahBx

--HG--
extra : rebase_source : 1cc950c6de7ecf8658f174fb48e6a8afe0a1b1c9
2018-02-21 09:22:03 +00:00
Jim Chen
c35b2c3fb7 Bug 1439610 - Fix origin under e10s in GeckoViewProgress; r=droeh
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
2018-02-20 14:31:13 -05:00
Mark Banner
aa71c1a3b2 Bug 1439380 - Remove uses of Promise.jsm from mobile/android. r=nechen
MozReview-Commit-ID: KzrWz3K6vva

--HG--
extra : rebase_source : 1b112deaf4b0cea1742ec1742981460513bd6242
2018-02-19 15:50:26 +00:00
Dorel Luca
037478c033 Backed out 9 changesets (bug 1410456) for Mochitest failure on mobile/android/tests/browser/chrome/test_media_playback.html
Backed out changeset 36f6b40dfa88 (bug 1410456)
Backed out changeset 19f3248502d9 (bug 1410456)
Backed out changeset 18ef18999175 (bug 1410456)
Backed out changeset 0ec75a56b4c7 (bug 1410456)
Backed out changeset f7eae1545d5e (bug 1410456)
Backed out changeset d59060ecd24c (bug 1410456)
Backed out changeset f996b9dce4a6 (bug 1410456)
Backed out changeset 1f75636b5bce (bug 1410456)
Backed out changeset c170d37b1a04 (bug 1410456)
2018-02-19 21:45:10 +02:00
Eugen Sawin
327a3bcb38 Bug 1410456 - Allow OMT access to Android system audio properties. r=esawin
MozReview-Commit-ID: DQ8ubHECtBQ

--HG--
extra : rebase_source : 1a6314681b6ad0e00950e5e06d602e2ca2e8348e
2018-02-19 18:28:09 +02:00
Jim Chen
9cf5255ceb Bug 1438682 - 2. Implement dummy closeConnection; r=esawin
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
2018-02-15 18:06:07 -05:00
Jim Chen
a1a66f9c59 Bug 1438682 - 1. Cache initial selection offsets; r=esawin
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
2018-02-15 18:06:06 -05:00
Thomas Wisniewski
14c2bbe588 Bug 792808 - Change mobile/android/ to import and instantiate XHRs from global properties rather than using Cc.createInstance(Ci.nsIXMLHttpRequest); r=sebastian
MozReview-Commit-ID: JHIHB11vdWL

--HG--
extra : rebase_source : ac365f5a97f5b2c8ddfcda1d5444dbd4cc6a240e
2017-09-19 12:05:47 -04:00
Timothy Guan-tin Chien
a2a559db3e Bug 1234008 - Recompress some png images with zopflipng r=Dolske,Grisha,jryans
MozReview-Commit-ID: Cr2iMSB04uu

--HG--
extra : rebase_source : 49f69cca3a4f27af1060ed82283b5cc96f717229
2018-01-27 15:57:42 +08:00
Narcis Beleuzu
2d9816273c Merge inbound to mozilla-central. a=merge 2018-02-16 11:49:59 +02:00
Dylan Roeh
8819d6c766 Bug 1432233 - Eliminate GeckoBundles from public APIs in GeckoSession. r=snorp 2018-02-15 12:44:32 -06:00
Margareta Eliza Balazs
55aa0e75d6 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-02-15 22:43:18 +02:00
Dylan Roeh
5457d433a9 Bug 1438342 - Fix context menu for media elements in GV. r=snorp
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.
2018-02-14 15:49:52 -06:00
Andreea Pavel
2a7b1dfa56 Merge mozilla-central to autoland. on a CLOSED TREE 2018-02-15 12:34:12 +02:00
Andreea Pavel
74b7ffee40 Merge mozilla-inbound to mozilla-central a=merge
--HG--
rename : js/src/jscompartment.cpp => js/src/vm/JSCompartment.cpp
rename : js/src/jscompartment.h => js/src/vm/JSCompartment.h
rename : js/src/jsscript.cpp => js/src/vm/JSScript.cpp
rename : js/src/jsscript.h => js/src/vm/JSScript.h
extra : amend_source : 9c233cb959c45e401189d089a094f9d141d2b912
2018-02-15 12:24:21 +02:00
Snowrries
6eed2ab7a2 Bug 1435060 - Allow keyword bookmark as search query; r=JanH
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
2018-02-14 03:07:13 -05:00
Dorel Luca
75f385b6d6 Merge mozilla-centra to mozilla-inbound 2018-02-15 00:37:44 +02:00
Dorel Luca
4234703a53 Merge mozilla-inbound to mozilla-central a=merge 2018-02-15 00:23:02 +02:00
Dorel Luca
90035255ae Merge autoland to mozilla-central a=merge 2018-02-15 00:19:43 +02:00
Jim Chen
784142edc5 Bug 1391268 - 4. Display message when APK is corrupt; r=snorp
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
2018-02-14 16:56:54 -05:00
Jim Chen
ef4e739d2a Bug 1391268 - 3. Detect corrupt APK when loading libs; r=snorp
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
2018-02-14 16:56:54 -05:00
Jim Chen
589e7e1a01 Bug 1391268 - 1. Add call to verify CRC; r=glandium
To reliably detect corrupt APK, this patch adds a GeckoLoader.verifyCRC
call to enable verification of CRC before extracting libs.

MozReview-Commit-ID: 5EpIfwREGIv
2018-02-14 16:56:54 -05:00
L10n Bumper Bot
4be2a1313f no bug - Bumping Fennec l10n changesets DONTBUILD r=release a=l10n-bump
km -> default
meh -> default
tl -> default
2018-02-14 03:40:46 -08:00
Dylan Roeh
c34f6ed90c Bug 1391076 - Update GeckoSession.setActive to focus/blur as appropriate. r=snorp 2018-02-12 12:38:11 -06:00
Jan Henning
ce7ac5c8a9 Bug 1437388 - Don't set different session store write interval while in background. r=esawin
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
2018-02-11 19:43:16 +01:00
Eugen Sawin
0d21e3454c Bug 1436887 - [1.1] Add GeckoView prefs file. r=snorp,jchen 2018-02-14 19:52:20 +01:00
Dorel Luca
dabf7b41ee Merge mozilla-central to autoland. CLOSED TREE
--HG--
extra : amend_source : 021950f3661e3b1d96e768155c5754b7af039f84
2018-02-15 00:35:45 +02:00