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

Side by Side Diff: ash/test/ash_test_views_delegate.cc

Issue 2303453003: Revert of Moves ash content specific tests into ash_content_unittests (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « ash/test/ash_test_views_delegate.h ('k') | ash/test/content/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ash/test/ash_test_views_delegate.h" 5 #include "ash/test/ash_test_views_delegate.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "content/public/test/web_contents_tester.h"
8 9
9 namespace ash { 10 namespace ash {
10 namespace test { 11 namespace test {
11 12
12 AshTestViewsDelegate::AshTestViewsDelegate() {} 13 AshTestViewsDelegate::AshTestViewsDelegate() {}
13 14
14 AshTestViewsDelegate::~AshTestViewsDelegate() {} 15 AshTestViewsDelegate::~AshTestViewsDelegate() {}
15 16
17 content::WebContents* AshTestViewsDelegate::CreateWebContents(
18 content::BrowserContext* browser_context,
19 content::SiteInstance* site_instance) {
20 return content::WebContentsTester::CreateTestWebContents(browser_context,
21 site_instance);
22 }
23
16 void AshTestViewsDelegate::OnBeforeWidgetInit( 24 void AshTestViewsDelegate::OnBeforeWidgetInit(
17 views::Widget::InitParams* params, 25 views::Widget::InitParams* params,
18 views::internal::NativeWidgetDelegate* delegate) { 26 views::internal::NativeWidgetDelegate* delegate) {
19 TestViewsDelegate::OnBeforeWidgetInit(params, delegate); 27 TestViewsDelegate::OnBeforeWidgetInit(params, delegate);
20 28
21 if (!params->parent && !params->context && ash::Shell::HasInstance()) { 29 if (!params->parent && !params->context && ash::Shell::HasInstance()) {
22 // If the window has neither a parent nor a context add to the root. 30 // If the window has neither a parent nor a context add to the root.
23 params->parent = ash::Shell::GetInstance()->GetPrimaryRootWindow(); 31 params->parent = ash::Shell::GetInstance()->GetPrimaryRootWindow();
24 } 32 }
25 } 33 }
26 34
27 } // namespace test 35 } // namespace test
28 } // namespace ash 36 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_views_delegate.h ('k') | ash/test/content/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698