#include "base/strings/utf_string_conversions.h"
#include "ui/events/event.h"
#include "ui/views/controls/button/label_button.h"
-#include "ui/views/focus/accelerator_handler.h"
#include "ui/views/focus/focus_manager_test.h"
#include "ui/views/widget/widget.h"
// First send a non-accelerator key sequence.
PostKeyDown(ui::VKEY_9);
PostKeyUp(ui::VKEY_9);
- AcceleratorHandler accelerator_handler;
- scoped_ptr<base::RunLoop> run_loop(new base::RunLoop(&accelerator_handler));
+ scoped_ptr<base::RunLoop> run_loop(new base::RunLoop());
run_loop->RunUntilIdle();
// Make sure we get a key-up and key-down.
ASSERT_EQ(1U, mtv->keys_pressed().size());
PostKeyUp(ui::VKEY_9);
PostKeyUp(ui::VKEY_7);
PostKeyUp(ui::VKEY_8);
- run_loop.reset(new base::RunLoop(&accelerator_handler));
+ run_loop.reset(new base::RunLoop());
run_loop->RunUntilIdle();
// Make sure we get a key-up and key-down.
ASSERT_EQ(5U, mtv->keys_pressed().size());
// Now send an accelerator key sequence.
PostKeyDown(ui::VKEY_0);
PostKeyUp(ui::VKEY_0);
- run_loop.reset(new base::RunLoop(&accelerator_handler));
+ run_loop.reset(new base::RunLoop());
run_loop->RunUntilIdle();
EXPECT_TRUE(mtv->keys_pressed().empty());
EXPECT_TRUE(mtv->keys_released().empty());
PostKeyDown(ui::VKEY_0);
PostKeyUp(ui::VKEY_1);
PostKeyUp(ui::VKEY_0);
- run_loop.reset(new base::RunLoop(&accelerator_handler));
+ run_loop.reset(new base::RunLoop());
run_loop->RunUntilIdle();
EXPECT_TRUE(mtv->keys_pressed().empty());
EXPECT_TRUE(mtv->keys_released().empty());