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

Unified Diff: content/test/test_render_frame_host.h

Issue 2101323002: Add 'NavigationHandle::QueueConsoleMessage'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: -public Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/test/test_render_frame_host.h
diff --git a/content/test/test_render_frame_host.h b/content/test/test_render_frame_host.h
index 32aa044e8642512e2c6c42b0dba68e42a62e1b95..218987a32a47a582985f86f8b7dc232f62413dfd 100644
--- a/content/test/test_render_frame_host.h
+++ b/content/test/test_render_frame_host.h
@@ -52,6 +52,8 @@ class TestRenderFrameHost : public RenderFrameHostImpl,
// RenderFrameHostImpl overrides (same values, but in Test*/Mock* types)
TestRenderViewHost* GetRenderViewHost() override;
MockRenderProcessHost* GetProcess() override;
+ void AddMessageToConsole(ConsoleMessageLevel,
+ const std::string& message) override;
// RenderFrameHostTester implementation.
void InitializeRenderFrameIfNeeded() override;
@@ -97,6 +99,10 @@ class TestRenderFrameHost : public RenderFrameHostImpl,
void SendNavigateWithParams(
FrameHostMsg_DidCommitProvisionalLoad_Params* params);
+ std::vector<std::string> GetConsoleMessages() const {
+ return console_messages_;
+ }
+
// Simulate a renderer-initiated navigation up until commit.
void NavigateAndCommitRendererInitiated(int page_id,
bool did_create_new_entry,
@@ -156,6 +162,9 @@ class TestRenderFrameHost : public RenderFrameHostImpl,
// See set_simulate_history_list_was_cleared() above.
bool simulate_history_list_was_cleared_;
+ // See AddMessageToConsole() above.
+ std::vector<std::string> console_messages_;
+
DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost);
};

Powered by Google App Engine
This is Rietveld 408576698