1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/translate/translate_bubble_test_utils.h"
7 #include "base/logging.h"
8 #include "chrome/browser/ui/translate/translate_bubble_model.h"
9 #include "chrome/browser/ui/views/translate/translate_bubble_view.h"
13 namespace test_utils
{
15 const TranslateBubbleModel
* GetCurrentModel(Browser
* browser
) {
17 TranslateBubbleView
* view
= TranslateBubbleView::GetCurrentBubble();
18 return view
? view
->model() : nullptr;
21 void PressTranslate(Browser
* browser
) {
23 TranslateBubbleView
* bubble
= TranslateBubbleView::GetCurrentBubble();
25 bubble
->HandleButtonPressed(TranslateBubbleView::BUTTON_ID_TRANSLATE
);
28 } // namespace test_utils
30 } // namespace translate