Commit Graph

1137 Commits

Author SHA1 Message Date
Boris Zbarsky
d5546b23ee Bug 1476145 part 7. Stop using getInterface(nsIDOMWindowUtils) in mobile/. r=snorp 2018-07-24 19:47:42 -04:00
Jim Chen
4f6c4496c9 Bug 1470786 - 1. Support async text changes from replacing text; r=esawin
Currently, we expect editing operations in
GeckoEditableSupport::OnImeReplaceText to cause synchronous text change
notifications. However, under e10s, text change notifications can be
asynchornous. The new code keeps track of active OnImeReplaceText calls,
and look for async text changes before replying to the calls.

MozReview-Commit-ID: INM3JLmQebK

--HG--
extra : rebase_source : ff5b728ef437fcd78e4e7eced9c9a537d4698dce
2018-07-17 11:22:34 -04:00
Vlad Baicu
f434b908e1 Bug 1384866 - Refactored MediaControlService logic to GeckoMediaControlAgent. r=jchen
Moved the logic ouf of MediaControlService to a new singleton GeckoMediaControlAgent,
which delegates all media-related actions.Currently, MediaControlService is used
for the foreground notification and to retrieve actions from the notification
pending intents. Removed redundant test cases.

MozReview-Commit-ID: KukAmpnn33S

--HG--
rename : mobile/android/app/src/test/java/org/mozilla/gecko/media/TestMediaControlService.java => mobile/android/app/src/test/java/org/mozilla/gecko/media/TestGeckoMediaControlAgent.java
extra : amend_source : 251b7821f4ddefcf852480de72ca1004cbd261bf
2018-06-22 19:02:54 +03:00
Petru Lingurar
71b46df0d4 Bug 1385464 - Start using support library v. 26; r=nalexander
This patch also:
Resolves missing resources and api changes
- LeanplumActionBarActivity was removed because Support Library 26 deprecated
ActionBarActivity. Class was already not in use.
- CustomTabsService added two new methods which we need to override.
Tested to make sure that previous functionality was maintained but with the
addition of the two new methods maybe that feature could be improved.
- For checking layout direction we'll use our own new method from ViewUtil
which mimics what the now restricted method from the support library would do.
- Upgraded to use AppCompatResources#getDrawable(..) in place
of the now restricted AppCompatDrawableManager.get().getDrawable(..).

Resolves obscure leaks and crashes after the upgrade
- LoaderManager.destroyLoader(..) was added before the existing call to
LoaderManager.restartLoader(..) to prevent potential Cursor leaks
- Disable website suggestions depending on the address bar inputs when running
in automation to avoid Robocop tests failing (they were entering serially maybe
100 characters in <5 ms which created around that many new Threads,
operation that could cause the Executor to throw a RejectedExecutionException)
At the moment this functionality is not covered by tests anyway and it was the
only fix I could find that would not involve changing the whole implemenation
for address bar suggestions, implementation which in the real world works ok.

MozReview-Commit-ID: 2fX1SBHiSh0

--HG--
extra : amend_source : edb6c5853cdcea5ad50a7cf680f2214fdc176cb2
2018-07-13 17:16:37 +03:00
Andrew Swan
16e4b0c0f5 Bug 1451525 Convert roboextender to a webextension r=jmaher
MozReview-Commit-ID: CIewLE5Rzuk

--HG--
rename : mobile/android/tests/browser/robocop/roboextender/bootstrap.js => mobile/android/tests/browser/robocop/roboextender/api.js
extra : rebase_source : 366171067f1445e53da72fbc1475b28d05425f35
2018-07-11 13:07:05 -07:00
Petru Lingurar
b9eed730ee Bug 1386192 - Test Leanplum Custom Message for Onboarding; r=cnevinchen+582291
Created LeanPlumVariables to allow LeanPlum overwriting the values used for
populating the OnBoarding screens. By simply adding the @Variable annotation
to it's fields, on the first run of the app, they will appear in "LeanPlum
dashboard - Variables" and will allow overwriting for future runs.

The OnBoarding process will now try to use LeanPlum values if possible.
Because connecting to LeanPlum and downloading the Variables might take
a few seconds we use a delay of up to 3 seconds until starting to show
the Onboarding screens.
The default values will still be used if:
- if the LP experiment is not available
- if no internet connection
- if more than 3 seconds have passed and LP didn't finish it's download

