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

Unified Diff: blimp/engine/testing/app/blimp_content_main_delegate_for_test.cc

Issue 2572563006: [Blimp] Refactor Blimp test engine with embedded test server and URL rewriting (Closed)
Patch Set: John comment 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/app/blimp_content_main_delegate_for_test.cc
diff --git a/blimp/engine/testing/app/blimp_content_main_delegate_for_test.cc b/blimp/engine/testing/app/blimp_content_main_delegate_for_test.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1772d934274bc0464c62f37194d72584c688c90a
--- /dev/null
+++ b/blimp/engine/testing/app/blimp_content_main_delegate_for_test.cc
@@ -0,0 +1,27 @@
+// 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.
+
+#include <memory>
+
+#include "blimp/engine/testing/app/blimp_content_browser_client_for_test.h"
Kevin M 2017/01/09 20:17:17 Missing include on base/ptr_util.h ?
shenghuazhang 2017/01/10 23:20:49 Done.
+#include "blimp/engine/testing/app/blimp_content_main_delegate_for_test.h"
Kevin M 2017/01/09 20:17:17 The include that corresponds to this CC should be
shenghuazhang 2017/01/10 23:20:49 Done.
+#include "blimp/engine/testing/app/blimp_url_rewriter.h"
Kevin M 2017/01/09 20:17:17 Not used?
shenghuazhang 2017/01/10 23:20:49 Done.
+
+namespace blimp {
+namespace engine {
+
+BlimpContentMainDelegateForTest::BlimpContentMainDelegateForTest() {}
+
+content::ContentBrowserClient*
+BlimpContentMainDelegateForTest::CreateContentBrowserClient() {
+ std::unique_ptr<BlimpContentBrowserClient> browser_client_for_test =
+ base::MakeUnique<BlimpContentBrowserClientForTest>();
+ content::ContentBrowserClient* client_ptr = browser_client_for_test.get();
+ BlimpContentMainDelegate::SetContentBrowserClientForTesting(
Kevin M 2017/01/09 20:17:17 Remove "BlimpContentMainDelegate"?
shenghuazhang 2017/01/10 23:20:49 Done.
+ std::move(browser_client_for_test));
+ return client_ptr;
+}
+
+} // namespace engine
+} // namespace blimp

Powered by Google App Engine
This is Rietveld 408576698