| 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 6067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6078 // Show more, make sure the scroll actually gets clamped. Horizontal | 6078 // Show more, make sure the scroll actually gets clamped. Horizontal |
| 6079 // direction shouldn't be affected. | 6079 // direction shouldn't be affected. |
| 6080 webView->applyViewportDeltas(WebSize(0, 0), 1.0f, 20.0f); | 6080 webView->applyViewportDeltas(WebSize(0, 0), 1.0f, 20.0f); |
| 6081 webView->setMainFrameScrollOffset(WebPoint(100, 100)); | 6081 webView->setMainFrameScrollOffset(WebPoint(100, 100)); |
| 6082 EXPECT_POINT_EQ(IntPoint(50, 70), IntPoint(frameView->scrollOffset())); | 6082 EXPECT_POINT_EQ(IntPoint(50, 70), IntPoint(frameView->scrollOffset())); |
| 6083 | 6083 |
| 6084 // Hide until there's 10px showing. | 6084 // Hide until there's 10px showing. |
| 6085 webView->applyViewportDeltas(WebSize(0, 0), 1.0f, -30.0f); | 6085 webView->applyViewportDeltas(WebSize(0, 0), 1.0f, -30.0f); |
| 6086 EXPECT_POINT_EQ(IntPoint(50, 55), frameView->maximumScrollPosition()); | 6086 EXPECT_POINT_EQ(IntPoint(50, 55), frameView->maximumScrollPosition()); |
| 6087 | 6087 |
| 6088 // Simulate a RenderWidget::resize. The frame is resized to accomodate | 6088 // Simulate a RenderPart::resize. The frame is resized to accomodate |
| 6089 // the top controls and Blink's view of the top controls matches that of | 6089 // the top controls and Blink's view of the top controls matches that of |
| 6090 // the CC | 6090 // the CC |
| 6091 webView->setTopControlsLayoutHeight(10.0f); | 6091 webView->setTopControlsLayoutHeight(10.0f); |
| 6092 webView->resize(WebSize(100, 90)); | 6092 webView->resize(WebSize(100, 90)); |
| 6093 webView->layout(); | 6093 webView->layout(); |
| 6094 EXPECT_POINT_EQ(IntPoint(50, 45), frameView->maximumScrollPosition()); | 6094 EXPECT_POINT_EQ(IntPoint(50, 45), frameView->maximumScrollPosition()); |
| 6095 | 6095 |
| 6096 // Now simulate hiding. | 6096 // Now simulate hiding. |
| 6097 webView->applyViewportDeltas(WebSize(0, 0), 1.0f, -10.0f); | 6097 webView->applyViewportDeltas(WebSize(0, 0), 1.0f, -10.0f); |
| 6098 EXPECT_POINT_EQ(IntPoint(50, 40), frameView->maximumScrollPosition()); | 6098 EXPECT_POINT_EQ(IntPoint(50, 40), frameView->maximumScrollPosition()); |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6720 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6720 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 6721 | 6721 |
| 6722 // Neither should a page reload. | 6722 // Neither should a page reload. |
| 6723 localFrame->reload(); | 6723 localFrame->reload(); |
| 6724 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 6724 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
| 6725 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 6725 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
| 6726 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6726 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 6727 } | 6727 } |
| 6728 | 6728 |
| 6729 } // namespace | 6729 } // namespace |
| OLD | NEW |