Commit e6f66033 authored by Weidong Guo's avatar Weidong Guo Committed by Commit Bot

Add unit tests for home launcher

BUG=835012

Change-Id: Ib59301c4ef4aece078daaa41aa3ce4fb0639e8c8
Reviewed-on: https://chromium-review.googlesource.com/1022710
Commit-Queue: Weidong Guo <weidongg@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552796}
parent 3bed2ab7
...@@ -1044,10 +1044,12 @@ void AppListView::OnTabletModeChanged(bool started) { ...@@ -1044,10 +1044,12 @@ void AppListView::OnTabletModeChanged(bool started) {
// Put app list window in corresponding container based on whether the // Put app list window in corresponding container based on whether the
// tablet mode is enabled. // tablet mode is enabled.
aura::Window* root_window = GetWidget()->GetNativeView()->GetRootWindow();
aura::Window* window = GetWidget()->GetNativeWindow(); aura::Window* window = GetWidget()->GetNativeWindow();
root_window->GetChildById(ash::kShellWindowId_AppListTabletModeContainer) aura::Window* root_window = window->GetRootWindow();
->AddChild(window); aura::Window* parent_window = root_window->GetChildById(
ash::kShellWindowId_AppListTabletModeContainer);
if (!parent_window->Contains(window))
parent_window->AddChild(window);
// Update background opacity. // Update background opacity.
app_list_background_shield_->layer()->SetOpacity( app_list_background_shield_->layer()->SetOpacity(
......
...@@ -233,6 +233,10 @@ class APP_LIST_EXPORT AppListView : public views::WidgetDelegateView, ...@@ -233,6 +233,10 @@ class APP_LIST_EXPORT AppListView : public views::WidgetDelegateView,
// Returns true if the home launcher is enabled in tablet mode. // Returns true if the home launcher is enabled in tablet mode.
bool IsHomeLauncherEnabledInTabletMode() const; bool IsHomeLauncherEnabledInTabletMode() const;
views::View* app_list_background_shield_for_test() {
return app_list_background_shield_;
}
private: private:
// A widget observer that is responsible for keeping the AppListView state up // A widget observer that is responsible for keeping the AppListView state up
// to date on closing. // to date on closing.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment