| 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 6938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6949 EXPECT_TRUE(web_frame_client.did_access_initial_document_); | 6949 EXPECT_TRUE(web_frame_client.did_access_initial_document_); |
| 6950 } | 6950 } |
| 6951 | 6951 |
| 6952 class TestScrolledFrameClient : public FrameTestHelpers::TestWebFrameClient { | 6952 class TestScrolledFrameClient : public FrameTestHelpers::TestWebFrameClient { |
| 6953 public: | 6953 public: |
| 6954 TestScrolledFrameClient() { Reset(); } | 6954 TestScrolledFrameClient() { Reset(); } |
| 6955 void Reset() { did_scroll_frame_ = false; } | 6955 void Reset() { did_scroll_frame_ = false; } |
| 6956 bool WasFrameScrolled() const { return did_scroll_frame_; } | 6956 bool WasFrameScrolled() const { return did_scroll_frame_; } |
| 6957 | 6957 |
| 6958 // WebFrameClient: | 6958 // WebFrameClient: |
| 6959 void DidChangeScrollOffset(WebLocalFrame* frame) override { | 6959 void DidChangeScrollOffset() override { |
| 6960 if (frame->Parent()) | 6960 if (Frame()->Parent()) |
| 6961 return; | 6961 return; |
| 6962 EXPECT_FALSE(did_scroll_frame_); | 6962 EXPECT_FALSE(did_scroll_frame_); |
| 6963 FrameView* view = ToWebLocalFrameImpl(frame)->GetFrameView(); | 6963 FrameView* view = ToWebLocalFrameImpl(Frame())->GetFrameView(); |
| 6964 // FrameView can be scrolled in FrameView::setFixedVisibleContentRect which | 6964 // FrameView can be scrolled in FrameView::setFixedVisibleContentRect which |
| 6965 // is called from LocalFrame::createView (before the frame is associated | 6965 // is called from LocalFrame::createView (before the frame is associated |
| 6966 // with the the view). | 6966 // with the the view). |
| 6967 if (view) | 6967 if (view) |
| 6968 did_scroll_frame_ = true; | 6968 did_scroll_frame_ = true; |
| 6969 } | 6969 } |
| 6970 | 6970 |
| 6971 private: | 6971 private: |
| 6972 bool did_scroll_frame_; | 6972 bool did_scroll_frame_; |
| 6973 }; | 6973 }; |
| (...skipping 5023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11997 | 11997 |
| 11998 // Failing the original child frame navigation and trying to render fallback | 11998 // Failing the original child frame navigation and trying to render fallback |
| 11999 // content shouldn't crash. It should return NoLoadInProgress. This is so the | 11999 // content shouldn't crash. It should return NoLoadInProgress. This is so the |
| 12000 // caller won't attempt to replace the correctly empty frame with an error | 12000 // caller won't attempt to replace the correctly empty frame with an error |
| 12001 // page. | 12001 // page. |
| 12002 EXPECT_EQ(WebLocalFrame::NoLoadInProgress, | 12002 EXPECT_EQ(WebLocalFrame::NoLoadInProgress, |
| 12003 child->MaybeRenderFallbackContent(WebURLError())); | 12003 child->MaybeRenderFallbackContent(WebURLError())); |
| 12004 } | 12004 } |
| 12005 | 12005 |
| 12006 } // namespace blink | 12006 } // namespace blink |
| OLD | NEW |