Index: components/history/core/test/fake_web_history_service.cc |
diff --git a/components/history/core/test/fake_web_history_service.cc b/components/history/core/test/fake_web_history_service.cc |
index 8db715bf96c5d1b2270843ac03c8cb810a0a96e1..797338618950c3e76b02c54eaecaa1f647c83334 100644 |
--- a/components/history/core/test/fake_web_history_service.cc |
+++ b/components/history/core/test/fake_web_history_service.cc |
@@ -24,8 +24,9 @@ namespace { |
// TODO(msramek): Find a way to keep these URLs in sync with what is used |
// in WebHistoryService. |
-const char kLookupUrl[] = |
- "https://history.google.com/history/api/lookup"; |
+const char kLookupUrl[] = "https://history.google.com/history/api/lookup"; |
+ |
+const char kDeleteUrl[] = "https://history.google.com/history/api/delete"; |
const char kChromeClient[] = "chrome"; |
@@ -115,17 +116,19 @@ const std::string& FakeRequest::GetResponseBody() { |
for (int i = 0; i < count; ++i) |
response_body_ += i ? ", {}" : "{}"; |
response_body_ += "] }"; |
- } |
- // Web and app activity query. |
- if (base_url == GURL(kLookupUrl) && client == kWebAndAppClient) { |
+ // Deletion query. |
sky
2016/08/25 20:23:03
Having the comments above the conditional is weird
msramek
2016/08/25 21:13:48
Done.
|
+ } else if (base_url == GURL(kDeleteUrl) && client == kChromeClient) { |
+ response_body_ = "{ \"just needs to be\" : \"a valid JSON.\" }"; |
+ |
+ // Web and app activity query. |
+ } else if (base_url == GURL(kLookupUrl) && client == kWebAndAppClient) { |
response_body_ = base::StringPrintf( |
"{ \"history_recording_enabled\": %s }", |
service_->IsWebAndAppActivityEnabled() ? "true" : "false"); |
- } |
// Other forms of browsing history query. |
- if (url_.host() == kSyncServerHost) { |
+ } else if (url_.host() == kSyncServerHost) { |
std::unique_ptr<sync_pb::HistoryStatusResponse> history_status( |
new sync_pb::HistoryStatusResponse()); |
history_status->set_has_derived_data( |