Add test for handling the cases, media with silent audio track and media without audio track.
MozReview-Commit-ID: 5vV9EjIjHQt
--HG--
extra : rebase_source : 37fccc055479a40fd802107ccdc45d11d11c1852
When a non-restartless add-on is (un)installed or updated, we show a doorhanger prompting the user to restart. Currently, the doorhanger's title is using the default logic for choosing its title, that is using the base domain of the tab the doorhanger is being displayed on.
By chance, when the doorhanger is triggered from about:addons there is no domain to display, so the doorhanger is just displaying the restart notification. If however an add-on is automatically updated while the user is browsing, then the restart prompt will show the domain of the currently open tab in conjunction with the restart message. This can be confusing for the user, as it looks like it was in fact the current page that triggered the restart prompt.
Therefore, we change this behaviour and just show a generic "Add-ons" as title for this case.
MozReview-Commit-ID: 3pMwSiLul99
--HG--
extra : rebase_source : 3c11fe19c5cef42226a849b78d554fa846114bfa
At the moment, our crash loop counter that turns off session restoring when multiple crashes happen in a row is reset only after a successful background-foreground cycle.
Since its purpose is to break out of startup crash loops caused by the currently loaded tab that is automatically loaded after starting the app, it makes sense to also reset it if we didn't crash soon after starting up. Otherwise, if the user remains within Firefox, another crash long after starting would still count towards the crash loop counter.
Desktop already employs a similar logic for deciding whether to automatically enable safe mode or not after a crash. Therefore, we use the same amount of time (30 s) after starting Gecko for resetting the counter.
We also take the opportunity to make our logic a bit more conservative and only turn off session restoring after two successive crashes in a row (desktop uses 3 by default).
MozReview-Commit-ID: CQDutkDgmfc
--HG--
extra : rebase_source : e3100394772bcebb64610dcadfd77676119e1de1
Those settings need to be stored in our shared preferences since they're needed before Gecko is available, however in order to allow them to be easily configured, we also expose them in about:config and sync them to the shared prefs via a change listener.
This however means that changes in the *default* value of those prefs won't be picked up. Therefore we now simply unconditionally copy the setting state into the shared preferences on startup and omit the change listener instead, as they're exposed in about:config only and there is in fact no pressing need for changes there to immediately take effect.
MozReview-Commit-ID: 7c950F1nkdj
--HG--
extra : rebase_source : 4be6e5124294a71b5d214b9ab10ada4e88aee3bb
I observe that sometime it takes longer time for the UI notification changed in
try sever, and it cause the intermittent fail.
Therefore, I would like to increase a little bit time for waiting UI changed.
MozReview-Commit-ID: BnsZq3DObFa
--HG--
extra : rebase_source : 034f38799a2f9722f23bb0a2a139047d21508729
Use notification id to check whether the notification is correct is more stable than just checking the
number of system notification.
MozReview-Commit-ID: BVYdMrBsSLR
--HG--
extra : rebase_source : 9be3ca9a854c25a61bf233a24e7ed7745efacb1a
Since the robocop tests would run on super slow emulator on try, and then we
can't wait the tab's audible state change within the MAX_WAIT_MS time. It might
need more time.
So, we should check the media has been started by waiting the "Tab:MediaPlaybackChange"
event, and then to check other tab's attribute.
In addition, move the tab attribute checking independently into new functions,
so that we would clearly see that we have four things need to check in function
checkIfMediaPlayingSuccess().
- tab's media playing state
- media notification UI
- tab's audio playing state
- audio focus state
MozReview-Commit-ID: 8S0Ems23iPX
--HG--
extra : rebase_source : 9bbe525ba1dcdf8415d034ced39d9a9a4836f1e9
To make sure these functions can be used in robocop test.
MozReview-Commit-ID: KPAKOrg5Ows
--HG--
extra : rebase_source : 8ef6dd7c14e8dc0d3219aed0901793a17f945372
Add check for media notification's small icon, title and content text.
MozReview-Commit-ID: AOhag8gQVqs
--HG--
extra : rebase_source : 8ad1c7fa0e7796a0d873fba432c646846a0742d3
It's easy to know what test tasks we'll run in this test.
MozReview-Commit-ID: DdtFp4pOXlC
--HG--
extra : rebase_source : 5615d2c1169ee0f59c95ab21d3e5e2fd26c99a33
Create new test class for reducing the redundant code and can provide more
flexibility for adding new related test in the future.
MozReview-Commit-ID: 2f3O8vfHo12
--HG--
extra : rebase_source : 2b0d7a337c87afd8e844f435f7e605b881f1aa1b
Notify observer might cause the method (notifyStoppedPlaying) is called by C++ side,
and we should change our internal state before calling the method.
MozReview-Commit-ID: 5xNXhGmAIrR
--HG--
extra : rebase_source : 362f921e68d795f568816b1c0a23c0f50c5d0790
When starting up, ideally we want to only load the foreground tab, with all other tabs being created as delay-loaded "zombie" tabs that occupy minimal resources. To that extent, when restoring the previous session we need to know whether we're planning to open an additional, external tab for a URL received through the launch intent later on. If we do, we don't want to select any tab while restoring the previous session, as that selection is going to be overridden by the external tab anyway. Not selecting a tab from the previous session at this stage means that it can remain as a delay-loaded tab until it is eventually selected by the user.
MozReview-Commit-ID: 1lWnOx0ZuNl
--HG--
extra : rebase_source : 03a286ec3e1c66856d2ffb526cd4277c89b29594
MediaCodec supports async callbacks since Lollipop. Buffer polling is no longer needed.
MozReview-Commit-ID: Iov65JI86i8
--HG--
extra : rebase_source : c3b0ed330e46ee2328de4d031c96f9792895c3b5
This allows us to allocate an Android SurfaceTexture in the compositor process as well
as an accompanying Surface. We can then transfer the Surface back to the content process
via binder, where it can be used for things like WebGL and video decoding.
Each SurfaceTexture/Surface pair has a unique handle. We use this handle in
layer transactions to locate the SurfaceTexture for a given Surface and composite it
appropriately.
MozReview-Commit-ID: 68VSbXdfsMH
Video fails to play on Sony Z3C when the media server is in a state that no hardware codec can be created unless reboot. Fallback to software codec when that happens to workaround the issue.
MozReview-Commit-ID: AaRIw7KPaF3
--HG--
extra : rebase_source : d5106d5c75c4430450a81bbe9cfd536f01ef4df9
This is pretty straight-forward.
Sadly, this will require local developers to add a "skin" product
flavor to their invocations, like:
./mach gradle app:assembleLocalAustralisDebug
In addition, this shows how many different variants of the Gradle
product flavor are embedded into our automation configurations. I
can't solve that at this time.
Since I was here, I took the time to rename "automation" to
"official", which makes "localAustralis" the default in Android
Studio, avoiding a common issue with new builders producing an APK
that doesn't include omni.ja in the IDE.
MozReview-Commit-ID: CtU7zFpNCob
This is pretty straight-forward.
Sadly, this will require local developers to add a "skin" product
flavor to their invocations, like:
./mach gradle app:assembleLocalAustralisDebug
In addition, this shows how many different variants of the Gradle
product flavor are embedded into our automation configurations. I
can't solve that at this time.
Since I was here, I took the time to rename "automation" to
"official", which makes "localAustralis" the default in Android
Studio, avoiding a common issue with new builders producing an APK
that doesn't include omni.ja in the IDE.
MozReview-Commit-ID: CtU7zFpNCob
--HG--
extra : rebase_source : 477ef683f850ff11cfa128e17855666bb7758a7a
For static final fields, generate a getter instead of a literal when
specified. Used to generate bindings for runtime constants whose values
are unknown at compile time.
The Java Addons mechanism never got traction and is not Web Extensions
compatible. Removing it simplifies the product and the build system.
MozReview-Commit-ID: ABUxkqqMISa
--HG--
extra : rebase_source : 346f88882774f072316714cf637a54d771d81a9a
This will avoid conflicts with the ActivityStream helper class.
MozReview-Commit-ID: 5XNmwz4UwJo
--HG--
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/ActivityStream.java => mobile/android/base/java/org/mozilla/gecko/home/activitystream/ActivityStreamPanel.java
extra : rebase_source : 23000ae152f776de874053c712fb6e1a4b1ab546
To make sure these functions can be used in robocop test.
MozReview-Commit-ID: KPAKOrg5Ows
--HG--
extra : rebase_source : 13632cef16c96457ce77c01bc4330a9793ab83ad
Add check for media notification's small icon, title and content text.
MozReview-Commit-ID: AOhag8gQVqs
--HG--
extra : rebase_source : 2be27f95b2bc48b998734d8e702fc084b5b93683
It's easy to know what test tasks we'll run in this test.
MozReview-Commit-ID: DdtFp4pOXlC
--HG--
extra : rebase_source : 9c986e6104528cb66cc6ca3b468fe49031e637db
Create new test class for reducing the redundant code and can provide more
flexibility for adding new related test in the future.
MozReview-Commit-ID: 2f3O8vfHo12
--HG--
extra : rebase_source : 02e081dbac6e91bcac92bea1dbfc5abf07293e40
Notify observer might cause the method (notifyStoppedPlaying) is called by C++ side,
and we should change our internal state before calling the method.
MozReview-Commit-ID: 5xNXhGmAIrR
--HG--
extra : rebase_source : 23fb8bef4066cad5238f49bb692445d9b684a84e
Otherwise random stuff handled by GeckoApp (e.g. snack bars) won't work inside a WebAppActivity.
MozReview-Commit-ID: ElGOPQcqFJS
--HG--
extra : rebase_source : 71fe7c966513772701cd792c0bec1211c0d9e5e6
When there's no more history to go back in an externally opened tab, we background the activity and close that tab. This means that some other tab gets selected instead, which could in theory trigger an activity switch if that tab is of a different type.
Because we're leaving the app, we don't want to actually launch a new activity, so now the currently selected tab might not match the last active GeckoApp (e.g. closing the last open Web App tab will select a normal tab). Therefore if the same activity is subsequently resumed again, we need to run the restoreLastSelectedTab() even if the "last active GeckoApp"-check doesn't trigger.
For BrowserApp however, this can conflict with session restoring/startup tabs/tabs opened from intents, because in that case we're going to select some other tab, anyway. We already ignore the "last selected tab within this activity" check when doing a full startup, so now we extend this behaviour to cover tabs loaded through onNewIntent() as well.
MozReview-Commit-ID: IDistdhwuZ5
--HG--
extra : rebase_source : d5404326e2cd4ce44a14340883dd338d14a18c05
Looking again, the original motivation for *not* calling finish(), i.e. avoiding Gecko being unloaded from memory, doesn't quite seem to apply and in any case for custom tabs we *have* to finish() the activity, since we're most probably running within another activity's task.
There's also no point in overriding onDone() in SingleTabActivity any more if
- we just do the same thing as GeckoApp's default behaviour, and
- custom tabs now require a different behaviour anyway.
MozReview-Commit-ID: BsP1tMj5DEe
--HG--
extra : rebase_source : bd3dc71ec1a5d4dcbf83e6c00630e0d8ab04f611
I encountered crashes in jitted regexp code in my AArch64 Fennec build.
This patch disables that for now, but obviously we want to look into the
crashes and eventually turn this back on.
Update tooltool manifests for official builds to use repacks
of the upstream rustc 1.17.0 (56124baa9 2017-04-24) stable release.
These repacks include cargo 0.19.0-beta.1 (03efb7fc8 2017-04-23)
to include support for the RUSTC_WRAPPER environment variable
needed for use of sccache with rust code.
MozReview-Commit-ID: L9Nq2iK4GK8
--HG--
extra : rebase_source : 882b201282a0e13ed77ec5876972657eab81a562
Add two tests to testInputConnection that record the sequence of
composition events during editing, and check that the sequence is what
we expected.
The first test makes sure that we reuse the current composition on the
Gecko side when setting composing text; otherwise the Facebook comment
box behaves incorrectly.
The second test makes sure that we can move the cursor inside the
current composition, to fix this particular bug.
* Include the type of the editor (input, textarea, contentEditable,
designMode) in BasicInputConnectionTest, so we can work around the
differences in behavior among the different editor types.
* Add timestamps to key events, because lack of timestamps was
triggering a crash when running testInputConnection.
Update the composition when setting/removing spans, so that we update
the selection/cursor during a composition. However, we must limit any
updating to the current composition only (as indicated by the
keep-current-composition flag), because the Facebook comment box behaves
incorrectly if we repeatedly start and end new compositions.