Backed out 2 changesets (bug 1550877, bug 1552328) for causing perma geckoview-junit failures on contentPortDisconnectFromApp
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Fri, 17 May 2019 10:50:50 +0300
changeset 533120 55e45fc9d529196284843ed9a192e19edda6515c
parent 533119 a68c01cb895d83dea76e8dc74336aa2440ba6fc9
child 533121 057ee1d004ccdcc2f88d333824bc69080352914a
push id11276
push userrgurzau@mozilla.com
push dateMon, 20 May 2019 13:11:24 +0000
treeherdermozilla-beta@847755a7c325 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1550877, 1552328
milestone68.0a1
backs out877ae9359a2774f9ccee1f68935b4e7194a5711e
aee7bbc03bff773a8ce895d0bd58174f2f8aafa1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1550877, bug 1552328) for causing perma geckoview-junit failures on contentPortDisconnectFromApp Backed out changeset 877ae9359a27 (bug 1550877) Backed out changeset aee7bbc03bff (bug 1552328)
mobile/android/geckoview/src/androidTest/assets/web_extensions/extension-page-update/background-script.js
mobile/android/geckoview/src/androidTest/assets/web_extensions/extension-page-update/manifest.json
mobile/android/geckoview/src/androidTest/assets/web_extensions/extension-page-update/tab.html
mobile/android/geckoview/src/androidTest/assets/web_extensions/extension-page-update/tabs.js
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/WebExtensionTest.kt
mobile/android/modules/geckoview/GeckoViewNavigation.jsm
mobile/android/modules/geckoview/GeckoViewProgress.jsm
deleted file mode 100644
--- a/mobile/android/geckoview/src/androidTest/assets/web_extensions/extension-page-update/background-script.js
+++ /dev/null
@@ -1,7 +0,0 @@
-browser.runtime.onMessage.addListener(notify);
-
-function notify(message) {
-  if (message.action == "showTab") {
-    browser.tabs.update({url: "/tab.html"});
-  }
-}
deleted file mode 100644
--- a/mobile/android/geckoview/src/androidTest/assets/web_extensions/extension-page-update/manifest.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "manifest_version": 2,
-  "name": "Mozilla Android Components - Tabs Update Test",
-  "version": "1.0",
-  "background": {
-    "scripts": ["background-script.js"]
-  },
-  "content_scripts": [
-    {
-      "matches": ["*://*.example.com/*"],
-      "js": ["tabs.js"],
-      "run_at": "document_idle"
-    }
-  ],
-  "web_accessible_resources": [
-    "tab.html"
-  ],
-  "permissions": [
-    "geckoViewAddons",
-    "nativeMessaging",
-    "tabs",
-    "<all_urls>"
-  ]
-}
deleted file mode 100644
--- a/mobile/android/geckoview/src/androidTest/assets/web_extensions/extension-page-update/tab.html
+++ /dev/null
@@ -1,1 +0,0 @@
-<h1>Hello World!</h1>
\ No newline at end of file
deleted file mode 100644
--- a/mobile/android/geckoview/src/androidTest/assets/web_extensions/extension-page-update/tabs.js
+++ /dev/null
@@ -1,1 +0,0 @@
-browser.runtime.sendMessage({"action": "showTab"});
--- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/WebExtensionTest.kt
+++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/WebExtensionTest.kt
@@ -4,28 +4,25 @@
 
 package org.mozilla.geckoview.test
 
 import android.support.test.InstrumentationRegistry
 import org.mozilla.geckoview.test.rule.GeckoSessionTestRule.ReuseSession
 
 import android.support.test.filters.MediumTest
 import android.support.test.runner.AndroidJUnit4
-import org.hamcrest.core.StringEndsWith.endsWith
 import org.hamcrest.core.IsEqual.equalTo
 import org.json.JSONObject
 import org.junit.Assert
 import org.junit.Assert.assertTrue
 import org.junit.Assert.fail
 import org.junit.Test
 import org.junit.runner.RunWith
 import org.mozilla.geckoview.*
-import org.mozilla.geckoview.test.rule.GeckoSessionTestRule
 import org.mozilla.geckoview.test.rule.GeckoSessionTestRule.WithDevToolsAPI
