Title: [181159] trunk/Tools
Revision
181159
Author
carlo...@webkit.org
Date
2015-03-06 09:21:11 -0800 (Fri, 06 Mar 2015)

Log 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):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (181158 => 181159)


--- trunk/Tools/ChangeLog	2015-03-06 17:06:56 UTC (rev 181158)
+++ trunk/Tools/ChangeLog	2015-03-06 17:21:11 UTC (rev 181159)
@@ -1,3 +1,17 @@
+2015-03-06  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [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):
+
 2015-03-06  Csaba Osztrogonác  <o...@webkit.org>
 
         Remove Mountain Lion libraries since ML isn't supported

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp (181158 => 181159)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp	2015-03-06 17:06:56 UTC (rev 181158)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp	2015-03-06 17:21:11 UTC (rev 181159)
@@ -706,9 +706,11 @@
     }
 
     // By default sync XHRs have a 10 seconds timeout, we don't want to wait all that so use our own timeout.
-    GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy("Timeout", [] { g_assert_not_reached(); }, std::chrono::seconds(1));
+    GMainLoopSource timeoutSource;
+    timeoutSource.scheduleAfterDelay("Timeout", [] { g_assert_not_reached(); }, std::chrono::seconds(1));
 
-    GMainLoopSource::scheduleAndDeleteOnDestroy("Unlock Server Idle", [&lock] { lock.unlock(); });
+    GMainLoopSource unlockServerSource;
+    unlockServerSource.schedule("Unlock Server Idle", [&lock] { lock.unlock(); });
     test->waitUntilResourcesLoaded(s_maxConnectionsPerHost + 3); // s_maxConnectionsPerHost resource + main resource + 2 XHR.
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to