Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(700)

Unified Diff: chrome/browser/ui/panels/panel_browsertest.cc

Issue 11753009: Simplify ExecuteJavaScript* functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update prerender_browsertest.cc. Created 7 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_host_browsertest.cc ('k') | chrome/browser/ui/pdf/pdf_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_browsertest.cc
diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc
index 2cf9b7738c32b2a55d4cfbc941b781d8ee39f007..cdbc11b5bce419d388b3ead1d890c0b1aaef3d3b 100644
--- a/chrome/browser/ui/panels/panel_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browsertest.cc
@@ -423,10 +423,8 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DISABLED_AutoResize) {
// Expand the test page. The resize will update the docked panel collection.
WaitForAutoResizeWider enlarge(panel);
- EXPECT_TRUE(content::ExecuteJavaScript(
- panel->GetWebContents()->GetRenderViewHost(),
- "",
- "changeSize(50);"));
+ EXPECT_TRUE(content::ExecuteScript(
+ panel->GetWebContents(), "changeSize(50);"));
enlarge.Wait();
gfx::Rect bounds_on_grow = panel->GetBounds();
EXPECT_GT(bounds_on_grow.width(), initial_bounds.width());
@@ -434,10 +432,8 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DISABLED_AutoResize) {
// Shrink the test page. The resize will update the docked panel collection.
WaitForAutoResizeNarrower shrink(panel);
- EXPECT_TRUE(content::ExecuteJavaScript(
- panel->GetWebContents()->GetRenderViewHost(),
- "",
- "changeSize(-30);"));
+ EXPECT_TRUE(content::ExecuteScript(
+ panel->GetWebContents(), "changeSize(-30);"));
shrink.Wait();
gfx::Rect bounds_on_shrink = panel->GetBounds();
EXPECT_LT(bounds_on_shrink.width(), bounds_on_grow.width());
@@ -1564,9 +1560,8 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest,
// Inject some HTML content into the panel.
WaitForAutoResizeWider enlarge(panel);
- EXPECT_TRUE(content::ExecuteJavaScript(
- panel->GetWebContents()->GetRenderViewHost(),
- "",
+ EXPECT_TRUE(content::ExecuteScript(
+ panel->GetWebContents(),
"document.body.innerHTML ="
" '<nobr>line of text and a <button>Button</button>';"));
enlarge.Wait();
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_host_browsertest.cc ('k') | chrome/browser/ui/pdf/pdf_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698