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

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

Issue 2653673006: Move loadType() to DocumentLoader (Closed)
Patch Set: Rebase Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7137 matching lines...) Expand 10 before | Expand all | Expand 10 after
7148 WebCachePolicy::UseProtocolCachePolicy); 7148 WebCachePolicy::UseProtocolCachePolicy);
7149 } 7149 }
7150 7150
7151 class TestSameDocumentWebFrameClient 7151 class TestSameDocumentWebFrameClient
7152 : public FrameTestHelpers::TestWebFrameClient { 7152 : public FrameTestHelpers::TestWebFrameClient {
7153 public: 7153 public:
7154 TestSameDocumentWebFrameClient() 7154 TestSameDocumentWebFrameClient()
7155 : m_frameLoadTypeReloadMainResourceSeen(false) {} 7155 : m_frameLoadTypeReloadMainResourceSeen(false) {}
7156 7156
7157 virtual void willSendRequest(WebLocalFrame* frame, WebURLRequest&) { 7157 virtual void willSendRequest(WebLocalFrame* frame, WebURLRequest&) {
7158 if (toWebLocalFrameImpl(frame)->frame()->loader().loadType() == 7158 FrameLoader& frameLoader = toWebLocalFrameImpl(frame)->frame()->loader();
7159 if (frameLoader.provisionalDocumentLoader()->loadType() ==
7159 FrameLoadTypeReloadMainResource) 7160 FrameLoadTypeReloadMainResource)
7160 m_frameLoadTypeReloadMainResourceSeen = true; 7161 m_frameLoadTypeReloadMainResourceSeen = true;
7161 } 7162 }
7162 7163
7163 bool frameLoadTypeReloadMainResourceSeen() const { 7164 bool frameLoadTypeReloadMainResourceSeen() const {
7164 return m_frameLoadTypeReloadMainResourceSeen; 7165 return m_frameLoadTypeReloadMainResourceSeen;
7165 } 7166 }
7166 7167
7167 private: 7168 private:
7168 bool m_frameLoadTypeReloadMainResourceSeen; 7169 bool m_frameLoadTypeReloadMainResourceSeen;
(...skipping 4065 matching lines...) Expand 10 before | Expand all | Expand 10 after
11234 11235
11235 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); 11236 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached());
11236 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); 11237 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading());
11237 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); 11238 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad());
11238 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); 11239 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents());
11239 11240
11240 webViewHelper.reset(); 11241 webViewHelper.reset();
11241 } 11242 }
11242 11243
11243 } // namespace blink 11244 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698