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: |