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

Unified Diff: chrome/browser/local_discovery/privet_http_unittest.cc

Issue 138983002: Added privet storage list operation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « chrome/browser/local_discovery/privet_http_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/local_discovery/privet_http_unittest.cc
diff --git a/chrome/browser/local_discovery/privet_http_unittest.cc b/chrome/browser/local_discovery/privet_http_unittest.cc
index 92331093cfd0f167ebc3e381b1ca405709c671fb..1a6ccbfb7d96adaa0574d117f1a54a812ca38974 100644
--- a/chrome/browser/local_discovery/privet_http_unittest.cc
+++ b/chrome/browser/local_discovery/privet_http_unittest.cc
@@ -183,6 +183,8 @@ const char kSampleInvalidDocumentTypeResponse[] = "{"
const char kSampleCreatejobResponse[] = "{ \"job_id\": \"1234\" }";
+const char kSampleEmptyJSONResponse[] = "{}";
+
class MockTestURLFetcherFactoryDelegate
: public net::TestURLFetcher::DelegateForTests {
public:
@@ -391,6 +393,23 @@ class FakePWGRasterConverter : public PWGRasterConverter {
}
};
+TEST_F(PrivetHTTPTest, CreatePrivetStorageList) {
+ MockJSONCallback mock_callback;
+ scoped_ptr<PrivetJSONOperation> storage_list_operation =
+ privet_client_->CreateStorageListOperation(
+ "/path/to/nothing",
+ mock_callback.callback());
+ storage_list_operation->Start();
+
+ EXPECT_TRUE(SuccessfulResponseToURL(GURL("http://10.0.0.8:6006/privet/info"),
+ kSampleInfoResponse));
+
+ EXPECT_CALL(mock_callback, OnPrivetJSONDoneInternal());
+
+ EXPECT_TRUE(SuccessfulResponseToURL(
+ GURL("http://10.0.0.8:6006/privet/storage/list?path=/path/to/nothing"),
+ kSampleEmptyJSONResponse));
+}
class PrivetInfoTest : public PrivetHTTPTest {
public:
« no previous file with comments | « chrome/browser/local_discovery/privet_http_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698