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 5846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5857 | 5857 |
5858 TEST_F(WebFrameTest, SameDocumentHistoryNavigationCommitType) | 5858 TEST_F(WebFrameTest, SameDocumentHistoryNavigationCommitType) |
5859 { | 5859 { |
5860 registerMockedHttpURLLoad("push_state.html"); | 5860 registerMockedHttpURLLoad("push_state.html"); |
5861 TestDidNavigateCommitTypeWebFrameClient client; | 5861 TestDidNavigateCommitTypeWebFrameClient client; |
5862 FrameTestHelpers::WebViewHelper webViewHelper; | 5862 FrameTestHelpers::WebViewHelper webViewHelper; |
5863 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "push
_state.html", true, &client); | 5863 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "push
_state.html", true, &client); |
5864 RefPtrWillBePersistent<HistoryItem> item = toLocalFrame(webViewImpl->page()-
>mainFrame())->loader().currentItem(); | 5864 RefPtrWillBePersistent<HistoryItem> item = toLocalFrame(webViewImpl->page()-
>mainFrame())->loader().currentItem(); |
5865 runPendingTasks(); | 5865 runPendingTasks(); |
5866 | 5866 |
5867 toLocalFrame(webViewImpl->page()->mainFrame())->loader().loadHistoryItem(ite
m.get(), FrameLoadTypeBackForward, HistorySameDocumentLoad); | 5867 toLocalFrame(webViewImpl->page()->mainFrame())->loader().load( |
| 5868 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( |
| 5869 item.get(), UseProtocolCachePolicy)), |
| 5870 FrameLoadTypeBackForward, item.get(), HistorySameDocumentLoad); |
5868 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType()); | 5871 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType()); |
5869 } | 5872 } |
5870 | 5873 |
5871 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient { | 5874 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient { |
5872 public: | 5875 public: |
5873 TestHistoryWebFrameClient() | 5876 TestHistoryWebFrameClient() |
5874 { | 5877 { |
5875 m_replacesCurrentHistoryItem = false; | 5878 m_replacesCurrentHistoryItem = false; |
5876 m_frame = nullptr; | 5879 m_frame = nullptr; |
5877 } | 5880 } |
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7335 | 7338 |
7336 EXPECT_EQ(parent, firstFrame->parent()); | 7339 EXPECT_EQ(parent, firstFrame->parent()); |
7337 EXPECT_EQ(parent, secondFrame->parent()); | 7340 EXPECT_EQ(parent, secondFrame->parent()); |
7338 EXPECT_EQ(parent, thirdFrame->parent()); | 7341 EXPECT_EQ(parent, thirdFrame->parent()); |
7339 EXPECT_EQ(parent, fourthFrame->parent()); | 7342 EXPECT_EQ(parent, fourthFrame->parent()); |
7340 | 7343 |
7341 view->close(); | 7344 view->close(); |
7342 } | 7345 } |
7343 | 7346 |
7344 } // namespace blink | 7347 } // namespace blink |
OLD | NEW |