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

Unified Diff: blimp/client/core/blimp_client_context_impl_unittest.cc

Issue 2270323004: Add BlimpView to a Chrome tab when Blimp is enabled. (Closed)
Patch Set: addressed nit, renamed CreateForTesting and piped through touch handling Created 4 years, 4 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
« no previous file with comments | « blimp/client/core/blimp_client_context_impl.cc ('k') | blimp/client/core/contents/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/core/blimp_client_context_impl_unittest.cc
diff --git a/blimp/client/core/blimp_client_context_impl_unittest.cc b/blimp/client/core/blimp_client_context_impl_unittest.cc
index ba896b2893725c77c6ecae9f3b36540e923f2e25..e536fa6a3664b753e490f464b44ba38239d68d9f 100644
--- a/blimp/client/core/blimp_client_context_impl_unittest.cc
+++ b/blimp/client/core/blimp_client_context_impl_unittest.cc
@@ -17,6 +17,11 @@
#include "blimp/client/test/test_blimp_client_context_delegate.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/native_widget_types.h"
+
+#if defined(OS_ANDROID)
+#include "ui/android/window_android.h"
+#endif // defined(OS_ANDROID)
namespace blimp {
namespace client {
@@ -31,15 +36,22 @@ class BlimpClientContextImplTest : public testing::Test {
base::Thread::Options options;
options.message_loop_type = base::MessageLoop::TYPE_IO;
io_thread_.StartWithOptions(options);
+#if defined(OS_ANDROID)
+ window_ = ui::WindowAndroid::CreateForTesting();
+#endif // defined(OS_ANDROID)
}
void TearDown() override {
io_thread_.Stop();
base::RunLoop().RunUntilIdle();
+#if defined(OS_ANDROID)
+ window_->DestroyForTesting();
+#endif // defined(OS_ANDROID)
}
protected:
base::Thread io_thread_;
+ gfx::NativeWindow window_ = nullptr;
private:
base::MessageLoop message_loop_;
@@ -62,7 +74,7 @@ TEST_F(BlimpClientContextImplTest,
.RetiresOnSaturation();
std::unique_ptr<BlimpContents> blimp_contents =
- blimp_client_context.CreateBlimpContents();
+ blimp_client_context.CreateBlimpContents(window_);
DCHECK(blimp_contents);
DCHECK_EQ(blimp_contents.get(), attached_blimp_contents);
}
« no previous file with comments | « blimp/client/core/blimp_client_context_impl.cc ('k') | blimp/client/core/contents/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698