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

Unified Diff: chrome/browser/extensions/extension_startup_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
Index: chrome/browser/extensions/extension_startup_browsertest.cc
diff --git a/chrome/browser/extensions/extension_startup_browsertest.cc b/chrome/browser/extensions/extension_startup_browsertest.cc
index ce09e05883aba45fc991ddad3457c710335b6db3..f1984c59eef5bb5962e704e5815a28479020a807 100644
--- a/chrome/browser/extensions/extension_startup_browsertest.cc
+++ b/chrome/browser/extensions/extension_startup_browsertest.cc
@@ -126,19 +126,17 @@ class ExtensionStartupTestBase : public InProcessBrowserTest {
ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(test_file));
bool result = false;
- ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
- chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
- "",
+ ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
+ chrome::GetActiveWebContents(browser()),
"window.domAutomationController.send("
- "document.defaultView.getComputedStyle(document.body, null)."
- "getPropertyValue('background-color') == 'rgb(245, 245, 220)')",
+ " document.defaultView.getComputedStyle(document.body, null)."
+ " getPropertyValue('background-color') == 'rgb(245, 245, 220)')",
&result));
EXPECT_EQ(expect_css, result);
result = false;
- ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
- chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
- "",
+ ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
+ chrome::GetActiveWebContents(browser()),
"window.domAutomationController.send(document.title == 'Modified')",
&result));
EXPECT_EQ(expect_script, result);

Powered by Google App Engine
This is Rietveld 408576698