diff options
Diffstat (limited to 'chrome/browser/extensions/chrome_app_api_browsertest.cc')
-rw-r--r-- | chrome/browser/extensions/chrome_app_api_browsertest.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/extensions/chrome_app_api_browsertest.cc b/chrome/browser/extensions/chrome_app_api_browsertest.cc index 0374221..6ca7f9f 100644 --- a/chrome/browser/extensions/chrome_app_api_browsertest.cc +++ b/chrome/browser/extensions/chrome_app_api_browsertest.cc @@ -13,6 +13,7 @@ #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_tabstrip.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/manifest.h" @@ -32,7 +33,7 @@ class ChromeAppAPITest : public ExtensionBrowserTest { bool result; CHECK( ui_test_utils::ExecuteJavaScriptAndExtractBool( - browser()->GetActiveWebContents()->GetRenderViewHost(), + chrome::GetActiveWebContents(browser())->GetRenderViewHost(), frame_xpath, get_app_is_installed, &result)); return result; } @@ -45,7 +46,7 @@ class ChromeAppAPITest : public ExtensionBrowserTest { std::string result; CHECK( ui_test_utils::ExecuteJavaScriptAndExtractString( - browser()->GetActiveWebContents()->GetRenderViewHost(), + chrome::GetActiveWebContents(browser())->GetRenderViewHost(), frame_xpath, get_app_install_state, &result)); return result; } @@ -58,7 +59,7 @@ class ChromeAppAPITest : public ExtensionBrowserTest { std::string result; CHECK( ui_test_utils::ExecuteJavaScriptAndExtractString( - browser()->GetActiveWebContents()->GetRenderViewHost(), + chrome::GetActiveWebContents(browser())->GetRenderViewHost(), frame_xpath, get_app_install_state, &result)); return result; } @@ -112,7 +113,7 @@ IN_PROC_BROWSER_TEST_F(ChromeAppAPITest, IsInstalled) { std::string result; ASSERT_TRUE( ui_test_utils::ExecuteJavaScriptAndExtractString( - browser()->GetActiveWebContents()->GetRenderViewHost(), + chrome::GetActiveWebContents(browser())->GetRenderViewHost(), L"", get_app_details, &result)); EXPECT_EQ("null", result); @@ -125,7 +126,7 @@ IN_PROC_BROWSER_TEST_F(ChromeAppAPITest, IsInstalled) { ui_test_utils::NavigateToURL(browser(), app_url); ASSERT_TRUE( ui_test_utils::ExecuteJavaScriptAndExtractString( - browser()->GetActiveWebContents()->GetRenderViewHost(), + chrome::GetActiveWebContents(browser())->GetRenderViewHost(), L"", get_app_details, &result)); scoped_ptr<DictionaryValue> app_details( static_cast<DictionaryValue*>(base::JSONReader::Read(result))); @@ -138,7 +139,7 @@ IN_PROC_BROWSER_TEST_F(ChromeAppAPITest, IsInstalled) { // that isInstalled should have the initial value. ASSERT_TRUE( ui_test_utils::ExecuteJavaScriptAndExtractString( - browser()->GetActiveWebContents()->GetRenderViewHost(), + chrome::GetActiveWebContents(browser())->GetRenderViewHost(), L"", L"window.domAutomationController.send(" L" function() {" @@ -189,7 +190,7 @@ IN_PROC_BROWSER_TEST_F(ChromeAppAPITest, GetDetailsForFrame) { bool result = false; ASSERT_TRUE( ui_test_utils::ExecuteJavaScriptAndExtractBool( - browser()->GetActiveWebContents()->GetRenderViewHost(), + chrome::GetActiveWebContents(browser())->GetRenderViewHost(), L"", test_unsuccessful_access, &result)); EXPECT_TRUE(result); @@ -202,7 +203,7 @@ IN_PROC_BROWSER_TEST_F(ChromeAppAPITest, GetDetailsForFrame) { std::string json; ASSERT_TRUE( ui_test_utils::ExecuteJavaScriptAndExtractString( - browser()->GetActiveWebContents()->GetRenderViewHost(), + chrome::GetActiveWebContents(browser())->GetRenderViewHost(), L"", get_details_for_frame, &json)); scoped_ptr<DictionaryValue> app_details( |