Title: [107704] trunk/Tools
- Revision
- 107704
- Author
- [email protected]
- Date
- 2012-02-14 04:36:08 -0800 (Tue, 14 Feb 2012)
Log 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):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (107703 => 107704)
--- trunk/Tools/ChangeLog 2012-02-14 12:01:14 UTC (rev 107703)
+++ trunk/Tools/ChangeLog 2012-02-14 12:36:08 UTC (rev 107704)
@@ -1,3 +1,19 @@
+2012-02-14 Jochen Eisinger <[email protected]>
+
+ [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):
+
2012-02-14 Adam Barth <[email protected]>
Enable the GPU codepath in the chromium-android port
Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.cpp (107703 => 107704)
--- trunk/Tools/DumpRenderTree/chromium/TestShell.cpp 2012-02-14 12:01:14 UTC (rev 107703)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.cpp 2012-02-14 12:36:08 UTC (rev 107704)
@@ -116,6 +116,7 @@
, m_stressOpt(false)
, m_stressDeopt(false)
, m_dumpWhenFinished(true)
+ , m_isDisplayingModalDialog(false)
{
WebRuntimeFeatures::enableDataTransferItems(true);
WebRuntimeFeatures::enableGeolocation(true);
Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.h (107703 => 107704)
--- trunk/Tools/DumpRenderTree/chromium/TestShell.h 2012-02-14 12:01:14 UTC (rev 107703)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.h 2012-02-14 12:36:08 UTC (rev 107704)
@@ -163,6 +163,9 @@
// testing where we only want to have the output from the last load.
void setDumpWhenFinished(bool dumpWhenFinished) { m_dumpWhenFinished = dumpWhenFinished; }
+ void setIsDisplayingModalDialog(bool isDisplayingModalDialog) { m_isDisplayingModalDialog = isDisplayingModalDialog; }
+ bool isDisplayingModalDialog() const { return m_isDisplayingModalDialog; }
+
WebViewHost* createNewWindow(const WebKit::WebURL&);
void closeWindow(WebViewHost*);
void closeRemainingWindows();
@@ -234,6 +237,7 @@
bool m_stressDeopt;
std::string m_javaScriptFlags;
bool m_dumpWhenFinished;
+ bool m_isDisplayingModalDialog;
// List of all windows in this process.
Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (107703 => 107704)
--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2012-02-14 12:01:14 UTC (rev 107703)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2012-02-14 12:36:08 UTC (rev 107704)
@@ -893,11 +893,18 @@
void WebViewHost::runModal()
{
+ if (m_shell->isDisplayingModalDialog()) {
+ // DumpRenderTree doesn't support modal dialogs, so a test shouldn't try to start two modal dialogs at the same time.
+ ASSERT_NOT_REACHED();
+ return;
+ }
+ m_shell->setIsDisplayingModalDialog(true);
bool oldState = webkit_support::MessageLoopNestableTasksAllowed();
webkit_support::MessageLoopSetNestableTasksAllowed(true);
m_inModalLoop = true;
webkit_support::RunMessageLoop();
webkit_support::MessageLoopSetNestableTasksAllowed(oldState);
+ m_shell->setIsDisplayingModalDialog(false);
}
bool WebViewHost::enterFullScreen()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes