diff options
Diffstat (limited to 'chromium/content/browser/bookmarklet_browsertest.cc')
-rw-r--r-- | chromium/content/browser/bookmarklet_browsertest.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/chromium/content/browser/bookmarklet_browsertest.cc b/chromium/content/browser/bookmarklet_browsertest.cc index 027f338bee4..ed52980cf43 100644 --- a/chromium/content/browser/bookmarklet_browsertest.cc +++ b/chromium/content/browser/bookmarklet_browsertest.cc @@ -4,6 +4,7 @@ #include "base/strings/string_util.h" #include "content/public/browser/web_contents.h" +#include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/content_browser_test.h" #include "content/public/test/content_browser_test_utils.h" @@ -24,13 +25,8 @@ class BookmarkletTest : public ContentBrowserTest { EXPECT_EQ("start page", GetBodyText()); } - std::string GetBodyText() { - std::string body_text; - EXPECT_TRUE(ExecuteScriptAndExtractString( - shell(), - "window.domAutomationController.send(document.body.innerText);", - &body_text)); - return body_text; + content::EvalJsResult GetBodyText() { + return EvalJs(shell(), "document.body.innerText"); } }; |