Changeset 112354 in webkit


Ignore:
Timestamp:
Mar 27, 2012 7:06:54 PM (12 years ago)
Author:
enne@google.com
Message:

[chromium] Fix --enabled-threaded-compositing flag in DRT
https://bugs.webkit.org/show_bug.cgi?id=82405

Reviewed by James Robinson.

--enable-threaded-compositing wasn't working because there was no way
to set the value before it was used in the TestShell constructor.

To avoid adding yet another boolean parameter to TestShell's
constructor, add an explicit initialize function that can operate on
any boolean settings that are set post-constructor.

  • DumpRenderTree/chromium/DumpRenderTree.cpp:

(main):

  • DumpRenderTree/chromium/TestShell.cpp:

(TestShell::TestShell):
(TestShell::initialize):

  • DumpRenderTree/chromium/TestShell.h:

(TestShell):
(TestShell::setTestShellMode):

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r112337 r112354  
     12012-03-27  Adrienne Walker  <enne@google.com>
     2
     3        [chromium] Fix --enabled-threaded-compositing flag in DRT
     4        https://bugs.webkit.org/show_bug.cgi?id=82405
     5
     6        Reviewed by James Robinson.
     7
     8        --enable-threaded-compositing wasn't working because there was no way
     9        to set the value before it was used in the TestShell constructor.
     10
     11        To avoid adding yet another boolean parameter to TestShell's
     12        constructor, add an explicit initialize function that can operate on
     13        any boolean settings that are set post-constructor.
     14
     15        * DumpRenderTree/chromium/DumpRenderTree.cpp:
     16        (main):
     17        * DumpRenderTree/chromium/TestShell.cpp:
     18        (TestShell::TestShell):
     19        (TestShell::initialize):
     20        * DumpRenderTree/chromium/TestShell.h:
     21        (TestShell):
     22        (TestShell::setTestShellMode):
     23
    1242012-03-27  Dirk Pranke  <dpranke@chromium.org>
    225
  • trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp

    r111220 r112354  
    235235
    236236    { // Explicit scope for the TestShell instance.
    237         TestShell shell(testShellMode);
     237        TestShell shell;
     238        shell.setTestShellMode(testShellMode);
    238239        shell.setAllowExternalPages(allowExternalPages);
    239240        shell.setAcceleratedCompositingForVideoEnabled(acceleratedCompositingForVideoEnabled);
     
    252253            shell.setLayoutTestTimeout(0x20000000);
    253254        }
     255        shell.initialize();
    254256        if (serverMode && !tests.size()) {
    255257#if OS(ANDROID)
  • trunk/Tools/DumpRenderTree/chromium/TestShell.cpp

    r111220 r112354  
    9999}
    100100
    101 TestShell::TestShell(bool testShellMode)
     101TestShell::TestShell()
    102102    : m_testIsPending(false)
    103103    , m_testIsPreparing(false)
    104104    , m_focusedWidget(0)
    105     , m_testShellMode(testShellMode)
     105    , m_testShellMode(false)
    106106    , m_devTools(0)
    107107    , m_allowExternalPages(false)
     
    132132    WebRuntimeFeatures::enableStyleScoped(true);
    133133    WebRuntimeFeatures::enableScriptedSpeech(true);
    134 
     134}
     135
     136void TestShell::initialize()
     137{
    135138    m_webPermissions = adoptPtr(new WebPermissions(this));
    136139    m_accessibilityController = adoptPtr(new AccessibilityController(this));
     
    151154    } else
    152155        WebCompositor::initialize(0);
    153 
    154156
    155157    // 30 second is the same as the value in Mac DRT.
  • trunk/Tools/DumpRenderTree/chromium/TestShell.h

    r110032 r112354  
    8383class TestShell {
    8484public:
    85     TestShell(bool testShellMode);
     85    TestShell();
    8686    ~TestShell();
     87
     88    void initialize();
    8789
    8890    // The main WebView.
     
    131133    void setAllowExternalPages(bool allowExternalPages) { m_allowExternalPages = allowExternalPages; }
    132134
     135    void setTestShellMode(bool testShellMode) { m_testShellMode = testShellMode; }
    133136    void setAcceleratedCompositingForVideoEnabled(bool enabled) { m_acceleratedCompositingForVideoEnabled = enabled; }
    134137    void setThreadedCompositingEnabled(bool enabled) { m_threadedCompositingEnabled = enabled; }
Note: See TracChangeset for help on using the changeset viewer.