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

Side by Side Diff: content/public/test/web_contents_observer_sanity_checker.h

Issue 869533004: Fix WCO::RenderFrameCreated and WCO::RenderFrameDeleted notifications. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes for RenderFrameHostChanged. Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_TEST_WEB_CONTENTS_OBSERVER_SANITY_CHECKER_H_ 5 #ifndef CONTENT_PUBLIC_TEST_WEB_CONTENTS_OBSERVER_SANITY_CHECKER_H_
6 #define CONTENT_PUBLIC_TEST_WEB_CONTENTS_OBSERVER_SANITY_CHECKER_H_ 6 #define CONTENT_PUBLIC_TEST_WEB_CONTENTS_OBSERVER_SANITY_CHECKER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 ui::PageTransition transition) override; 77 ui::PageTransition transition) override;
78 bool OnMessageReceived(const IPC::Message& message, 78 bool OnMessageReceived(const IPC::Message& message,
79 RenderFrameHost* render_frame_host) override; 79 RenderFrameHost* render_frame_host) override;
80 void WebContentsDestroyed() override; 80 void WebContentsDestroyed() override;
81 81
82 private: 82 private:
83 explicit WebContentsObserverSanityChecker(WebContents* web_contents); 83 explicit WebContentsObserverSanityChecker(WebContents* web_contents);
84 ~WebContentsObserverSanityChecker() override; 84 ~WebContentsObserverSanityChecker() override;
85 85
86 std::string Format(RenderFrameHost* render_frame_host); 86 std::string Format(RenderFrameHost* render_frame_host);
87 void AssertFrameExists(RenderFrameHost* render_frame_host); 87 void AssertRenderFrameHostExists(RenderFrameHost* render_frame_host);
88 void AssertRenderFrameExists(RenderFrameHost* render_frame_host);
88 void AssertMainFrameExists(); 89 void AssertMainFrameExists();
89 90
91 std::set<std::pair<int, int>> current_hosts_;
92 std::set<std::pair<int, int>> deleted_hosts_;
90 std::set<std::pair<int, int>> live_routes_; 93 std::set<std::pair<int, int>> live_routes_;
91 std::set<std::pair<int, int>> deleted_routes_; 94 std::set<std::pair<int, int>> deleted_routes_;
95 base::hash_map<std::pair<int, int>, std::string> render_frame_created_stacks_;
96 base::hash_map<std::pair<int, int>, std::string> render_frame_deleted_stacks_;
97
92 bool web_contents_destroyed_; 98 bool web_contents_destroyed_;
93 99
94 DISALLOW_COPY_AND_ASSIGN(WebContentsObserverSanityChecker); 100 DISALLOW_COPY_AND_ASSIGN(WebContentsObserverSanityChecker);
95 }; 101 };
96 102
97 } // namespace content 103 } // namespace content
98 104
99 #endif // CONTENT_PUBLIC_TEST_WEB_CONTENTS_OBSERVER_SANITY_CHECKER_H_ 105 #endif // CONTENT_PUBLIC_TEST_WEB_CONTENTS_OBSERVER_SANITY_CHECKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698