OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <tuple> | 10 #include <tuple> |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 RenderWidgetHostViewAura* render_widget_host_view, | 593 RenderWidgetHostViewAura* render_widget_host_view, |
594 std::unique_ptr<DelegatedFrameHostClient> delegated_frame_host_client) { | 594 std::unique_ptr<DelegatedFrameHostClient> delegated_frame_host_client) { |
595 render_widget_host_view->delegated_frame_host_client_ = | 595 render_widget_host_view->delegated_frame_host_client_ = |
596 std::move(delegated_frame_host_client); | 596 std::move(delegated_frame_host_client); |
597 } | 597 } |
598 | 598 |
599 void SetUpEnvironment() { | 599 void SetUpEnvironment() { |
600 ImageTransportFactory::InitializeForUnitTests( | 600 ImageTransportFactory::InitializeForUnitTests( |
601 std::unique_ptr<ImageTransportFactory>( | 601 std::unique_ptr<ImageTransportFactory>( |
602 new NoTransportImageTransportFactory)); | 602 new NoTransportImageTransportFactory)); |
603 aura_test_helper_.reset( | 603 aura_test_helper_.reset(new aura::test::AuraTestHelper()); |
604 new aura::test::AuraTestHelper(base::MessageLoopForUI::current())); | |
605 aura_test_helper_->SetUp( | 604 aura_test_helper_->SetUp( |
606 ImageTransportFactory::GetInstance()->GetContextFactory(), | 605 ImageTransportFactory::GetInstance()->GetContextFactory(), |
607 ImageTransportFactory::GetInstance()->GetContextFactoryPrivate()); | 606 ImageTransportFactory::GetInstance()->GetContextFactoryPrivate()); |
608 new wm::DefaultActivationClient(aura_test_helper_->root_window()); | 607 new wm::DefaultActivationClient(aura_test_helper_->root_window()); |
609 | 608 |
610 browser_context_.reset(new TestBrowserContext); | 609 browser_context_.reset(new TestBrowserContext); |
611 process_host_ = new MockRenderProcessHost(browser_context_.get()); | 610 process_host_ = new MockRenderProcessHost(browser_context_.get()); |
612 process_host_->Init(); | 611 process_host_->Init(); |
613 | 612 |
614 sink_ = &process_host_->sink(); | 613 sink_ = &process_host_->sink(); |
(...skipping 4878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5493 // There is no composition in the beginning. | 5492 // There is no composition in the beginning. |
5494 EXPECT_FALSE(has_composition_text()); | 5493 EXPECT_FALSE(has_composition_text()); |
5495 SetHasCompositionTextToTrue(); | 5494 SetHasCompositionTextToTrue(); |
5496 view->ImeCancelComposition(); | 5495 view->ImeCancelComposition(); |
5497 // The composition must have been canceled. | 5496 // The composition must have been canceled. |
5498 EXPECT_FALSE(has_composition_text()); | 5497 EXPECT_FALSE(has_composition_text()); |
5499 } | 5498 } |
5500 } | 5499 } |
5501 | 5500 |
5502 } // namespace content | 5501 } // namespace content |
OLD | NEW |