Index: chrome/browser/dom_distiller/tab_utils_browsertest.cc |
diff --git a/chrome/browser/dom_distiller/tab_utils_browsertest.cc b/chrome/browser/dom_distiller/tab_utils_browsertest.cc |
index 1b48e427b4d3ff1b3fa564efce6d7eec7cc07830..677bf608a27796c320e8009fd4210fd309e07928 100644 |
--- a/chrome/browser/dom_distiller/tab_utils_browsertest.cc |
+++ b/chrome/browser/dom_distiller/tab_utils_browsertest.cc |
@@ -21,6 +21,7 @@ |
#include "content/public/browser/render_frame_host.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/browser/web_contents_observer.h" |
+#include "content/public/test/test_utils.h" |
#include "net/test/embedded_test_server/embedded_test_server.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -85,12 +86,15 @@ IN_PROC_BROWSER_TEST_F(DomDistillerTabUtilsBrowserTest, |
new_url_loaded_runner.QuitClosure())); |
new_url_loaded_runner.Run(); |
+ std::string page_title; |
+ content::ExecuteScriptAndGetValue(after_web_contents->GetMainFrame(), |
+ "document.title")->GetAsString(&page_title); |
+ |
// Verify the new URL is showing distilled content in a new WebContents. |
EXPECT_NE(initial_web_contents, after_web_contents); |
EXPECT_TRUE( |
after_web_contents->GetLastCommittedURL().SchemeIs(kDomDistillerScheme)); |
- EXPECT_EQ("Test Page Title", |
- base::UTF16ToUTF8(after_web_contents->GetTitle())); |
+ EXPECT_EQ("Test Page Title", page_title); |
} |
} // namespace dom_distiller |