Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2830003002: Remove redundant WebLocalFrame* parameter from DidChangeScrollOffset (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/VisualViewportTest.cpp ('k') | third_party/WebKit/public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698