-import org.mozilla.geckoview.test.util.Callbacks
 import org.mozilla.geckoview.test.util.HttpBin
 import java.net.URI
 
 import java.util.UUID
 
 @RunWith(AndroidJUnit4::class)
 @MediumTest
 @ReuseSession(false)
@@ -459,59 +456,16 @@ class WebExtensionTest : BaseSessionTest
             sessionRule.waitForPageStop()
             testIframeTopLevel()
         } finally {
             httpBin.stop()
         }
     }
 
     @Test
-    fun loadWebExtensionPage() {
-        val extension = WebExtension("resource://android/assets/web_extensions/extension-page-update/")
-        sessionRule.waitForResult(sessionRule.runtime.registerWebExtension(extension))
-
-        mainSession.loadUri("http://example.com");
-
-        mainSession.waitUntilCalled(object : Callbacks.NavigationDelegate, Callbacks.ProgressDelegate {
-            @GeckoSessionTestRule.AssertCalled(count = 1)
-            override fun onLocationChange(session: GeckoSession, url: String?) {
-                assertThat("Url should load example.com first",
-                        url, equalTo("http://example.com/"))
-            }
-
-            @GeckoSessionTestRule.AssertCalled(count = 1)
-            override fun onPageStop(session: GeckoSession, success: Boolean) {
-                assertThat("Page should load successfully.",
-                        success, equalTo(true))
-            }
-        })
-
-
-        var page: String? = null
-        var pageStop = GeckoResult<Boolean>()
-
-        mainSession.delegateUntilTestEnd(object : Callbacks.NavigationDelegate, Callbacks.ProgressDelegate {
-            override fun onLocationChange(session: GeckoSession, url: String?) {
-                page = url
-            }
-
-            override fun onPageStop(session: GeckoSession, success: Boolean) {
-                if (success && page != null && page!!.endsWith("/tab.html")) {
-                    pageStop.complete(true)
-                }
-            }
-        })
-
-        // Make sure the page loaded successfully
-        sessionRule.waitForResult(pageStop)
-
-        assertThat("Url should load WebExtension page", page, endsWith("/tab.html"))
-    }
-
-    @Test
     fun badFileType() {
         testRegisterError("resource://android/bad/location/error",
                 "does not point to a folder or an .xpi")
     }
 
     @Test
     fun badLocationXpi() {
         testRegisterError("resource://android/bad/location/error.xpi",
--- a/mobile/android/modules/geckoview/GeckoViewNavigation.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewNavigation.jsm
@@ -5,17 +5,17 @@
 "use strict";
 
 var EXPORTED_SYMBOLS = ["GeckoViewNavigation"];
 
 const {GeckoViewModule} = ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm");
 const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
-  E10SUtils: "resource://gre/modules/E10SUtils.jsm",
+  E10SUtils: "resource://gre/modules/sessionstore/Utils.jsm",
   LoadURIDelegate: "resource://gre/modules/LoadURIDelegate.jsm",
   Services: "resource://gre/modules/Services.jsm",
 });
 
 XPCOMUtils.defineLazyGetter(this, "ReferrerInfo", () =>
   Components.Constructor(
     "@mozilla.org/referrer-info;1",
     "nsIReferrerInfo",
--- a/mobile/android/modules/geckoview/GeckoViewProgress.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewProgress.jsm
@@ -164,17 +164,16 @@ class GeckoViewProgress extends GeckoVie
     debug `onDisable`;
 
     if (this.progressFilter) {
       this.progressFilter.removeProgressListener(this);
       this.browser.removeProgressListener(this.progressFilter);
     }
 
     Services.obs.removeObserver(this, "oop-frameloader-crashed");
-    this.unregisterListener("GeckoView:FlushSessionState");
   }
 
   onEvent(aEvent, aData, aCallback) {
     debug `onEvent: event=${aEvent}, data=${aData}`;
 
     switch (aEvent) {
       case "GeckoView:FlushSessionState":
         this.messageManager.sendAsyncMessage("GeckoView:FlushSessionState");