Diff
Modified: trunk/Tools/ChangeLog (139849 => 139850)
--- trunk/Tools/ChangeLog 2013-01-16 09:34:29 UTC (rev 139849)
+++ trunk/Tools/ChangeLog 2013-01-16 09:42:33 UTC (rev 139850)
@@ -1,3 +1,28 @@
+2013-01-16 Jochen Eisinger <[email protected]>
+
+ [chromium] add title text direction attribute to TestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=106907
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::setTitleTextDirection):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::setTitleTextDirection):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::didReceiveTitle):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didReceiveTitle):
+
2013-01-16 Jussi Kukkonen <[email protected]>
NRWT still confused about test count with --repeat-each and --iterations
Modified: trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp (139849 => 139850)
--- trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp 2013-01-16 09:34:29 UTC (rev 139849)
+++ trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp 2013-01-16 09:42:33 UTC (rev 139850)
@@ -152,7 +152,6 @@
// Shared properties.
// webHistoryItemCount is used by tests in LayoutTests\http\tests\history
bindProperty("webHistoryItemCount", &m_webHistoryItemCount);
- bindProperty("titleTextDirection", &m_titleTextDirection);
bindProperty("interceptPostMessage", &m_interceptPostMessage);
}
@@ -394,7 +393,6 @@
m_shell->webViewHost()->setDeviceScaleFactor(1);
m_waitUntilDone = false;
m_webHistoryItemCount.set(0);
- m_titleTextDirection.set("ltr");
m_interceptPostMessage.set(false);
webkit_support::SetAcceptAllCookies(false);
Modified: trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h (139849 => 139850)
--- trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h 2013-01-16 09:34:29 UTC (rev 139849)
+++ trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h 2013-01-16 09:42:33 UTC (rev 139850)
@@ -44,7 +44,6 @@
#include "TestRunner/src/TestRunner.h"
#include "WebTask.h"
-#include "WebTextDirection.h"
#include "platform/WebArrayBufferView.h"
#include "platform/WebString.h"
#include "platform/WebURL.h"
@@ -173,10 +172,6 @@
void setWorkQueueFrozen(bool frozen) { m_workQueue.setFrozen(frozen); }
void setShowDebugLayerTree(bool value) { m_showDebugLayerTree = value; }
- void setTitleTextDirection(WebKit::WebTextDirection dir)
- {
- m_titleTextDirection.set(dir == WebKit::WebTextDirectionLeftToRight ? "ltr" : "rtl");
- }
bool shouldInterceptPostMessage()
{
@@ -268,9 +263,6 @@
// Bound variable counting the number of top URLs visited.
CppVariant m_webHistoryItemCount;
- // Bound variable tracking the directionality of the <title> tag.
- CppVariant m_titleTextDirection;
-
// Bound variable to set whether postMessages should be intercepted or not
CppVariant m_interceptPostMessage;
};
Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h (139849 => 139850)
--- trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h 2013-01-16 09:34:29 UTC (rev 139849)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h 2013-01-16 09:42:33 UTC (rev 139850)
@@ -31,6 +31,8 @@
#ifndef WebTestRunner_h
#define WebTestRunner_h
+#include "WebKit/chromium/public/WebTextDirection.h"
+
namespace WebKit {
class WebArrayBufferView;
class WebPermissionClient;
@@ -72,6 +74,7 @@
virtual bool sweepHorizontally() const { return false; }
virtual bool isPrinting() const { return false; }
virtual bool shouldStayOnPageAfterHandlingBeforeUnload() const { return false; }
+ virtual void setTitleTextDirection(WebKit::WebTextDirection) { }
};
}
Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp (139849 => 139850)
--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp 2013-01-16 09:34:29 UTC (rev 139849)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp 2013-01-16 09:42:33 UTC (rev 139850)
@@ -184,6 +184,7 @@
// Properties.
bindProperty("workerThreadCount", &TestRunner::workerThreadCount);
bindProperty("globalFlag", &m_globalFlag);
+ bindProperty("titleTextDirection", &m_titleTextDirection);
bindProperty("platformName", &m_platformName);
// The following are stubs.
@@ -275,6 +276,7 @@
m_shouldStayOnPageAfterHandlingBeforeUnload = false;
m_globalFlag.set(false);
+ m_titleTextDirection.set("ltr");
m_platformName.set("chromium");
m_userStyleSheetLocation = WebURL();
@@ -432,6 +434,11 @@
return m_shouldStayOnPageAfterHandlingBeforeUnload;
}
+void TestRunner::setTitleTextDirection(WebKit::WebTextDirection dir)
+{
+ m_titleTextDirection.set(dir == WebKit::WebTextDirectionLeftToRight ? "ltr" : "rtl");
+}
+
void TestRunner::dumpPermissionClientCallbacks(const CppArgumentList&, CppVariant* result)
{
m_webPermissions->setDumpCallbacks(true);
Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h (139849 => 139850)
--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h 2013-01-16 09:34:29 UTC (rev 139849)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h 2013-01-16 09:42:33 UTC (rev 139850)
@@ -90,6 +90,7 @@
virtual bool sweepHorizontally() const OVERRIDE;
virtual bool isPrinting() const OVERRIDE;
virtual bool shouldStayOnPageAfterHandlingBeforeUnload() const OVERRIDE;
+ virtual void setTitleTextDirection(WebKit::WebTextDirection) OVERRIDE;
protected:
// FIXME: make these private once the move from DRTTestRunner to TestRunner
@@ -370,6 +371,9 @@
// Bound variable to return the name of this platform (chromium).
CppVariant m_platformName;
+ // Bound variable tracking the directionality of the <title> tag.
+ CppVariant m_titleTextDirection;
+
// If true, the test_shell will write a descriptive line for each editing
// command.
bool m_dumpEditingCallbacks;
Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp (139849 => 139850)
--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp 2013-01-16 09:34:29 UTC (rev 139849)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp 2013-01-16 09:42:33 UTC (rev 139850)
@@ -580,7 +580,7 @@
}
}
-void WebTestProxyBase::didReceiveTitle(WebFrame* frame, const WebString& title, WebTextDirection)
+void WebTestProxyBase::didReceiveTitle(WebFrame* frame, const WebString& title, WebTextDirection direction)
{
WebCString title8 = title.utf8();
@@ -592,6 +592,8 @@
if (m_testInterfaces->testRunner() && m_testInterfaces->testRunner()->shouldDumpTitleChanges())
m_delegate->printMessage(string("TITLE CHANGED: '") + title8.data() + "'\n");
+ if (m_testInterfaces->testRunner())
+ m_testInterfaces->testRunner()->setTitleTextDirection(direction);
}
void WebTestProxyBase::didFinishDocumentLoad(WebFrame* frame)
Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (139849 => 139850)
--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2013-01-16 09:34:29 UTC (rev 139849)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2013-01-16 09:42:33 UTC (rev 139850)
@@ -854,7 +854,6 @@
void WebViewHost::didReceiveTitle(WebFrame* frame, const WebString& title, WebTextDirection direction)
{
setPageTitle(title);
- testRunner()->setTitleTextDirection(direction);
}
void WebViewHost::didFailLoad(WebFrame* frame, const WebURLError& error)