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

Unified Diff: content/renderer/render_view_browsertest_mac.mm

Issue 1740173003: TextIteratorAlgorithm should not force layout update in constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed my WIP comment. Created 4 years, 10 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 | « content/renderer/render_view_browsertest.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_browsertest_mac.mm
diff --git a/content/renderer/render_view_browsertest_mac.mm b/content/renderer/render_view_browsertest_mac.mm
index 2b8908428d1b18a75b34180c01771db55b73e897..ce96f13fa568e3541d33a448783a63bd1196c5fa 100644
--- a/content/renderer/render_view_browsertest_mac.mm
+++ b/content/renderer/render_view_browsertest_mac.mm
@@ -12,6 +12,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/web/WebFrameContentDumper.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
+#include "third_party/WebKit/public/web/WebView.h"
#include <Carbon/Carbon.h> // for the kVK_* constants.
#include <Cocoa/Cocoa.h>
@@ -107,6 +108,7 @@ TEST_F(RenderViewTest, MacTestCmdUp) {
SendNativeKeyEvent(NativeWebKeyboardEvent(arrowDownKeyDown));
ProcessPendingMessages();
ExecuteJavaScriptForTests("scroll.textContent = window.pageYOffset");
+ view->GetWebView()->updateAllLifecyclePhases();
output = WebFrameContentDumper::dumpFrameTreeAsText(GetMainFrame(),
kMaxOutputCharacters);
EXPECT_EQ(kArrowDownScrollDown, base::UTF16ToASCII(output));
@@ -117,6 +119,7 @@ TEST_F(RenderViewTest, MacTestCmdUp) {
SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown));
ProcessPendingMessages();
ExecuteJavaScriptForTests("scroll.textContent = window.pageYOffset");
+ view->GetWebView()->updateAllLifecyclePhases();
output = WebFrameContentDumper::dumpFrameTreeAsText(GetMainFrame(),
kMaxOutputCharacters);
EXPECT_EQ(kArrowUpScrollUp, base::UTF16ToASCII(output));
@@ -132,6 +135,7 @@ TEST_F(RenderViewTest, MacTestCmdUp) {
SendNativeKeyEvent(NativeWebKeyboardEvent(arrowDownKeyDown));
ProcessPendingMessages();
ExecuteJavaScriptForTests("scroll.textContent = window.pageYOffset");
+ view->GetWebView()->updateAllLifecyclePhases();
output = WebFrameContentDumper::dumpFrameTreeAsText(GetMainFrame(),
kMaxOutputCharacters);
EXPECT_EQ(kArrowDownNoScroll, base::UTF16ToASCII(output));
@@ -142,6 +146,7 @@ TEST_F(RenderViewTest, MacTestCmdUp) {
SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown));
ProcessPendingMessages();
ExecuteJavaScriptForTests("scroll.textContent = window.pageYOffset");
+ view->GetWebView()->updateAllLifecyclePhases();
output = WebFrameContentDumper::dumpFrameTreeAsText(GetMainFrame(),
kMaxOutputCharacters);
EXPECT_EQ(kArrowUpNoScroll, base::UTF16ToASCII(output));
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698