blob: 725ef3521f8b716bea48741736b7bad853a939d7 [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/macros.h"
namespace gfx {
class Size;
namespace ui {
class MenuModel;
namespace views {
class Combobox;
namespace test {
// A wrapper of Combobox to access private members for testing.
class ComboboxTestApi {
explicit ComboboxTestApi(Combobox* combobox) : combobox_(combobox) {}
// Activates the Combobox menu item at |index|, as if selected by the user.
void PerformActionAt(int index);
// Installs a testing views::MenuRunnerHandler to test when a menu should be
// shown. The test runner will immediately dismiss itself and increment the
// given |menu_show_count| by one.
void InstallTestMenuRunner(int* menu_show_count);
// Accessors for private data members of Combobox.
gfx::Size content_size();
ui::MenuModel* menu_model();
Combobox* combobox_;
} // namespace test
} // namespace views