Added two new events that could be tracked to Leanplum
MmaDelegate.ONBOARDING_DEFAULT_VALUES and MmaDelegate.ONBOARDING_REMOTE_VALUES
to inform if showing the Onboarding with server values was possible or not.

Because of the 3 seconds delay until showing the Onboarding panels leaking the
could be possible. Used WeakReferences for both the Activity in
OnboardingHelper and the OnboardingHelper in MmaLeanplumImp to avoid it.

MozReview-Commit-ID: H30e9Ng7jrM

--HG--
extra : rebase_source : e403b8010005aa82f8b6440586c533ce99952f9f
2018-07-04 12:56:20 +03:00
Jan Henning
acd95437dd Bug 1458697 - Use different strategy for dealing with initial session store activity. r=gbrown
Waiting for delayed startup and then attempting to force any possibly still
pending session store write to disk by flushing the session store data didn't
turn out to be a good idea, because if the session store had already started its
own automatic write at that moment in time, we'd get back an additional
"PrivateBrowsing:Data" event that we didn't expect, thereby confusing the test.

Instead, we now wait for the first session store write after startup to occur
naturally before proceeding with the test.

MozReview-Commit-ID: Hui9YYec1Ow

--HG--
extra : rebase_source : 7c063871fbe47e5f568f19151292c24232939790
2018-06-07 21:10:20 +02:00
sreeise
89595cee88 Bug 1158979 - Removed StringHelper.get and changed StringHelper.initialize to return the StringHelper instance. r=nechen
Uses of StringHelper.get are replaced with the StringHelper instance in BaseRobocopTest.java and UITestContext.

MozReview-Commit-ID: FfMhdNCX1vC

--HG--
extra : rebase_source : c83977f5b9d2d70953c6a89aa30cd28501b5c994
2018-05-27 02:44:59 -04:00
Boris Zbarsky
c7f378d7ab Bug 1465875 part 1. Eliminate pointless QIs to nsIDOMNSEditableElement. r=qdot
We expose the relevant APIs on textarea and input elements anyway
(chromeonly).  The QIs will throw on a non-input or non-textarea element, but
none of these consumers expect that to happen.
2018-06-01 22:35:22 -04:00
Kris Maglione
01c298aca6 Bug 1460092: Add ESLint rule to enforce use of ChromeUtils.generateQI. r=Gijs
Also fixes existing code which fails the rule.

MozReview-Commit-ID: CkLFgsspGMU

--HG--
extra : rebase_source : 86a43837659aa2ad83a87eab53b7aa8d39ccf55b
2018-05-08 18:36:22 -07:00
Jan Henning
6a24be748d Bug 1460028 - Experimental - Use string literal instead of static variable in SessionTest. r=gbrown
Experimentally try using a String literal in case the NullPointerException at
that line is caused by some weird class initialisation issue.

MozReview-Commit-ID: 1BexpntTBEJ

--HG--
extra : rebase_source : ea71f390ce0d683cd635aae52825871562b78feb
2018-05-08 21:55:20 +02:00
Andrew Gaul
80f292e771 Bug 1436271 - Replace calls to String.getBytes(String) with String.getBytes(Charset). r=nalexander
Also replace calls to String(byte[], String) with String(byte[], Charset).  This
removes some cannot-happen exception handling.
2018-02-06 22:12:33 -08:00
Jan Henning
5ec5f23aab Bug 1456391 - Part 8: Use mapFrameTree in Fennec. r=esawin
This brings us in line with Desktop's session store, in that we can now collect
data for arbitrarily nested frame structures.

At the same time, this also means that we no longer collect data for dynamically
added frames, so the corresponding mochitest needs to be adapted accordingly.

MozReview-Commit-ID: DfJ3C2ccUne

--HG--
extra : rebase_source : bbb2181d5596d21254d2f7394c1383a3979dcef4
2018-04-25 22:21:41 +02:00
Cosmin Sabou
a1f7ce21a9 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-05-02 18:07:21 +03:00
Jim Chen
cdd3e5ab7e Bug 1457255 - 2. Fix Java warnings; r=me
Fix all Java warnings in the Android codebase except deprecation and
serial warnings, and warnings in third-party code.

