Changeset 139850 in webkit


Ignore:
Timestamp:
Jan 16, 2013 1:42:33 AM (11 years ago)
Author:
jochen@chromium.org
Message:

[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):

Location:
trunk/Tools
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r139841 r139850  
     12013-01-16  Jochen Eisinger  <jochen@chromium.org>
     2
     3        [chromium] add title text direction attribute to TestRunner
     4        https://bugs.webkit.org/show_bug.cgi?id=106907
     5
     6        Reviewed by Adam Barth.
     7
     8        * DumpRenderTree/chromium/DRTTestRunner.cpp:
     9        (DRTTestRunner::DRTTestRunner):
     10        (DRTTestRunner::reset):
     11        * DumpRenderTree/chromium/DRTTestRunner.h:
     12        * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
     13        (WebTestRunner::WebTestRunner::setTitleTextDirection):
     14        * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
     15        (WebTestRunner::TestRunner::TestRunner):
     16        (WebTestRunner::TestRunner::reset):
     17        (WebTestRunner::TestRunner::setTitleTextDirection):
     18        (WebTestRunner):
     19        * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
     20        (TestRunner):
     21        * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
     22        (WebTestRunner::WebTestProxyBase::didReceiveTitle):
     23        * DumpRenderTree/chromium/WebViewHost.cpp:
     24        (WebViewHost::didReceiveTitle):
     25
    1262013-01-16  Jussi Kukkonen  <jussi.kukkonen@intel.com>
    227
  • trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp

    r139821 r139850  
    153153    // webHistoryItemCount is used by tests in LayoutTests\http\tests\history
    154154    bindProperty("webHistoryItemCount", &m_webHistoryItemCount);
    155     bindProperty("titleTextDirection", &m_titleTextDirection);
    156155    bindProperty("interceptPostMessage", &m_interceptPostMessage);
    157156}
     
    395394    m_waitUntilDone = false;
    396395    m_webHistoryItemCount.set(0);
    397     m_titleTextDirection.set("ltr");
    398396    m_interceptPostMessage.set(false);
    399397
  • trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h

    r139821 r139850  
    4545#include "TestRunner/src/TestRunner.h"
    4646#include "WebTask.h"
    47 #include "WebTextDirection.h"
    4847#include "platform/WebArrayBufferView.h"
    4948#include "platform/WebString.h"
     
    174173
    175174    void setShowDebugLayerTree(bool value) { m_showDebugLayerTree = value; }
    176     void setTitleTextDirection(WebKit::WebTextDirection dir)
    177     {
    178         m_titleTextDirection.set(dir == WebKit::WebTextDirectionLeftToRight ? "ltr" : "rtl");
    179     }
    180175
    181176    bool shouldInterceptPostMessage()
     
    269264    CppVariant m_webHistoryItemCount;
    270265
    271     // Bound variable tracking the directionality of the <title> tag.
    272     CppVariant m_titleTextDirection;
    273 
    274266    // Bound variable to set whether postMessages should be intercepted or not
    275267    CppVariant m_interceptPostMessage;
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h

    r139795 r139850  
    3131#ifndef WebTestRunner_h
    3232#define WebTestRunner_h
     33
     34#include "WebKit/chromium/public/WebTextDirection.h"
    3335
    3436namespace WebKit {
     
    7375    virtual bool isPrinting() const { return false; }
    7476    virtual bool shouldStayOnPageAfterHandlingBeforeUnload() const { return false; }
     77    virtual void setTitleTextDirection(WebKit::WebTextDirection) { }
    7578};
    7679
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp

    r139821 r139850  
    185185    bindProperty("workerThreadCount", &TestRunner::workerThreadCount);
    186186    bindProperty("globalFlag", &m_globalFlag);
     187    bindProperty("titleTextDirection", &m_titleTextDirection);
    187188    bindProperty("platformName", &m_platformName);
    188189
     
    276277
    277278    m_globalFlag.set(false);
     279    m_titleTextDirection.set("ltr");
    278280    m_platformName.set("chromium");
    279281
     
    431433{
    432434    return m_shouldStayOnPageAfterHandlingBeforeUnload;
     435}
     436
     437void TestRunner::setTitleTextDirection(WebKit::WebTextDirection dir)
     438{
     439    m_titleTextDirection.set(dir == WebKit::WebTextDirectionLeftToRight ? "ltr" : "rtl");
    433440}
    434441
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h

    r139821 r139850  
    9191    virtual bool isPrinting() const OVERRIDE;
    9292    virtual bool shouldStayOnPageAfterHandlingBeforeUnload() const OVERRIDE;
     93    virtual void setTitleTextDirection(WebKit::WebTextDirection) OVERRIDE;
    9394
    9495protected:
     
    371372    CppVariant m_platformName;
    372373
     374    // Bound variable tracking the directionality of the <title> tag.
     375    CppVariant m_titleTextDirection;
     376
    373377    // If true, the test_shell will write a descriptive line for each editing
    374378    // command.
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp

    r139795 r139850  
    581581}
    582582
    583 void WebTestProxyBase::didReceiveTitle(WebFrame* frame, const WebString& title, WebTextDirection)
     583void WebTestProxyBase::didReceiveTitle(WebFrame* frame, const WebString& title, WebTextDirection direction)
    584584{
    585585    WebCString title8 = title.utf8();
     
    593593        m_delegate->printMessage(string("TITLE CHANGED: '") + title8.data() + "'\n");
    594594
     595    if (m_testInterfaces->testRunner())
     596        m_testInterfaces->testRunner()->setTitleTextDirection(direction);
    595597}
    596598
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp

    r139821 r139850  
    855855{
    856856    setPageTitle(title);
    857     testRunner()->setTitleTextDirection(direction);
    858857}
    859858
Note: See TracChangeset for help on using the changeset viewer.