Changeset 181159 in webkit


Ignore:
Timestamp:
Mar 6, 2015 9:21:11 AM (9 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Test /webkit2/WebKitWebView/sync-request-on-max-conns might fail after finished
https://bugs.webkit.org/show_bug.cgi?id=142385

Reviewed by Sergio Villar Senin.

Use stack allocated GMainLoopSources to make sure they are
cancelled automatically if the test finishes before they have
been processed.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:

(testWebViewSyncRequestOnMaxConns):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r181149 r181159  
     12015-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Test /webkit2/WebKitWebView/sync-request-on-max-conns might fail after finished
     4        https://bugs.webkit.org/show_bug.cgi?id=142385
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        Use stack allocated GMainLoopSources to make sure they are
     9        cancelled automatically if the test finishes before they have
     10        been processed.
     11
     12        * TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
     13        (testWebViewSyncRequestOnMaxConns):
     14
    1152015-03-06  Csaba Osztrogonác  <ossy@webkit.org>
    216
  • trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp

    r181075 r181159  
    707707
    708708    // By default sync XHRs have a 10 seconds timeout, we don't want to wait all that so use our own timeout.
    709     GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy("Timeout", [] { g_assert_not_reached(); }, std::chrono::seconds(1));
    710 
    711     GMainLoopSource::scheduleAndDeleteOnDestroy("Unlock Server Idle", [&lock] { lock.unlock(); });
     709    GMainLoopSource timeoutSource;
     710    timeoutSource.scheduleAfterDelay("Timeout", [] { g_assert_not_reached(); }, std::chrono::seconds(1));
     711
     712    GMainLoopSource unlockServerSource;
     713    unlockServerSource.schedule("Unlock Server Idle", [&lock] { lock.unlock(); });
    712714    test->waitUntilResourcesLoaded(s_maxConnectionsPerHost + 3); // s_maxConnectionsPerHost resource + main resource + 2 XHR.
    713715}
Note: See TracChangeset for help on using the changeset viewer.