There is one required change to exoplayer2 code under thirdparty,
because that code is included directly in the geckoview project, instead
of the thirdparty project. I think I'll just make a pull-request to
upstream the change, instead of separating exoplayer2 into a
gv-thirdparty project.

--HG--
extra : amend_source : 29419a24db9b956a7f3ee573a63f7a055ed90636
2018-05-01 00:22:54 -04:00
Noemi Erli
5b7edf8bba Backed out 4 changesets (bug 1457255) for kotlin warnings/errors are not being parsed by Treeherder a=backout
Backed out changeset 9c42ce50a911 (bug 1457255)
Backed out changeset 524a0f9fb978 (bug 1457255)
Backed out changeset a49833bfd519 (bug 1457255)
Backed out changeset 4eccde5dfbef (bug 1457255)
2018-05-02 01:16:57 +03:00
Jim Chen
0ce1010182 Bug 1457255 - 2. Fix Java warnings; r=me
Fix all Java warnings in the Android codebase except deprecation and
serial warnings, and warnings in third-party code.

There is one required change to exoplayer2 code under thirdparty,
because that code is included directly in the geckoview project, instead
of the thirdparty project. I think I'll just make a pull-request to
upstream the change, instead of separating exoplayer2 into a
gv-thirdparty project.
2018-05-01 00:22:54 -04:00
Adrian Wielgosik
8c66c095f4 Bug 1418078 - Convert JS users of nsIDOMHTMLInputElement. r=bz
MozReview-Commit-ID: 55aIiNHS0xs

--HG--
extra : rebase_source : cacb9fc29daa5d620d4a0cd6ab3f09cde765036f
2018-04-18 22:29:50 +02:00
Jim Chen
04cd34291a Bug 1454441 - 4. Fix Fennec remote debugging; r=esawin
Currently Fennec remote debugging has a bug where custom tabs / PWA can
permanently override debugging of Fennec tabs. Fix that bug by switching
between the browser/geckoview  window types depending on if the Fennec
window is gaining or losing focus.

MozReview-Commit-ID: 2BhAOPFz3c0

--HG--
extra : rebase_source : b9b6059241549bdb6badcc5702c9e47e7228edb3
2018-04-23 12:07:34 -04:00
Andreea Pavel
4109ce94c2 Backed out 4 changesets (bug 1454441) for android-lint failure on a CLOSED TREE
Backed out changeset d4fcd301a168 (bug 1454441)
Backed out changeset 79fa5c2950a3 (bug 1454441)
Backed out changeset deb0e12bfbd7 (bug 1454441)
Backed out changeset fad6be573021 (bug 1454441)
2018-04-23 20:16:29 +03:00
Jim Chen
949ee3dab8 Bug 1454441 - 4. Fix Fennec remote debugging; r=esawin
Currently Fennec remote debugging has a bug where custom tabs / PWA can
permanently override debugging of Fennec tabs. Fix that bug by switching
between the browser/geckoview  window types depending on if the Fennec
window is gaining or losing focus.

MozReview-Commit-ID: 2BhAOPFz3c0

--HG--
extra : rebase_source : b9b6059241549bdb6badcc5702c9e47e7228edb3
2018-04-23 12:07:34 -04:00
Kris Maglione
219ed0cc06 Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian
The old name no longer makes sense, since it no longer exports an spawn_task
symbol, and add_task is what we really care about.

MozReview-Commit-ID: IE7B8Czv8DH

--HG--
rename : testing/mochitest/tests/SimpleTest/SpawnTask.js => testing/mochitest/tests/SimpleTest/AddTask.js
extra : rebase_source : 03bca5aa69a7625a49b4455a6c96ce4c59de3a5a
2018-04-18 11:43:45 -07:00
Kris Maglione
e3787823b5 Bug 1453881: Fix Android tests that still used task generators. r=bustage
MozReview-Commit-ID: IAWUQn8dW3d
2018-04-17 17:34:18 -07:00
Kris Maglione
0f40271841 Bug 1453881: Part 1a - Automatically write add_task(function*) to add_task(async function) r=ochameau
This was done using the script at:

bc5629735d/processors/add-task-async.jsm

MozReview-Commit-ID: KxuS9Cen87

