[go: nahoru, domu]

blob: 1009b6bdf3cbb42cdbd0b1c3bf57b4dac9a79b11 [file] [log] [blame]
// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ash/app_list/app_list_client_impl.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/test/browser_test.h"
// Interactive UI Test for AppListClientImpl that runs on all platforms
// supporting app_list. Interactive because the app list uses focus changes to
// dismiss itself, which will cause tests that check the visibility to fail
// flakily.
using AppListClientInteractiveTest = InProcessBrowserTest;
// Show the app list, then dismiss it.
IN_PROC_BROWSER_TEST_F(AppListClientInteractiveTest, ShowAndDismiss) {
AppListClientImpl* client = AppListClientImpl::GetInstance();
ASSERT_FALSE(client->app_list_visible());
client->ShowAppList(ash::AppListShowSource::kSearchKey);
ASSERT_TRUE(client->app_list_visible());
client->DismissView();
ASSERT_FALSE(client->app_list_target_visibility());
}