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

Unified Diff: content/browser/renderer_host/input/non_blocking_event_browsertest.cc

Issue 1781133002: Change page size for NonBlockingEventBrowserTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed raw string literal Created 4 years, 9 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/non_blocking_event_browsertest.cc
diff --git a/content/browser/renderer_host/input/non_blocking_event_browsertest.cc b/content/browser/renderer_host/input/non_blocking_event_browsertest.cc
index c68191409f965bfd46e1451acd38b6f2173ef165..0f4fac2141c15b1f4c0551276e2ee02ecde5f251 100644
--- a/content/browser/renderer_host/input/non_blocking_event_browsertest.cc
+++ b/content/browser/renderer_host/input/non_blocking_event_browsertest.cc
@@ -33,6 +33,11 @@ using blink::WebInputEvent;
namespace {
+// This value has to be larger than the height of the device this test is
+// executed on, otherwise the device will be unable to scroll thus failing
+// tests.
+const int kWebsiteHeight = 10000;
+
const char kNonBlockingEventDataURL[] =
"data:text/html;charset=utf-8,"
"<!DOCTYPE html>"
@@ -41,7 +46,7 @@ const char kNonBlockingEventDataURL[] =
"html, body {"
" margin: 0;"
"}"
- ".spacer { height: 1000px; }"
+ ".spacer { height: 10000px; }"
"</style>"
"<div class=spacer></div>"
"<script>"
@@ -110,7 +115,7 @@ class NonBlockingEventBrowserTest : public ContentBrowserTest {
int scrollHeight =
ExecuteScriptAndExtractInt("document.documentElement.scrollHeight");
- EXPECT_EQ(1000, scrollHeight);
+ EXPECT_EQ(kWebsiteHeight, scrollHeight);
scoped_refptr<FrameWatcher> frame_watcher(new FrameWatcher());
GetWidgetHost()->GetProcess()->AddFilter(frame_watcher.get());
@@ -135,7 +140,7 @@ class NonBlockingEventBrowserTest : public ContentBrowserTest {
int scrollHeight =
ExecuteScriptAndExtractInt("document.documentElement.scrollHeight");
- EXPECT_EQ(1000, scrollHeight);
+ EXPECT_EQ(kWebsiteHeight, scrollHeight);
scoped_refptr<FrameWatcher> frame_watcher(new FrameWatcher());
GetWidgetHost()->GetProcess()->AddFilter(frame_watcher.get());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698