--HG--
extra : rebase_source : c0028e0cd55ba1643610cd30c55c6f4bca7d6e58
extra : histedit_source : ebc84fdec9c2db6176632d62de4e7bdad2a7829d
2018-04-12 21:10:04 -07:00
Jim Chen
9e1cc5b538 Bug 1452200 - 3. Don't limit AndroidLog tag length; r=jchen
In practice, Android never enforced restrictions on the tag length, and
in newer versions, the restriction is removed, so we shouldn't limit the
tag length at all.

MozReview-Commit-ID: JQF9FBdB5Fj

--HG--
extra : rebase_source : 71aa09210d694b68a72043f7588fbd799f385c23
2018-04-15 14:53:29 -04:00
Jim Chen
bc927af5f3 Bug 1446729 - 3. Move GeckoEditable/InputConnection to o.m.geckoview; r=esawin
Moving GeckoEditable and GeckoInputConnection to o.m.geckoview lets us
make the interfaces inside SessionTextInput package-private, so they
don't show up in the docs.

MozReview-Commit-ID: 1C8olyqj4sX

--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoEditable.java => mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoEditable.java
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoInputConnection.java => mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoInputConnection.java
extra : rebase_source : d1538761e494f5e44a111e65febfbbf6e90dc1f3
2018-03-18 05:38:55 -04:00
Tim Nguyen
5c75b305da Bug 1445099 - Fix android chrome test failures on a CLOSED TREE. r=me 2018-03-26 19:14:49 +02:00
Boris Zbarsky
de9297b4bf Bug 1448048. Restrict the window.Components shim to non-nightly-only to see whether sites actually use it. r=mccr8
MozReview-Commit-ID: 6W1nEyKGlER
2018-03-23 12:53:48 -04:00
Masayuki Nakano
fcb248a698 Bug 1343451 - part 5: Make GeckoEditableSupport dispatch dummy eKeyDown and eKeyUp event during composition always r=jchen
On Android, GeckoEditableSupport has already dispatched eKeyDown event and
eKeyUp event even during composition.  I.e., the pref which will be enabled
by bug 354358 has already been set to true only on Android.

On the other hand, GeckoEditableSupport does not dispatch them if content
listens to "input", "compositionstart", "compositionupdate" or
"compositionend".  So, different from the other platforms, we need additional
pref to make the new behavior behind pref.

Therefore, this patch adds a new pref,
"intl.ime.hack.on_any_apps.fire_key_events_for_composition", to override
existing "intl.ime.hack.on_ime_unaware_apps.fire_key_events_for_composition"
pref.  And sets mKeyCode and mKeyNameIndex of the dummy KeyboardEvents to
NS_VK_PROCESSKEY and KEY_NAME_INDEX_Process.

MozReview-Commit-ID: Fuy0Ir2xiO5

--HG--
extra : rebase_source : c76b613ea186458ebdf0d67f4bc984e8ac5f1041
2018-02-27 17:24:35 +09:00
Jan Henning
6c6b8aa3aa Bug 1402549 - Part 2 - Use something else to trigger session store activity. r=esawin
Instead of adding and immediately closing a tab, which carries the risk that we
catch a session store file that was written just in-between those two
operations (although part 1 means that we should be able to handle this safely
now), we just reload the current tab.

MozReview-Commit-ID: JbiH8rmbbwJ

--HG--
extra : rebase_source : 540ad903c3b1424b4603233044f5908cc7a09fea
2018-03-10 14:19:23 +01:00
Jan Henning
4285502395 Bug 1402549 - Part 1 - Assert number of saved tabs, too. r=esawin
MozReview-Commit-ID: DIfqQo3Fvlg

--HG--
extra : rebase_source : df104cf7d87ebdf5dec7ff708a6375dd8b75240f
2018-03-10 14:09:03 +01:00
Andrew Gaul
24e313e7c7 Bug 1437430: Make some immutable final fields static; r=mcomella
Adding static reduces memory overhead from per-instance to per-class and allows
initialization at compile-time instead of run-time.  Found via a proposed
error-prone pull request:

https://github.com/google/error-prone/pull/930

MozReview-Commit-ID: CMj6vqFeCdI

--HG--
extra : rebase_source : 43e91b3d8ff4bd8171ac25bd0b333d09645687a6
2018-02-11 22:36:58 -08:00
Gijs Kruitbosch
4340ba60f2 Bug 1444082 - sync reader mode to github tip ( 8525c6af36d3badbe27c4672a6f2dd99ddb4097f ), r=johannh
MozReview-Commit-ID: LZLFf9kyUR5

