Diff
Modified: trunk/Tools/ChangeLog (216218 => 216219)
--- trunk/Tools/ChangeLog 2017-05-04 23:37:52 UTC (rev 216218)
+++ trunk/Tools/ChangeLog 2017-05-05 00:06:50 UTC (rev 216219)
@@ -1,3 +1,26 @@
+2017-05-04 Said Abou-Hallawa <[email protected]>
+
+ Add testRunner.display() to force displaying the web page for testing
+ https://bugs.webkit.org/show_bug.cgi?id=171694
+
+ Reviewed by Simon Fraser.
+
+ Unlike testRunner.displayAndTrackRepaints(), this new function forces
+ drawing the web page but without track repaints.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (displayCallback):
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ (TestRunner::display):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ (TestRunner::display):
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::display):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+
2017-05-04 Mark Lam <[email protected]>
NeverDestroyed<String>(ASCIILiteral(...)) is not thread safe.
Modified: trunk/Tools/DumpRenderTree/TestRunner.cpp (216218 => 216219)
--- trunk/Tools/DumpRenderTree/TestRunner.cpp 2017-05-04 23:37:52 UTC (rev 216218)
+++ trunk/Tools/DumpRenderTree/TestRunner.cpp 2017-05-05 00:06:50 UTC (rev 216219)
@@ -514,6 +514,15 @@
return JSValueMakeUndefined(context);
}
+static JSValueRef displayCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
+ controller->display();
+
+ return JSValueMakeUndefined(context);
+}
+
static JSValueRef displayAndTrackRepaintsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Has mac & windows implementation
@@ -2100,6 +2109,7 @@
{ "decodeHostName", decodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "disallowIncreaseForApplicationCacheQuota", disallowIncreaseForApplicationCacheQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "dispatchPendingLoadRequests", dispatchPendingLoadRequestsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "display", displayCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "displayAndTrackRepaints", displayAndTrackRepaintsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "dumpApplicationCacheDelegateCallbacks", dumpApplicationCacheDelegateCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "dumpAsText", dumpAsTextCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
Modified: trunk/Tools/DumpRenderTree/TestRunner.h (216218 => 216219)
--- trunk/Tools/DumpRenderTree/TestRunner.h 2017-05-04 23:37:52 UTC (rev 216218)
+++ trunk/Tools/DumpRenderTree/TestRunner.h 2017-05-05 00:06:50 UTC (rev 216219)
@@ -69,6 +69,7 @@
JSStringRef copyDecodedHostName(JSStringRef name);
JSStringRef copyEncodedHostName(JSStringRef name);
void dispatchPendingLoadRequests();
+ void display();
void displayAndTrackRepaints();
void execCommand(JSStringRef name, JSStringRef value);
bool findString(JSContextRef, JSStringRef, JSObjectRef optionsArray);
Modified: trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm (216218 => 216219)
--- trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm 2017-05-04 23:37:52 UTC (rev 216218)
+++ trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm 2017-05-05 00:06:50 UTC (rev 216219)
@@ -250,6 +250,11 @@
return JSStringCreateWithCFString((CFStringRef)[nameNS _web_encodeHostName]);
}
+void TestRunner::display()
+{
+ displayWebView();
+}
+
void TestRunner::displayAndTrackRepaints()
{
displayAndTrackRepaintsWebView();
Modified: trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp (216218 => 216219)
--- trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp 2017-05-04 23:37:52 UTC (rev 216218)
+++ trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp 2017-05-05 00:06:50 UTC (rev 216219)
@@ -224,6 +224,11 @@
return 0;
}
+void TestRunner::display()
+{
+ displayWebView();
+}
+
void TestRunner::displayAndTrackRepaints()
{
displayWebView();
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (216218 => 216219)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2017-05-04 23:37:52 UTC (rev 216218)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2017-05-05 00:06:50 UTC (rev 216219)
@@ -98,6 +98,7 @@
// Repaint testing.
void testRepaint();
void repaintSweepHorizontally();
+ void display();
void displayAndTrackRepaints();
// Printing
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (216218 => 216219)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2017-05-04 23:37:52 UTC (rev 216218)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2017-05-05 00:06:50 UTC (rev 216219)
@@ -114,6 +114,12 @@
return JSTestRunner::testRunnerClass();
}
+void TestRunner::display()
+{
+ WKBundlePageRef page = InjectedBundle::singleton().page()->page();
+ WKBundlePageForceRepaint(page);
+}
+
void TestRunner::displayAndTrackRepaints()
{
WKBundlePageRef page = InjectedBundle::singleton().page()->page();
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (216218 => 216219)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2017-05-04 23:37:52 UTC (rev 216218)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2017-05-05 00:06:50 UTC (rev 216219)
@@ -140,6 +140,7 @@
// Repaint testing.
void testRepaint() { m_testRepaint = true; }
void repaintSweepHorizontally() { m_testRepaintSweepHorizontally = true; }
+ void display();
void displayAndTrackRepaints();
// UserContent testing.