[GTK] TestInspectorServer unit test is timing out

https://bugs.webkit.org/show_bug.cgi?id=105866

Patch by Anton Obzhirov <a.obzhirov@samsung.com> on 2013-07-24
Reviewed by Gustavo Noronha Silva.

Source/WebKit2:

The test failed because it couldn't find inspector resources in default folder
(make install step was missing). It uses now resources available in
WebKitBuild folder. WebInspectorServerGtk was refactored as well to make
easier to use WEBKIT_INSPECTOR_SERVER_PATH variable.

* UIProcess/API/gtk/tests/GNUmakefile.am:
* UIProcess/API/gtk/tests/InspectorTestServer.cpp:
(main):
* UIProcess/API/gtk/tests/TestInspectorServer.cpp:
(testInspectorServerPageList):
* UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
(WebKit::WebInspectorServer::platformResourceForPath):
(WebKit::WebInspectorServer::buildPageList):
(WebKit::WebInspectorServer::inspectorServerFilesPath):

Tools:

* Scripts/run-gtk-tests:
(TestRunner):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 84d6b230
2013-07-24 Anton Obzhirov <a.obzhirov@samsung.com>
[GTK] TestInspectorServer unit test is timing out
https://bugs.webkit.org/show_bug.cgi?id=105866
Reviewed by Gustavo Noronha Silva.
The test failed because it couldn't find inspector resources in default folder
(make install step was missing). It uses now resources available in
WebKitBuild folder. WebInspectorServerGtk was refactored as well to make
easier to use WEBKIT_INSPECTOR_SERVER_PATH variable.
* UIProcess/API/gtk/tests/GNUmakefile.am:
* UIProcess/API/gtk/tests/InspectorTestServer.cpp:
(main):
* UIProcess/API/gtk/tests/TestInspectorServer.cpp:
(testInspectorServerPageList):
* UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
(WebKit::WebInspectorServer::platformResourceForPath):
(WebKit::WebInspectorServer::buildPageList):
(WebKit::WebInspectorServer::inspectorServerFilesPath):
2013-07-23 Simon Cooper <scooper@apple.com>
10.7: Java applets do not work due to sandbox violation/exception
......
......@@ -70,8 +70,17 @@ Programs/resources/webkit2gtk-tests-resources.gresource: Source/WebKit2/UIProces
$(AM_V_at)mkdir -p ${GENPROGRAMS}/resources
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) $<
DISTCLEANFILES += Programs/resources/webkit2gtk-tests-resources.gresource
noinst_DATA += Programs/resources/webkit2gtk-tests-resources.gresource
Programs/resources/inspector/inspectorPageIndex.html: Source/WebKit2/UIProcess/InspectorServer/front-end/inspectorPageIndex.html
$(AM_V_at)mkdir -p ${GENPROGRAMS}/resources/inspector
$(AM_V_GEN)cp $(srcdir)/Source/WebKit2/UIProcess/InspectorServer/front-end/inspectorPageIndex.html ${GENPROGRAMS}/resources/inspector
DISTCLEANFILES += \
Programs/resources/webkit2gtk-tests-resources.gresource \
Programs/resources/inspector/inspectorPageIndex.html
noinst_DATA += \
Programs/resources/webkit2gtk-tests-resources.gresource \
Programs/resources/inspector/inspectorPageIndex.html
noinst_LTLIBRARIES += Libraries/libWebKit2APITestCore.la
Libraries_libWebKit2APITestCore_la_SOURCES = \
......
......@@ -40,6 +40,10 @@ int main(int argc, char** argv)
// Overwrite WEBKIT_INSPECTOR_SERVER variable with default value.
g_setenv("WEBKIT_INSPECTOR_SERVER", "127.0.0.1:2999", TRUE);
// Overwrite WEBKIT_INSPECTOR_SERVER_PATH variable to point to inspector resources folder.
const gchar* inspectorResourcesPath = g_getenv("WEBKIT_INSPECTOR_PATH");
g_setenv("WEBKIT_INSPECTOR_SERVER_PATH", inspectorResourcesPath, TRUE);
WebKitWebView* webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
webkit_settings_set_enable_developer_extras(webkit_web_view_get_settings(webView), TRUE);
......
......@@ -184,7 +184,7 @@ static void testInspectorServerPageList(InspectorServerTest* test, gconstpointer
g_assert(javascriptResult);
g_assert(!error.get());
valueString.set(WebViewTest::javascriptResultToCString(javascriptResult));
String validInspectorURL = String("/webinspector/inspector.html?page=") + String::number(pageId);
String validInspectorURL = String("/inspector.html?page=") + String::number(pageId);
ASSERT_CMP_CSTRING(valueString.get(), ==, validInspectorURL.utf8());
}
......
......@@ -48,7 +48,7 @@ bool WebInspectorServer::platformResourceForPath(const String& path, Vector<char
}
// Point the default path to a formatted page that queries the page list and display them.
CString localPath = WebCore::fileSystemRepresentation(inspectorServerFilesPath() + ((path == "/") ? "/webinspector/inspectorPageIndex.html" : path));
CString localPath = WebCore::fileSystemRepresentation(inspectorServerFilesPath() + ((path == "/") ? "/inspectorPageIndex.html" : path));
if (localPath.isNull())
return false;
......@@ -97,7 +97,7 @@ void WebInspectorServer::buildPageList(Vector<char>& data, String& contentType)
builder.appendLiteral("\", \"url\": \"");
builder.append(webPage->activeURL());
builder.appendLiteral("\", \"inspectorUrl\": \"");
builder.appendLiteral("/webinspector/inspector.html?page=");
builder.appendLiteral("/inspector.html?page=");
builder.appendNumber(it->key);
builder.appendLiteral("\" }");
}
......@@ -116,7 +116,7 @@ String WebInspectorServer::inspectorServerFilesPath()
if (environmentPath && g_file_test(environmentPath, G_FILE_TEST_IS_DIR))
m_inspectorServerFilesPath = String(environmentPath);
else
m_inspectorServerFilesPath = String(WebCore::sharedResourcesPath().data());
m_inspectorServerFilesPath = String(WebCore::sharedResourcesPath().data()) + "/webinspector";
return m_inspectorServerFilesPath;
}
......
2013-07-24 Anton Obzhirov <a.obzhirov@samsung.com>
[GTK] TestInspectorServer unit test is timing out
https://bugs.webkit.org/show_bug.cgi?id=105866
Reviewed by Gustavo Noronha Silva.
* Scripts/run-gtk-tests:
(TestRunner):
2013-07-24 Anton Obzhirov <a.obzhirov@samsung.com>
[GTK] [WK2] Handle wheel event with delta zero
......
......@@ -67,7 +67,6 @@ class TestRunner:
SkippedTest("unittests/testwebresource", "/webkit/webresource/sub_resource_loading", "Test fails in GTK Linux 64-bit Release bot", 82330),
SkippedTest("unittests/testwebview", "/webkit/webview/icon-uri", "Test times out in GTK Linux 64-bit Release bot", 82328),
SkippedTest("unittests/testatk", "/webkit/atk/getTextInParagraphAndBodyModerate", "Test fails", 105538),
SkippedTest("WebKit2APITests/TestInspectorServer", SkippedTest.ENTIRE_SUITE, "Test times out", 105866),
SkippedTest("WebKit2APITests/TestResources", "/webkit2/WebKitWebView/resources", "Test is flaky in GTK Linux 32-bit Release bot", 82868),
SkippedTest("WebKit2APITests/TestWebKitAccessibility", "/webkit2/WebKitAccessibility/atspi-basic-hierarchy", "Test fails", 100408),
SkippedTest("WebKit2APITests/TestWebKitWebView", SkippedTest.ENTIRE_SUITE, "Test times out after r150890", 117689),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment