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

Unified Diff: components/web_restrictions/browser/web_restrictions_client_unittest.cc

Issue 1847523002: Avoid HTML in WebRestrictionsContentProvider interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to one more comment Created 4 years, 9 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
« no previous file with comments | « components/web_restrictions/browser/web_restrictions_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/web_restrictions/browser/web_restrictions_client_unittest.cc
diff --git a/components/web_restrictions/browser/web_restrictions_client_unittest.cc b/components/web_restrictions/browser/web_restrictions_client_unittest.cc
index 9b336781e17eeca6df1c77cb19f3f08ccd526188..df9782c42feb6607e4ef78344467e51e7a20c61a 100644
--- a/components/web_restrictions/browser/web_restrictions_client_unittest.cc
+++ b/components/web_restrictions/browser/web_restrictions_client_unittest.cc
@@ -45,6 +45,7 @@ TEST_F(WebRestrictionsClientTest, ShouldProceed) {
base::Bind(&ResultCallback, run_loop.QuitClosure())));
run_loop.Run();
EXPECT_TRUE(g_returned_result);
+ EXPECT_EQ(1, client_.GetResultColumnCount(GURL("http://example.com")));
}
// A repeated call should go to the cache and return a result immediately.
{
@@ -88,10 +89,12 @@ TEST_F(WebRestrictionsClientTest, ShouldProceed) {
base::Bind(&ResultCallback, run_loop.QuitClosure())));
run_loop.Run();
EXPECT_FALSE(g_returned_result);
- std::string error_html;
- EXPECT_TRUE(
- client_.GetErrorHtml(GURL("http://example.com/2"), &error_html));
- EXPECT_EQ("http://example.com/2", error_html);
+ EXPECT_EQ(3, client_.GetResultColumnCount(GURL("http://example.com/2")));
+ EXPECT_EQ(42, client_.GetResultIntValue(GURL("http://example.com/2"), 1));
+ EXPECT_EQ("Error string",
+ client_.GetResultColumnName(GURL("http://example.com/2"), 2));
+ EXPECT_EQ("http://example.com/2",
+ client_.GetResultStringValue(GURL("http://example.com/2"), 2));
}
}
« no previous file with comments | « components/web_restrictions/browser/web_restrictions_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698