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

Unified Diff: blimp/engine/testing/session/test_blimp_engine_session.h

Issue 2572563006: [Blimp] Refactor Blimp test engine with embedded test server and URL rewriting (Closed)
Patch Set: nit change 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 side-by-side diff with in-line comments
Download patch
Index: blimp/engine/testing/session/test_blimp_engine_session.h
diff --git a/blimp/engine/testing/session/test_blimp_engine_session.h b/blimp/engine/testing/session/test_blimp_engine_session.h
new file mode 100644
index 0000000000000000000000000000000000000000..610643ec2b8202f916e83ae29f5c6507cb11d155
--- /dev/null
+++ b/blimp/engine/testing/session/test_blimp_engine_session.h
@@ -0,0 +1,36 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BLIMP_ENGINE_TESTING_SESSION_TEST_BLIMP_ENGINE_SESSION_H_
+#define BLIMP_ENGINE_TESTING_SESSION_TEST_BLIMP_ENGINE_SESSION_H_
+
+#include "blimp/engine/common/blimp_browser_context.h"
+#include "blimp/engine/session/blimp_engine_session.h"
+
+namespace blimp {
+namespace engine {
+
+// Blimp testing implementation of BlimpEngineSession. Class to extend
+// class BlimpEngineSession for testing. This rewrites the passed in
+// Blimp message url if necessary.
+class TestBlimpEngineSession : public BlimpEngineSession {
+ public:
+ TestBlimpEngineSession(
+ std::unique_ptr<BlimpBrowserContext> browser_context,
+ net::NetLog* net_log,
+ BlimpEngineConfig* config,
+ SettingsManager* settings_manager);
+ ~TestBlimpEngineSession() = default;
+
+ // Override BlimpEngineSession::BlimpEngineSession
+ // This object handles NavigationMessage::LOAD_URL
+ // url rewritting with testing url handler.
+ void ProcessMessage(std::unique_ptr<BlimpMessage> message,
+ const net::CompletionCallback& callback) override;
+};
+
+} // namespace engine
+} // namespace blimp
+
+#endif // BLIMP_ENGINE_TESTING_SESSION_TEST_BLIMP_ENGINE_SESSION_H_
« no previous file with comments | « blimp/engine/testing/app/test_blimp_main.cc ('k') | blimp/engine/testing/session/test_blimp_engine_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698