| Index: chrome/browser/speech/speech_recognition_bubble_browsertest.cc
|
| diff --git a/chrome/browser/speech/speech_recognition_bubble_browsertest.cc b/chrome/browser/speech/speech_recognition_bubble_browsertest.cc
|
| index edc51601b26a66c55965607568c649acf55b22da..dcb35f4cec13f0405d4232d2f61b27e0103013af 100644
|
| --- a/chrome/browser/speech/speech_recognition_bubble_browsertest.cc
|
| +++ b/chrome/browser/speech/speech_recognition_bubble_browsertest.cc
|
| @@ -7,6 +7,9 @@
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/tabs/tab_strip_model.h"
|
| #include "chrome/test/base/in_process_browser_test.h"
|
| +#include "content/public/browser/render_process_host.h"
|
| +#include "content/public/browser/render_view_host.h"
|
| +#include "content/public/browser/web_contents.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "ui/gfx/rect.h"
|
|
|
| @@ -24,26 +27,35 @@ class SpeechRecognitionBubbleTest : public SpeechRecognitionBubbleDelegate,
|
|
|
| IN_PROC_BROWSER_TEST_F(SpeechRecognitionBubbleTest, CreateAndDestroy) {
|
| gfx::Rect element_rect(100, 100, 100, 100);
|
| + content::WebContents* web_contents =
|
| + browser()->tab_strip_model()->GetActiveWebContents();
|
| scoped_ptr<SpeechRecognitionBubble> bubble(SpeechRecognitionBubble::Create(
|
| - browser()->tab_strip_model()->GetActiveWebContents(),
|
| - this, element_rect));
|
| + web_contents->GetRenderProcessHost()->GetID(),
|
| + web_contents->GetRenderViewHost()->GetRoutingID(),
|
| + this, element_rect));
|
| EXPECT_TRUE(bubble.get());
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_F(SpeechRecognitionBubbleTest, ShowAndDestroy) {
|
| gfx::Rect element_rect(100, 100, 100, 100);
|
| + content::WebContents* web_contents =
|
| + browser()->tab_strip_model()->GetActiveWebContents();
|
| scoped_ptr<SpeechRecognitionBubble> bubble(SpeechRecognitionBubble::Create(
|
| - browser()->tab_strip_model()->GetActiveWebContents(),
|
| - this, element_rect));
|
| + web_contents->GetRenderProcessHost()->GetID(),
|
| + web_contents->GetRenderViewHost()->GetRoutingID(),
|
| + this, element_rect));
|
| EXPECT_TRUE(bubble.get());
|
| bubble->Show();
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_F(SpeechRecognitionBubbleTest, ShowAndHide) {
|
| gfx::Rect element_rect(100, 100, 100, 100);
|
| + content::WebContents* web_contents =
|
| + browser()->tab_strip_model()->GetActiveWebContents();
|
| scoped_ptr<SpeechRecognitionBubble> bubble(SpeechRecognitionBubble::Create(
|
| - browser()->tab_strip_model()->GetActiveWebContents(),
|
| - this, element_rect));
|
| + web_contents->GetRenderProcessHost()->GetID(),
|
| + web_contents->GetRenderViewHost()->GetRoutingID(),
|
| + this, element_rect));
|
| EXPECT_TRUE(bubble.get());
|
| bubble->Show();
|
| bubble->Hide();
|
| @@ -51,9 +63,12 @@ IN_PROC_BROWSER_TEST_F(SpeechRecognitionBubbleTest, ShowAndHide) {
|
|
|
| IN_PROC_BROWSER_TEST_F(SpeechRecognitionBubbleTest, ShowAndHideTwice) {
|
| gfx::Rect element_rect(100, 100, 100, 100);
|
| + content::WebContents* web_contents =
|
| + browser()->tab_strip_model()->GetActiveWebContents();
|
| scoped_ptr<SpeechRecognitionBubble> bubble(SpeechRecognitionBubble::Create(
|
| - browser()->tab_strip_model()->GetActiveWebContents(),
|
| - this, element_rect));
|
| + web_contents->GetRenderProcessHost()->GetID(),
|
| + web_contents->GetRenderViewHost()->GetRoutingID(),
|
| + this, element_rect));
|
| EXPECT_TRUE(bubble.get());
|
| bubble->Show();
|
| bubble->Hide();
|
|
|