| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/scoped_ptr.h" | 5 #include "base/scoped_ptr.h" |
| 6 #include "chrome/browser/speech/speech_input_bubble.h" | 6 #include "chrome/browser/speech/speech_input_bubble.h" |
| 7 #include "chrome/browser/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/test/in_process_browser_test.h" | 8 #include "chrome/test/in_process_browser_test.h" |
| 9 #include "gfx/rect.h" | 9 #include "gfx/rect.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 class SpeechInputBubbleTest : public SpeechInputBubbleDelegate, | 12 class SpeechInputBubbleTest : public SpeechInputBubbleDelegate, |
| 13 public InProcessBrowserTest { | 13 public InProcessBrowserTest { |
| 14 public: | 14 public: |
| 15 // SpeechInputBubble::Delegate methods. | 15 // SpeechInputBubble::Delegate methods. |
| 16 virtual void InfoBubbleButtonClicked(SpeechInputBubble::Button button) {} | 16 virtual void InfoBubbleButtonClicked(SpeechInputBubble::Button button) {} |
| 17 virtual void InfoBubbleFocusChanged() {} | 17 virtual void InfoBubbleFocusChanged() {} |
| (...skipping 28 matching lines...) Expand all Loading... |
| 46 IN_PROC_BROWSER_TEST_F(SpeechInputBubbleTest, ShowAndHideTwice) { | 46 IN_PROC_BROWSER_TEST_F(SpeechInputBubbleTest, ShowAndHideTwice) { |
| 47 gfx::Rect element_rect(100, 100, 100, 100); | 47 gfx::Rect element_rect(100, 100, 100, 100); |
| 48 scoped_ptr<SpeechInputBubble> bubble(SpeechInputBubble::Create( | 48 scoped_ptr<SpeechInputBubble> bubble(SpeechInputBubble::Create( |
| 49 browser()->GetSelectedTabContents(), this, element_rect)); | 49 browser()->GetSelectedTabContents(), this, element_rect)); |
| 50 EXPECT_TRUE(bubble.get()); | 50 EXPECT_TRUE(bubble.get()); |
| 51 bubble->Show(); | 51 bubble->Show(); |
| 52 bubble->Hide(); | 52 bubble->Hide(); |
| 53 bubble->Show(); | 53 bubble->Show(); |
| 54 bubble->Hide(); | 54 bubble->Hide(); |
| 55 } | 55 } |
| OLD | NEW |