Skip to content

Commit

Permalink
Merge r181159 - [GTK] Test /webkit2/WebKitWebView/sync-request-on-max…
Browse files Browse the repository at this point in the history
…-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):
  • Loading branch information
carlosgcampos committed Mar 8, 2015
1 parent 258f85b commit 9179d94
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
14 changes: 14 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,17 @@
2015-03-06 Carlos Garcia Campos <cgarcia@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-05 Chris Dumez <cdumez@apple.com>

Regression(r173761): ASSERTION FAILED: !is8Bit() in StringImpl::characters16()
Expand Down
6 changes: 4 additions & 2 deletions Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp
Expand Up @@ -706,9 +706,11 @@ static void testWebViewSyncRequestOnMaxConns(SyncRequestOnMaxConnsTest* test, gc
}

// 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.
}

Expand Down

0 comments on commit 9179d94

Please sign in to comment.