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 124aaaff0347520a4521ac3c6f5920a31c686340..019d712a4643a83b9635bf27cd80e09f4f56d770 100644 |
--- a/chrome/browser/dom_distiller/tab_utils_browsertest.cc |
+++ b/chrome/browser/dom_distiller/tab_utils_browsertest.cc |
@@ -22,6 +22,7 @@ |
#include "content/public/browser/web_contents.h" |
#include "content/public/browser/web_contents_observer.h" |
#include "content/public/test/browser_test_utils.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" |
@@ -86,12 +87,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); |
} |
IN_PROC_BROWSER_TEST_F(DomDistillerTabUtilsBrowserTest, |