--HG--
extra : rebase_source : 9f2e517afa764dbe339b84abfaaf948b1402cba1
2018-03-08 14:35:02 +00:00
Randell Jesup
d39849ea7e Bug 1443765: Update android formdata sessionstore test for delayed save r=snorp 2018-03-08 17:12:57 -05:00
Mark Banner
b78260f4b8 Bug 1439831 - Enable ESLint rule mozilla/use-services for mobile/android. r=nechen
MozReview-Commit-ID: 3MuRD78hMuE

--HG--
extra : rebase_source : 772d31d98af3c5204b4000903a5e5e9fecc9dc52
2018-02-21 08:57:28 +00:00
Jan Henning
71662fd6ec Bug 1437382 - Part 5 - Test that flushing pending session store data sends the expected messages to Java. r=jchen
We attempt to get the session store into a known state as far as is possible
from Java and then test various situations to check that the expected
"PrivateBrowsing:Data" message is received in each case.

MozReview-Commit-ID: 8RkCQjAPXTT

--HG--
extra : rebase_source : 5c6b1ae911aed0e6ac5d121e78ce06090f14a795
2018-02-20 20:18:36 +01:00
Florian Quèze
8922be9c58 Bug 1433175 - enable the use-cc-etc eslint rule, r=Standard8. 2018-02-28 18:51:35 +01:00
Florian Quèze
c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Mark Banner
294979dc32 Bug 1441460 - ESLint's no-define-cc-etc looks at the wrong property item when checking for Cc/Ci/Cu/Cr usage. r=florian
MozReview-Commit-ID: IkSkCWqBHOn

--HG--
extra : rebase_source : 6b3a2977d4b157aea54c6e3f6960d3673e751a34
2018-02-23 20:42:17 +00:00
Nick Alexander
9ec875007d Bug 1440433 - Part 1: Remove mobile/android/tests/browser/robocop/Makefile.in. r=jchen
I had forgotten that m/a/base/Makefile.in can't be killed before m/a/tests/browser/robocop/Makefile.in.

MozReview-Commit-ID: KbtRN5ZCTSJ

--HG--
extra : rebase_source : ea16c04cf018d7b5c53db6d0c4e8218703bdd7e0
2018-02-22 13:31:07 -08: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
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
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
Jared Wein
9788800512 Bug 1436575 - Manually fix the errors from no-compare-against-boolean-literal that the autofix couldn't change. r=standard8
MozReview-Commit-ID: 6NtfU76sPKv

--HG--
extra : rebase_source : 143891b98995658a5683e01631eba9f6a2bb7b6f
2018-02-08 13:35:53 -05:00
Jim Chen
397b87dfe2 Bug 1326101 - 1. Add unit test for GeckoBundle; r=snorp
Add a unit test for GeckoBundle, which tests GeckoBundle more thoroughly
than testEventDispatcher. This also lets us remove the Parcelable test
from testEventDispatcher.

MozReview-Commit-ID: Gn48Zw4Rvx5
2018-02-08 13:36:22 -05:00
Andreea Pavel
7c97cadaf2 Backed out changeset 1889332abc68 (bug 1436271) for android test failure on a CLOSED TREE 2018-02-07 21:09:19 +02:00
Andrew Gaul
7ae797fc80 Bug 1436271: Replace calls to String.getBytes(String) with String.getBytes(Charset) r=nalexander
Also replace calls to String(byte[], String) with String(byte[], Charset).  This
removes some cannot-happen exception handling.
2018-02-06 22:12:33 -08:00
Jeremy Lempereur
9e6a7ee1f9 Bug 1249596 - Part 1: Remove FHR client id migration code on Android. r=nalexander
Removed FHR client id migration code on the Android side.

MozReview-Commit-ID: X9QKtbh6r3

--HG--
extra : rebase_source : f5587789f6980aecc4309dc329eb051650ad4c6f
2018-01-31 23:50:53 +01:00
Cameron McCormack
234b89c117 Bug 1435666 - Part 3: Remove nsIDOMXPathResult. r=bz
MozReview-Commit-ID: 9j6dUlanNTi

--HG--
extra : rebase_source : 9a790516379441d4e048009bcacdd26e93fde6ae
2018-02-05 11:39:18 +08:00
Andrew McCreight
5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00