| Index: ios/web/web_state/ui/crw_web_controller_unittest.mm
|
| diff --git a/ios/web/web_state/ui/crw_web_controller_unittest.mm b/ios/web/web_state/ui/crw_web_controller_unittest.mm
|
| index bc71bfbc9ba346bbff34daa0ab4b37d414ff0ad9..2f9a6c94872164b3bc2d181c35beab9f8ddb6188 100644
|
| --- a/ios/web/web_state/ui/crw_web_controller_unittest.mm
|
| +++ b/ios/web/web_state/ui/crw_web_controller_unittest.mm
|
| @@ -851,6 +851,14 @@ TEST_F(CRWWebControllerTitleTest, TitleChange) {
|
| EXPECT_GE(observer.title_change_count(), 2);
|
| };
|
|
|
| +// Tests that fragment change navigations use title from the previous page.
|
| +TEST_F(CRWWebControllerTitleTest, FragmentChangeNavigationsUsePreviousTitle) {
|
| + LoadHtml(@"<title>Title1</title>");
|
| + ASSERT_EQ("Title1", base::UTF16ToUTF8(web_state()->GetTitle()));
|
| + ExecuteJavaScript(@"window.location.hash = '#1'");
|
| + EXPECT_EQ("Title1", base::UTF16ToUTF8(web_state()->GetTitle()));
|
| +}
|
| +
|
| // Test fixture for JavaScript execution.
|
| class ScriptExecutionTest : public web::WebTestWithWebController {
|
| protected:
|
|
|