Commit e4e2ca8a authored by bgoldman's avatar bgoldman Committed by Commit bot

Validate the page title in engine browser test.

Prior to this change, the engine browser test would only make
asssertions that the URL was changing and that the RenderWidget was
being created. Validating the page title is an easy way to make sure the
intended page is actually the one being sent.

BUG=628324

Review-Url: https://codereview.chromium.org/2224613002
Cr-Commit-Position: refs/heads/master@{#410398}
parent 38fdd175
......@@ -59,11 +59,16 @@ class EngineBrowserTest : public BlimpBrowserTest {
};
IN_PROC_BROWSER_TEST_F(EngineBrowserTest, LoadUrl) {
testing::InSequence s;
EXPECT_TRUE(embedded_test_server()->Start());
GURL url = embedded_test_server()->GetURL("/hello.html");
EXPECT_CALL(client_rw_feature_delegate_, OnRenderWidgetCreated(1));
EXPECT_CALL(client_nav_feature_delegate_, OnUrlChanged(kDummyTabId, url))
EXPECT_CALL(client_nav_feature_delegate_,
OnTitleChanged(kDummyTabId, url.GetContent()));
EXPECT_CALL(client_nav_feature_delegate_,
OnTitleChanged(kDummyTabId, "hello"))
.WillOnce(InvokeWithoutArgs(this, &EngineBrowserTest::QuitRunLoop));
// Skip assigner. Engine info is already available.
......
<!doctype html>
<title>hello</title>
<h1>Hello world!</h1>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment