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

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

Issue 2376573002: Cleanup blimp/client/core code organization. (Closed)
Patch Set: merged origin/master Created 4 years, 3 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/blimp_client_switches.h » ('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
deleted file mode 100644
index e1e9c5f5951be10924674be187d17e920c4510f1..0000000000000000000000000000000000000000
--- a/blimp/client/core/blimp_client_context_impl_unittest.cc
+++ /dev/null
@@ -1,84 +0,0 @@
-// 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 "blimp/client/core/blimp_client_context_impl.h"
-
-#include "base/macros.h"
-#include "base/memory/ptr_util.h"
-#include "base/message_loop/message_loop.h"
-#include "base/run_loop.h"
-#include "base/threading/thread.h"
-#include "blimp/client/core/contents/blimp_contents_impl.h"
-#include "blimp/client/core/contents/tab_control_feature.h"
-#include "blimp/client/public/blimp_client_context_delegate.h"
-#include "blimp/client/public/contents/blimp_contents.h"
-#include "blimp/client/test/compositor/mock_compositor_dependencies.h"
-#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 {
-namespace {
-
-class BlimpClientContextImplTest : public testing::Test {
- public:
- BlimpClientContextImplTest() : io_thread_("BlimpTestIO") {}
- ~BlimpClientContextImplTest() override {}
-
- void SetUp() override {
- 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_;
-
- DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImplTest);
-};
-
-TEST_F(BlimpClientContextImplTest,
- CreatedBlimpContentsGetsHelpersAttachedAndHasTabControlFeature) {
- BlimpClientContextImpl blimp_client_context(
- io_thread_.task_runner(), io_thread_.task_runner(),
- base::MakeUnique<MockCompositorDependencies>());
- TestBlimpClientContextDelegate delegate;
- blimp_client_context.SetDelegate(&delegate);
-
- BlimpContents* attached_blimp_contents = nullptr;
-
- EXPECT_CALL(delegate, AttachBlimpContentsHelpers(testing::_))
- .WillOnce(testing::SaveArg<0>(&attached_blimp_contents))
- .RetiresOnSaturation();
-
- std::unique_ptr<BlimpContents> blimp_contents =
- blimp_client_context.CreateBlimpContents(window_);
- DCHECK(blimp_contents);
- DCHECK_EQ(blimp_contents.get(), attached_blimp_contents);
-}
-
-} // namespace
-} // namespace client
-} // namespace blimp
« no previous file with comments | « blimp/client/core/blimp_client_context_impl.cc ('k') | blimp/client/core/blimp_client_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698