mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-02 03:40:16 +00:00
For #1525: Make BrowserPerformanceTestActivity pass through to IntentReceiverActivity.
Previously, this passed through to HomeActivity, but Intent arguments were dropped. That means that actions (`-a android.intent.action.VIEW`) and URLs (`-d data:...`) were dropped, which means that Gecko itself wasn't started (and wasn't started with a session owned by Fenix itself). This simply passes through the intent to its final destination. Along the way, I also enabled remote debugging for these test configurations; it's probably not necessary, but eventually I want all automation to be controlled by that setting. See [Bug 1524673](https://bugzilla.mozilla.org/show_bug.cgi?id=1524673) for some of the motivation. This agrees with Chrome, and should generalize to future remote control protocols.
This commit is contained in:
parent
6ed0c26dd5
commit
d4d1e6bd5f
@ -8,7 +8,7 @@ import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import mozilla.components.support.utils.SafeIntent
|
||||
import org.mozilla.fenix.HomeActivity
|
||||
import org.mozilla.fenix.IntentReceiverActivity
|
||||
import org.mozilla.fenix.ext.components
|
||||
|
||||
/**
|
||||
@ -22,6 +22,12 @@ class BrowserPerformanceTestActivity : Activity() {
|
||||
|
||||
components.core.testConfig = SafeIntent(intent).extras
|
||||
|
||||
startActivity(Intent(this, HomeActivity::class.java))
|
||||
val intent = Intent(intent)
|
||||
|
||||
intent.setClassName(applicationContext, IntentReceiverActivity::class.java.name)
|
||||
|
||||
startActivity(intent)
|
||||
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ class Core(private val context: Context) {
|
||||
|
||||
testConfig?.let {
|
||||
builder.extras(it)
|
||||
.remoteDebuggingEnabled(true)
|
||||
}
|
||||
|
||||
val runtimeSettings = builder
|
||||
|
Loading…
Reference in New Issue
Block a user