Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2157)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTheme.cpp

Issue 2525513002: Move logic to turn off caret blinking for LayoutTests to LayoutTheme. (Closed)
Patch Set: Remove flaky marker from test. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutTheme.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTheme.cpp b/third_party/WebKit/Source/core/layout/LayoutTheme.cpp
index ebdbf6c7e5d3212aec1680ba6ab05d7e53dd9bc6..08d148e9034de6e2bcdd2e01de3d7693f85b7cd1 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTheme.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTheme.cpp
@@ -47,6 +47,7 @@
#include "core/page/Page.h"
#include "core/style/ComputedStyle.h"
#include "platform/FileMetadata.h"
+#include "platform/LayoutTestSupport.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/Theme.h"
#include "platform/fonts/FontSelector.h"
@@ -653,7 +654,9 @@ void LayoutTheme::setCaretBlinkInterval(double interval) {
}
double LayoutTheme::caretBlinkInterval() const {
- return m_caretBlinkInterval;
+ // Disable the blinking caret in layout test mode, as it introduces
+ // a race condition for the pixel tests. http://b/1198440
+ return LayoutTestSupport::isRunningLayoutTest() ? 0 : m_caretBlinkInterval;
}
static FontDescription& getCachedFontDescription(CSSValueID systemFontID) {
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/layout/LayoutThemeDefault.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698