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

Unified Diff: chrome/browser/dom_distiller/tab_utils_browsertest.cc

Issue 1130703003: Show template before distiller finishes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios-superclass
Patch Set: escaped char check Created 5 years, 7 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/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

Powered by Google App Engine
This is Rietveld 408576698