After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 695437 - Several ephy-session tests disabled due to issue opening a session with 2 tabs with the same about: URI
Several ephy-session tests disabled due to issue opening a session with 2 tab...
Status: RESOLVED OBSOLETE
Product: epiphany
Classification: Core
Component: Backend
git master
Other Linux
: Normal normal
: ---
Assigned To: Xan Lopez
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-08 12:06 UTC by Manuel Rego Casasnovas
Modified: 2018-08-03 19:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (2.34 KB, patch)
2013-03-19 08:36 UTC, Manuel Rego Casasnovas
reviewed Details | Review

Description Manuel Rego Casasnovas 2013-03-08 12:06:23 UTC
Steps to reproduce in Epiphany with WK2:
1) Disable delay loading
2) Open Epiphany with 2 tabs with "about:epiphany" as URI
3) Colse Epiphany
4) Re-open Epiphany and one of the tabs will be loading forever

This was detected while debugging problem in session tests with WK2 (bug #695300).

The problem is that if you're connected to "load-changed" signal of the 2 web views. Both views emit the signal with WEBKIT_LOAD_STARTED, however only one of them emit it with WEBKIT_LOAD_COMMITTED. So one view seems to be loading forever. Moreover, the view didn't emit "load-failed" either, so it keeps loading forever.

It might be a WK bug, but reporting it here to track it down.
Comment 1 Manuel Rego Casasnovas 2013-03-11 12:03:23 UTC
I've tried to reproduce it in WebKit using a unit test (Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebContext.cpp) without success so far.

In my test I was creating 2 WebKitWebViews and use webkit_web_view_load_uri to load "foo:blank" in both views. Then I connected to the "load-changed" signal and both views finish to load properly.
Comment 2 Manuel Rego Casasnovas 2013-03-12 10:32:36 UTC
I've tried to reproduce it in the ephy-web-view-test.c without success either, so maybe it's a specific bug in sessions code, not sure though.

The code example that works for me is the following:

static guint web_view_ready_counter = 0;

static void
load_changed_same_about_uri_cb (WebKitWebView *web_view,
#ifdef HAVE_WEBKIT2
                 WebKitLoadEvent status,
#else
                 GParamSpec *pspec,
#endif
                 GMainLoop *loop)
{
#ifndef HAVE_WEBKIT2
  WebKitLoadStatus status = webkit_web_view_get_load_status (web_view);
#endif

  if (status == WEBKIT_LOAD_FINISHED) {
    web_view_ready_counter--;
    g_signal_handlers_disconnect_by_func (web_view, load_changed_cb, loop);

    if (web_view_ready_counter == 0)
      g_main_loop_quit (loop);
  }

}

static void
wait_until_load_is_finished (WebKitWebView *web_view, GMainLoop *loop)
{
#ifdef HAVE_WEBKIT2
  g_signal_connect (web_view, "load-changed", G_CALLBACK (load_changed_same_about_uri_cb), loop);
#else
  g_signal_connect (web_view, "notify::load-status", G_CALLBACK (load_changed_same_about_uri_cb), loop);
#endif
}

static void
test_ephy_web_view_load_two_views_same_about_uri (void)
{
  EphyWebView *view1, *view2;
  GMainLoop *loop;
  const char *uri;

  view1 = EPHY_WEB_VIEW (ephy_web_view_new ());
  view2 = EPHY_WEB_VIEW (ephy_web_view_new ());
  loop = g_main_loop_new (NULL, FALSE);
  uri = "about:epiphany";

  web_view_ready_counter = 2;

  wait_until_load_is_finished (WEBKIT_WEB_VIEW (view1), loop);
  wait_until_load_is_finished (WEBKIT_WEB_VIEW (view2), loop);

  ephy_web_view_load_url (view1, uri);
  ephy_web_view_load_url (view2, uri);

  if (web_view_ready_counter != 0)
    g_main_loop_run (loop);

  g_main_loop_unref (loop);
  g_object_unref (g_object_ref_sink (view1));
  g_object_unref (g_object_ref_sink (view2));
}
Comment 3 Manuel Rego Casasnovas 2013-03-15 10:38:16 UTC
This issue could be related to bug #695733 (I'm not sure yet). So, once WK2 bug is fixed (https://bugs.webkit.org/show_bug.cgi?id=112418) we should test this again.
Comment 4 Manuel Rego Casasnovas 2013-03-18 11:27:46 UTC
With the current patch for the WebKit bug (http://webkit.org/b/112418) the issue is still present.

Anyway, it doesn't seem an Epiphany issue as I've been able to reproduce it with MiniBrowser and a unit test in WebKit, so I've reported a different bug in WebKit with the information: http://webkit.org/b/112557
Comment 5 Manuel Rego Casasnovas 2013-03-19 08:36:17 UTC
Created attachment 239225 [details] [review]
Patch

Even when this is a WebKit issue, once the WK bug (http://webkit.org/b/112557) is solved we should apply this patch to re-enable some session tests. That's the reason why I've reopened it.
Comment 6 Michael Catanzaro 2015-06-16 12:59:04 UTC
Comment on attachment 239225 [details] [review]
Patch

Removing from unreviewed patches list, since this is blocked on a WebKit bug
Comment 7 Michael Catanzaro 2016-02-28 16:39:31 UTC
I can't reproduce this anymore, even with restore-session-delaying-loads disabled.
Comment 8 GNOME Infrastructure Team 2018-08-03 19:50:26 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/epiphany/issues/190.