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/FrameTestHelpers.h

Issue 2369613003: Require WebLocalFrame to be created with a non-null client (Closed)
Patch Set: oops Created 4 years, 2 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 UseMockScrollbarSettings m_mockScrollbarSettings; 203 UseMockScrollbarSettings m_mockScrollbarSettings;
204 TestWebViewClient* m_testWebViewClient; 204 TestWebViewClient* m_testWebViewClient;
205 }; 205 };
206 206
207 // Minimal implementation of WebFrameClient needed for unit tests that load fram es. Tests that load 207 // Minimal implementation of WebFrameClient needed for unit tests that load fram es. Tests that load
208 // frames and need further specialization of WebFrameClient behavior should subc lass this. 208 // frames and need further specialization of WebFrameClient behavior should subc lass this.
209 class TestWebFrameClient : public WebFrameClient { 209 class TestWebFrameClient : public WebFrameClient {
210 public: 210 public:
211 TestWebFrameClient(); 211 TestWebFrameClient();
212 212
213 WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType, const We bString& name, const WebString& uniqueName, WebSandboxFlags, const WebFrameOwner Properties&) override; 213 WebLocalFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType, con st WebString& name, const WebString& uniqueName, WebSandboxFlags, const WebFrame OwnerProperties&) override;
214 void frameDetached(WebLocalFrame*, DetachType) override;
215 void didStartLoading(bool) override; 214 void didStartLoading(bool) override;
216 void didStopLoading() override; 215 void didStopLoading() override;
217 216
218 bool isLoading() { return m_loadsInProgress > 0; } 217 bool isLoading() { return m_loadsInProgress > 0; }
219 218
220 private: 219 private:
221 int m_loadsInProgress = 0; 220 int m_loadsInProgress = 0;
222 }; 221 };
223 222
224 // Minimal implementation of WebRemoteFrameClient needed for unit tests that loa d remote frames. Tests that load 223 // Minimal implementation of WebRemoteFrameClient needed for unit tests that loa d remote frames. Tests that load
(...skipping 13 matching lines...) Expand all
238 WebDOMMessageEvent) override { } 237 WebDOMMessageEvent) override { }
239 238
240 private: 239 private:
241 Persistent<WebRemoteFrameImpl> const m_frame; 240 Persistent<WebRemoteFrameImpl> const m_frame;
242 }; 241 };
243 242
244 } // namespace FrameTestHelpers 243 } // namespace FrameTestHelpers
245 } // namespace blink 244 } // namespace blink
246 245
247 #endif // FrameTestHelpers_h 246 #endif // FrameTestHelpers_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698