Title: [153085] trunk
Revision
153085
Author
[email protected]
Date
2013-07-24 08:27:25 -0700 (Wed, 24 Jul 2013)

Log Message

[GTK] TestInspectorServer unit test is timing out
https://bugs.webkit.org/show_bug.cgi?id=105866

Patch by Anton Obzhirov <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (153084 => 153085)


--- trunk/Source/WebKit2/ChangeLog	2013-07-24 14:53:31 UTC (rev 153084)
+++ trunk/Source/WebKit2/ChangeLog	2013-07-24 15:27:25 UTC (rev 153085)
@@ -1,3 +1,25 @@
+2013-07-24  Anton Obzhirov  <[email protected]>
+
+        [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  <[email protected]>
 
         10.7: Java applets do not work due to sandbox violation/exception

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am (153084 => 153085)


--- trunk/Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am	2013-07-24 14:53:31 UTC (rev 153084)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am	2013-07-24 15:27:25 UTC (rev 153085)
@@ -70,9 +70,18 @@
 	$(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 = \
 	Source/WebKit2/UIProcess/API/gtk/tests/LoadTrackingTest.cpp \

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp (153084 => 153085)


--- trunk/Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp	2013-07-24 14:53:31 UTC (rev 153084)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/tests/InspectorTestServer.cpp	2013-07-24 15:27:25 UTC (rev 153085)
@@ -40,6 +40,10 @@
 
     // 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);

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp (153084 => 153085)


--- trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp	2013-07-24 14:53:31 UTC (rev 153084)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestInspectorServer.cpp	2013-07-24 15:27:25 UTC (rev 153085)
@@ -184,7 +184,7 @@
     g_assert(_javascript_Result);
     g_assert(!error.get());
     valueString.set(WebViewTest::_javascript_ResultToCString(_javascript_Result));
-    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());
 }
 

Modified: trunk/Source/WebKit2/UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp (153084 => 153085)


--- trunk/Source/WebKit2/UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp	2013-07-24 14:53:31 UTC (rev 153084)
+++ trunk/Source/WebKit2/UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp	2013-07-24 15:27:25 UTC (rev 153085)
@@ -48,7 +48,7 @@
     }
 
     // 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 @@
         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 @@
     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;
 }

Modified: trunk/Tools/ChangeLog (153084 => 153085)


--- trunk/Tools/ChangeLog	2013-07-24 14:53:31 UTC (rev 153084)
+++ trunk/Tools/ChangeLog	2013-07-24 15:27:25 UTC (rev 153085)
@@ -1,5 +1,15 @@
 2013-07-24  Anton Obzhirov  <[email protected]>
 
+        [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  <[email protected]>
+
         [GTK] [WK2] Handle wheel event with delta zero
         https://bugs.webkit.org/show_bug.cgi?id=118973
 

Modified: trunk/Tools/Scripts/run-gtk-tests (153084 => 153085)


--- trunk/Tools/Scripts/run-gtk-tests	2013-07-24 14:53:31 UTC (rev 153084)
+++ trunk/Tools/Scripts/run-gtk-tests	2013-07-24 15:27:25 UTC (rev 153085)
@@ -67,7 +67,6 @@
         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),
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to