Changeset 107704 in webkit


Ignore:
Timestamp:
Feb 14, 2012 4:36:08 AM (12 years ago)
Author:
jochen@chromium.org
Message:

[chromium] check that we're not running multiple modal dialogs at the same time
https://bugs.webkit.org/show_bug.cgi?id=78486

Reviewed by Kent Tamura.

  • DumpRenderTree/chromium/TestShell.cpp:

(TestShell::TestShell):

  • DumpRenderTree/chromium/TestShell.h:

(TestShell::setIsDisplayingModalDialog):
(TestShell::isDisplayingModalDialog):
(TestShell):

  • DumpRenderTree/chromium/WebViewHost.cpp:

(WebViewHost::runModal):

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r107697 r107704  
     12012-02-14  Jochen Eisinger  <jochen@chromium.org>
     2
     3        [chromium] check that we're not running multiple modal dialogs at the same time
     4        https://bugs.webkit.org/show_bug.cgi?id=78486
     5
     6        Reviewed by Kent Tamura.
     7
     8        * DumpRenderTree/chromium/TestShell.cpp:
     9        (TestShell::TestShell):
     10        * DumpRenderTree/chromium/TestShell.h:
     11        (TestShell::setIsDisplayingModalDialog):
     12        (TestShell::isDisplayingModalDialog):
     13        (TestShell):
     14        * DumpRenderTree/chromium/WebViewHost.cpp:
     15        (WebViewHost::runModal):
     16
    1172012-02-14  Adam Barth  <abarth@webkit.org>
    218
  • trunk/Tools/DumpRenderTree/chromium/TestShell.cpp

    r107329 r107704  
    117117    , m_stressDeopt(false)
    118118    , m_dumpWhenFinished(true)
     119    , m_isDisplayingModalDialog(false)
    119120{
    120121    WebRuntimeFeatures::enableDataTransferItems(true);
  • trunk/Tools/DumpRenderTree/chromium/TestShell.h

    r107022 r107704  
    164164    void setDumpWhenFinished(bool dumpWhenFinished) { m_dumpWhenFinished = dumpWhenFinished; }
    165165
     166    void setIsDisplayingModalDialog(bool isDisplayingModalDialog) { m_isDisplayingModalDialog = isDisplayingModalDialog; }
     167    bool isDisplayingModalDialog() const { return m_isDisplayingModalDialog; }
     168
    166169    WebViewHost* createNewWindow(const WebKit::WebURL&);
    167170    void closeWindow(WebViewHost*);
     
    235238    std::string m_javaScriptFlags;
    236239    bool m_dumpWhenFinished;
     240    bool m_isDisplayingModalDialog;
    237241
    238242
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp

    r107176 r107704  
    894894void WebViewHost::runModal()
    895895{
     896    if (m_shell->isDisplayingModalDialog()) {
     897        // DumpRenderTree doesn't support modal dialogs, so a test shouldn't try to start two modal dialogs at the same time.
     898        ASSERT_NOT_REACHED();
     899        return;
     900    }
     901    m_shell->setIsDisplayingModalDialog(true);
    896902    bool oldState = webkit_support::MessageLoopNestableTasksAllowed();
    897903    webkit_support::MessageLoopSetNestableTasksAllowed(true);
     
    899905    webkit_support::RunMessageLoop();
    900906    webkit_support::MessageLoopSetNestableTasksAllowed(oldState);
     907    m_shell->setIsDisplayingModalDialog(false);
    901908}
    902909
Note: See TracChangeset for help on using the changeset viewer.