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

Unified Diff: content/renderer/render_view_browsertest.cc

Issue 1769683002: TextIteratorAlgorithm should not force layout update in constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 be020d4c0faff2ee32c4420d8ac46ff24f973ec0..783608574e0437cac3406a04bd92dd0e26ee2e83 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -1419,6 +1419,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);
@@ -1469,6 +1470,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);
@@ -1799,6 +1801,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)));
@@ -1921,6 +1924,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))));
@@ -1956,6 +1960,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(
@@ -1991,6 +1996,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