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 5930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5941 | 5941 |
5942 TEST_P(ParameterizedWebFrameTest, SameDocumentHistoryNavigationCommitType) | 5942 TEST_P(ParameterizedWebFrameTest, SameDocumentHistoryNavigationCommitType) |
5943 { | 5943 { |
5944 registerMockedHttpURLLoad("push_state.html"); | 5944 registerMockedHttpURLLoad("push_state.html"); |
5945 TestDidNavigateCommitTypeWebFrameClient client; | 5945 TestDidNavigateCommitTypeWebFrameClient client; |
5946 FrameTestHelpers::WebViewHelper webViewHelper(this); | 5946 FrameTestHelpers::WebViewHelper webViewHelper(this); |
5947 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "push
_state.html", true, &client); | 5947 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "push
_state.html", true, &client); |
5948 RefPtrWillBePersistent<HistoryItem> item = toLocalFrame(webViewImpl->page()-
>mainFrame())->loader().currentItem(); | 5948 RefPtrWillBePersistent<HistoryItem> item = toLocalFrame(webViewImpl->page()-
>mainFrame())->loader().currentItem(); |
5949 runPendingTasks(); | 5949 runPendingTasks(); |
5950 | 5950 |
5951 toLocalFrame(webViewImpl->page()->mainFrame())->loader().loadHistoryItem(ite
m.get(), FrameLoadTypeBackForward, HistorySameDocumentLoad); | 5951 toLocalFrame(webViewImpl->page()->mainFrame())->loader().load( |
| 5952 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( |
| 5953 item.get(), UseProtocolCachePolicy)), |
| 5954 FrameLoadTypeBackForward, item.get(), HistorySameDocumentLoad); |
5952 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType()); | 5955 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType()); |
5953 } | 5956 } |
5954 | 5957 |
5955 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient { | 5958 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient { |
5956 public: | 5959 public: |
5957 TestHistoryWebFrameClient() | 5960 TestHistoryWebFrameClient() |
5958 { | 5961 { |
5959 m_replacesCurrentHistoryItem = false; | 5962 m_replacesCurrentHistoryItem = false; |
5960 m_frame = nullptr; | 5963 m_frame = nullptr; |
5961 } | 5964 } |
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7448 | 7451 |
7449 EXPECT_EQ(parent, firstFrame->parent()); | 7452 EXPECT_EQ(parent, firstFrame->parent()); |
7450 EXPECT_EQ(parent, secondFrame->parent()); | 7453 EXPECT_EQ(parent, secondFrame->parent()); |
7451 EXPECT_EQ(parent, thirdFrame->parent()); | 7454 EXPECT_EQ(parent, thirdFrame->parent()); |
7452 EXPECT_EQ(parent, fourthFrame->parent()); | 7455 EXPECT_EQ(parent, fourthFrame->parent()); |
7453 | 7456 |
7454 view->close(); | 7457 view->close(); |
7455 } | 7458 } |
7456 | 7459 |
7457 } // namespace blink | 7460 } // namespace blink |
OLD | NEW |