| 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 4112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4123 webViewHelper.webView()->mainFrame()->setScrollOffset( | 4123 webViewHelper.webView()->mainFrame()->setScrollOffset( |
| 4124 WebSize(pageWidth / 4, pageHeight / 4)); | 4124 WebSize(pageWidth / 4, pageHeight / 4)); |
| 4125 webViewHelper.webView()->setPageScaleFactor(pageScaleFactor); | 4125 webViewHelper.webView()->setPageScaleFactor(pageScaleFactor); |
| 4126 | 4126 |
| 4127 WebSize previousOffset = | 4127 WebSize previousOffset = |
| 4128 webViewHelper.webView()->mainFrame()->getScrollOffset(); | 4128 webViewHelper.webView()->mainFrame()->getScrollOffset(); |
| 4129 float previousScale = webViewHelper.webView()->pageScaleFactor(); | 4129 float previousScale = webViewHelper.webView()->pageScaleFactor(); |
| 4130 | 4130 |
| 4131 // Reload the page and end up at the same url. State should be propagated. | 4131 // Reload the page and end up at the same url. State should be propagated. |
| 4132 webViewHelper.webView()->mainFrame()->reloadWithOverrideURL( | 4132 webViewHelper.webView()->mainFrame()->reloadWithOverrideURL( |
| 4133 toKURL(m_baseURL + firstURL), WebFrameLoadType::Reload); | 4133 toKURL(m_baseURL + firstURL), WebFrameLoadType::ReloadMainResource); |
| 4134 FrameTestHelpers::pumpPendingRequestsForFrameToLoad( | 4134 FrameTestHelpers::pumpPendingRequestsForFrameToLoad( |
| 4135 webViewHelper.webView()->mainFrame()); | 4135 webViewHelper.webView()->mainFrame()); |
| 4136 EXPECT_EQ(previousOffset.width, | 4136 EXPECT_EQ(previousOffset.width, |
| 4137 webViewHelper.webView()->mainFrame()->getScrollOffset().width); | 4137 webViewHelper.webView()->mainFrame()->getScrollOffset().width); |
| 4138 EXPECT_EQ(previousOffset.height, | 4138 EXPECT_EQ(previousOffset.height, |
| 4139 webViewHelper.webView()->mainFrame()->getScrollOffset().height); | 4139 webViewHelper.webView()->mainFrame()->getScrollOffset().height); |
| 4140 EXPECT_EQ(previousScale, webViewHelper.webView()->pageScaleFactor()); | 4140 EXPECT_EQ(previousScale, webViewHelper.webView()->pageScaleFactor()); |
| 4141 | 4141 |
| 4142 // Reload the page using the cache. State should not be propagated. | 4142 // Reload the page using the cache. State should not be propagated. |
| 4143 webViewHelper.webView()->mainFrame()->reloadWithOverrideURL( | 4143 webViewHelper.webView()->mainFrame()->reloadWithOverrideURL( |
| 4144 toKURL(m_baseURL + secondURL), WebFrameLoadType::Reload); | 4144 toKURL(m_baseURL + secondURL), WebFrameLoadType::ReloadMainResource); |
| 4145 FrameTestHelpers::pumpPendingRequestsForFrameToLoad( | 4145 FrameTestHelpers::pumpPendingRequestsForFrameToLoad( |
| 4146 webViewHelper.webView()->mainFrame()); | 4146 webViewHelper.webView()->mainFrame()); |
| 4147 EXPECT_EQ(0, webViewHelper.webView()->mainFrame()->getScrollOffset().width); | 4147 EXPECT_EQ(0, webViewHelper.webView()->mainFrame()->getScrollOffset().width); |
| 4148 EXPECT_EQ(0, webViewHelper.webView()->mainFrame()->getScrollOffset().height); | 4148 EXPECT_EQ(0, webViewHelper.webView()->mainFrame()->getScrollOffset().height); |
| 4149 EXPECT_EQ(1.0f, webViewHelper.webView()->pageScaleFactor()); | 4149 EXPECT_EQ(1.0f, webViewHelper.webView()->pageScaleFactor()); |
| 4150 | 4150 |
| 4151 // Reload the page while bypassing the cache. State should not be propagated. | 4151 // Reload the page while bypassing the cache. State should not be propagated. |
| 4152 webViewHelper.webView()->mainFrame()->reloadWithOverrideURL( | 4152 webViewHelper.webView()->mainFrame()->reloadWithOverrideURL( |
| 4153 toKURL(m_baseURL + thirdURL), WebFrameLoadType::ReloadBypassingCache); | 4153 toKURL(m_baseURL + thirdURL), WebFrameLoadType::ReloadBypassingCache); |
| 4154 FrameTestHelpers::pumpPendingRequestsForFrameToLoad( | 4154 FrameTestHelpers::pumpPendingRequestsForFrameToLoad( |
| (...skipping 6940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11095 | 11095 |
| 11096 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); | 11096 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); |
| 11097 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); | 11097 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); |
| 11098 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); | 11098 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); |
| 11099 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); | 11099 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); |
| 11100 | 11100 |
| 11101 webViewHelper.reset(); | 11101 webViewHelper.reset(); |
| 11102 } | 11102 } |
| 11103 | 11103 |
| 11104 } // namespace blink | 11104 } // namespace blink |
| OLD | NEW |