#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/extensions/extension_set.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/render_frame_host.h"
+#include "extensions/common/extension_set.h"
+#include "extensions/test/result_catcher.h"
#include "net/dns/mock_host_resolver.h"
namespace {
// InProcessBrowserTest override. Destroys the sync client and sync
// profile created by the test. We must clean up ProfileSyncServiceHarness
// now before the profile is cleaned up.
- virtual void CleanUpOnMainThread() OVERRIDE {
+ virtual void TearDownOnMainThread() OVERRIDE {
sync_setup_helper_.reset();
}
ASSERT_TRUE(installed_extensions->Contains(kTestExtensionId));
ResultCatcher catcher;
- catcher.RestrictToProfile(profile());
+ catcher.RestrictToBrowserContext(profile());
const Extension* extension =
extension_service()->extensions()->GetByID(kTestExtensionId);
const std::string& client_secret = sync_setup_helper()->client_secret();
const std::string& refresh_token = sync_setup_helper()->refresh_token();
- const string16& script_string = UTF8ToUTF16(base::StringPrintf(
+ const base::string16& script_string = base::UTF8ToUTF16(base::StringPrintf(
"startTestWithCredentials('%s', '%s', '%s');",
client_id.c_str(), client_secret.c_str(), refresh_token.c_str()));
- browser()->tab_strip_model()->GetActiveWebContents()->GetRenderViewHost()->
- ExecuteJavascriptInWebFrame(string16(), script_string);
+ browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame()->
+ ExecuteJavaScript(script_string);
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
}