OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/content/display/screen_orientation_controller_chromeos.h" | 8 #include "ash/content/display/screen_orientation_controller_chromeos.h" |
9 #include "ash/display/display_info.h" | 9 #include "ash/display/display_info.h" |
10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 }; | 128 }; |
129 | 129 |
130 ScreenOrientationControllerTest::ScreenOrientationControllerTest() { | 130 ScreenOrientationControllerTest::ScreenOrientationControllerTest() { |
131 webview_test_helper_.reset(new views::WebViewTestHelper()); | 131 webview_test_helper_.reset(new views::WebViewTestHelper()); |
132 } | 132 } |
133 | 133 |
134 ScreenOrientationControllerTest::~ScreenOrientationControllerTest() { | 134 ScreenOrientationControllerTest::~ScreenOrientationControllerTest() { |
135 } | 135 } |
136 | 136 |
137 content::WebContents* ScreenOrientationControllerTest::CreateWebContents() { | 137 content::WebContents* ScreenOrientationControllerTest::CreateWebContents() { |
138 return views::ViewsDelegate::views_delegate->CreateWebContents( | 138 return views::ViewsDelegate::GetInstance()->CreateWebContents( |
139 ash_test_helper()->test_shell_delegate()->GetActiveBrowserContext(), | 139 ash_test_helper()->test_shell_delegate()->GetActiveBrowserContext(), |
140 nullptr); | 140 nullptr); |
141 } | 141 } |
142 | 142 |
143 content::WebContents* | 143 content::WebContents* |
144 ScreenOrientationControllerTest::CreateSecondaryWebContents() { | 144 ScreenOrientationControllerTest::CreateSecondaryWebContents() { |
145 secondary_browser_context_.reset(new content::TestBrowserContext()); | 145 secondary_browser_context_.reset(new content::TestBrowserContext()); |
146 return views::ViewsDelegate::views_delegate->CreateWebContents( | 146 return views::ViewsDelegate::GetInstance()->CreateWebContents( |
147 secondary_browser_context_.get(), nullptr); | 147 secondary_browser_context_.get(), nullptr); |
148 } | 148 } |
149 | 149 |
150 void ScreenOrientationControllerTest::SetUp() { | 150 void ScreenOrientationControllerTest::SetUp() { |
151 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 151 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
152 switches::kAshUseFirstDisplayAsInternal); | 152 switches::kAshUseFirstDisplayAsInternal); |
153 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 153 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
154 switches::kAshEnableTouchViewTesting); | 154 switches::kAshEnableTouchViewTesting); |
155 test::AshTestBase::SetUp(); | 155 test::AshTestBase::SetUp(); |
156 screen_orientation_controller_ = | 156 screen_orientation_controller_ = |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 gfx::Display::ROTATION_SOURCE_ACTIVE); | 642 gfx::Display::ROTATION_SOURCE_ACTIVE); |
643 | 643 |
644 // TODO(bruthig): Uncomment when www.crbug.com/480703 is fixed. This test | 644 // TODO(bruthig): Uncomment when www.crbug.com/480703 is fixed. This test |
645 // still adds value by ensuring a crash does not occur. See | 645 // still adds value by ensuring a crash does not occur. See |
646 // www.crbug.com/479503. | 646 // www.crbug.com/479503. |
647 // ASSERT_EQ(kNewRotation, display_manager->GetDisplayInfo(kInternalDisplayId) | 647 // ASSERT_EQ(kNewRotation, display_manager->GetDisplayInfo(kInternalDisplayId) |
648 // .GetActiveRotation()); | 648 // .GetActiveRotation()); |
649 } | 649 } |
650 | 650 |
651 } // namespace ash | 651 } // namespace ash |
OLD | NEW |