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

Unified Diff: content/renderer/render_view_browsertest.cc

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 | « no previous file | content/renderer/render_view_browsertest_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_browsertest.cc
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
index 3d98b5a8f0870286f52953175599cd482e73809d..59446f8c89b30f389bcc2ddfdbe2034e09708e05 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -1389,6 +1389,7 @@ TEST_F(RenderViewImplTest, ImeComposition) {
// Retrieve the content of this page and compare it with the expected
// result.
const int kMaxOutputCharacters = 128;
+ view()->GetWebView()->updateAllLifecyclePhases();
base::string16 output = WebFrameContentDumper::dumpFrameTreeAsText(
GetMainFrame(), kMaxOutputCharacters);
EXPECT_EQ(base::WideToUTF16(ime_message->result), output);
@@ -1439,6 +1440,7 @@ TEST_F(RenderViewImplTest, OnSetTextDirection) {
// Copy the document content to std::wstring and compare with the
// expected result.
const int kMaxOutputCharacters = 16;
+ view()->GetWebView()->updateAllLifecyclePhases();
base::string16 output = WebFrameContentDumper::dumpFrameTreeAsText(
GetMainFrame(), kMaxOutputCharacters);
EXPECT_EQ(base::WideToUTF16(kTextDirection[i].expected_result), output);
@@ -1580,6 +1582,7 @@ TEST_F(RenderViewImplTest, OnHandleKeyboardEvent) {
// text created from a virtual-key code, a character code, and the
// modifier-key status.
const int kMaxOutputCharacters = 1024;
+ view()->GetWebView()->updateAllLifecyclePhases();
std::string output = base::UTF16ToUTF8(
base::StringPiece16(WebFrameContentDumper::dumpFrameTreeAsText(
GetMainFrame(), kMaxOutputCharacters)));
@@ -1813,6 +1816,7 @@ TEST_F(RenderViewImplTest, MAYBE_InsertCharacters) {
// text created from a virtual-key code, a character code, and the
// modifier-key status.
const int kMaxOutputCharacters = 4096;
+ view()->GetWebView()->updateAllLifecyclePhases();
base::string16 output = WebFrameContentDumper::dumpFrameTreeAsText(
GetMainFrame(), kMaxOutputCharacters);
EXPECT_EQ(base::WideToUTF16(kLayouts[i].expected_result), output);
@@ -2149,6 +2153,7 @@ TEST_F(RenderViewImplTest, NavigateSubframe) {
// Copy the document content to std::wstring and compare with the
// expected result.
const int kMaxOutputCharacters = 256;
+ view()->GetWebView()->updateAllLifecyclePhases();
std::string output = base::UTF16ToUTF8(
base::StringPiece16(WebFrameContentDumper::dumpFrameTreeAsText(
GetMainFrame(), kMaxOutputCharacters)));
@@ -2271,6 +2276,7 @@ TEST_F(RendererErrorPageTest, MAYBE_Suppresses) {
main_frame->didFailProvisionalLoad(web_frame, error,
blink::WebStandardCommit);
const int kMaxOutputCharacters = 22;
+ view()->GetWebView()->updateAllLifecyclePhases();
EXPECT_EQ("", base::UTF16ToASCII(base::StringPiece16(
WebFrameContentDumper::dumpFrameTreeAsText(
web_frame, kMaxOutputCharacters))));
@@ -2306,6 +2312,7 @@ TEST_F(RendererErrorPageTest, MAYBE_DoesNotSuppress) {
// The error page itself is loaded asynchronously.
FrameLoadWaiter(main_frame).Wait();
const int kMaxOutputCharacters = 22;
+ view()->GetWebView()->updateAllLifecyclePhases();
EXPECT_EQ("A suffusion of yellow.",
base::UTF16ToASCII(
base::StringPiece16(WebFrameContentDumper::dumpFrameTreeAsText(
@@ -2341,6 +2348,7 @@ TEST_F(RendererErrorPageTest, MAYBE_HttpStatusCodeErrorWithEmptyBody) {
// The error page itself is loaded asynchronously.
FrameLoadWaiter(main_frame).Wait();
const int kMaxOutputCharacters = 22;
+ view()->GetWebView()->updateAllLifecyclePhases();
EXPECT_EQ("A suffusion of yellow.",
base::UTF16ToASCII(
base::StringPiece16(WebFrameContentDumper::dumpFrameTreeAsText(
« no previous file with comments | « no previous file | content/renderer/render_view_browsertest_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698