OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 5947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5958 | 5958 |
5959 TEST_P(ParameterizedWebFrameTest, SameDocumentHistoryNavigationCommitType) | 5959 TEST_P(ParameterizedWebFrameTest, SameDocumentHistoryNavigationCommitType) |
5960 { | 5960 { |
5961 registerMockedHttpURLLoad("push_state.html"); | 5961 registerMockedHttpURLLoad("push_state.html"); |
5962 TestDidNavigateCommitTypeWebFrameClient client; | 5962 TestDidNavigateCommitTypeWebFrameClient client; |
5963 FrameTestHelpers::WebViewHelper webViewHelper(this); | 5963 FrameTestHelpers::WebViewHelper webViewHelper(this); |
5964 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "push
_state.html", true, &client); | 5964 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "push
_state.html", true, &client); |
5965 RefPtrWillBePersistent<HistoryItem> item = toLocalFrame(webViewImpl->page()-
>mainFrame())->loader().currentItem(); | 5965 RefPtrWillBePersistent<HistoryItem> item = toLocalFrame(webViewImpl->page()-
>mainFrame())->loader().currentItem(); |
5966 runPendingTasks(); | 5966 runPendingTasks(); |
5967 | 5967 |
5968 toLocalFrame(webViewImpl->page()->mainFrame())->loader().loadHistoryItem(ite
m.get(), FrameLoadTypeBackForward, HistorySameDocumentLoad); | 5968 toLocalFrame(webViewImpl->page()->mainFrame())->loader().load( |
| 5969 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( |
| 5970 item.get(), UseProtocolCachePolicy)), |
| 5971 FrameLoadTypeBackForward, item.get(), HistorySameDocumentLoad); |
5969 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType()); | 5972 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType()); |
5970 } | 5973 } |
5971 | 5974 |
5972 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient { | 5975 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient { |
5973 public: | 5976 public: |
5974 TestHistoryWebFrameClient() | 5977 TestHistoryWebFrameClient() |
5975 { | 5978 { |
5976 m_replacesCurrentHistoryItem = false; | 5979 m_replacesCurrentHistoryItem = false; |
5977 m_frame = nullptr; | 5980 m_frame = nullptr; |
5978 } | 5981 } |
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7465 | 7468 |
7466 EXPECT_EQ(parent, firstFrame->parent()); | 7469 EXPECT_EQ(parent, firstFrame->parent()); |
7467 EXPECT_EQ(parent, secondFrame->parent()); | 7470 EXPECT_EQ(parent, secondFrame->parent()); |
7468 EXPECT_EQ(parent, thirdFrame->parent()); | 7471 EXPECT_EQ(parent, thirdFrame->parent()); |
7469 EXPECT_EQ(parent, fourthFrame->parent()); | 7472 EXPECT_EQ(parent, fourthFrame->parent()); |
7470 | 7473 |
7471 view->close(); | 7474 view->close(); |
7472 } | 7475 } |
7473 | 7476 |
7474 } // namespace blink | 7477 } // namespace blink |
OLD | NEW |