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

Side by Side Diff: third_party/WebKit/Source/web/tests/FrameTestHelpers.h

Issue 2631233003: Avoid mutating frame owner when detaching a provisional frame. (Closed)
Patch Set: Fix test to actually test the changed behavior. Created 3 years, 11 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 TestWebViewClient* m_testWebViewClient; 230 TestWebViewClient* m_testWebViewClient;
231 }; 231 };
232 232
233 // Minimal implementation of WebFrameClient needed for unit tests that load 233 // Minimal implementation of WebFrameClient needed for unit tests that load
234 // frames. Tests that load frames and need further specialization of 234 // frames. Tests that load frames and need further specialization of
235 // WebFrameClient behavior should subclass this. 235 // WebFrameClient behavior should subclass this.
236 class TestWebFrameClient : public WebFrameClient { 236 class TestWebFrameClient : public WebFrameClient {
237 public: 237 public:
238 TestWebFrameClient(); 238 TestWebFrameClient();
239 239
240 void frameDetached(WebLocalFrame*, DetachType) override;
240 WebLocalFrame* createChildFrame(WebLocalFrame* parent, 241 WebLocalFrame* createChildFrame(WebLocalFrame* parent,
241 WebTreeScopeType, 242 WebTreeScopeType,
242 const WebString& name, 243 const WebString& name,
243 const WebString& uniqueName, 244 const WebString& uniqueName,
244 WebSandboxFlags, 245 WebSandboxFlags,
245 const WebFrameOwnerProperties&) override; 246 const WebFrameOwnerProperties&) override;
246 void didStartLoading(bool) override; 247 void didStartLoading(bool) override;
247 void didStopLoading() override; 248 void didStopLoading() override;
248 249
249 bool isLoading() { return m_loadsInProgress > 0; } 250 bool isLoading() { return m_loadsInProgress > 0; }
(...skipping 19 matching lines...) Expand all
269 WebDOMMessageEvent) override {} 270 WebDOMMessageEvent) override {}
270 271
271 private: 272 private:
272 Persistent<WebRemoteFrameImpl> const m_frame; 273 Persistent<WebRemoteFrameImpl> const m_frame;
273 }; 274 };
274 275
275 } // namespace FrameTestHelpers 276 } // namespace FrameTestHelpers
276 } // namespace blink 277 } // namespace blink
277 278
278 #endif // FrameTestHelpers_h 279 #endif // FrameTestHelpers_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698