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

Side by Side Diff: services/url_response_disk_cache/url_response_disk_cache_apptest.cc

Issue 1916233002: Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « services/ui/view_manager/view_manager_app.cc ('k') | shell/android/android_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/files/file_util.h" 5 #include "base/files/file_util.h"
6 #include "base/rand_util.h" 6 #include "base/rand_util.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "mojo/public/cpp/application/application_impl.h" 9 #include "mojo/public/cpp/application/application_impl.h"
10 #include "mojo/public/cpp/application/application_test_base.h" 10 #include "mojo/public/cpp/application/application_test_base.h"
11 #include "mojo/public/cpp/system/data_pipe.h" 11 #include "mojo/public/cpp/system/data_pipe.h"
12 #include "mojo/services/network/interfaces/url_loader.mojom.h" 12 #include "mojo/services/network/interfaces/url_loader.mojom.h"
13 #include "mojo/services/url_response_disk_cache/interfaces/url_response_disk_cac he.mojom.h" 13 #include "mojo/services/url_response_disk_cache/interfaces/url_response_disk_cac he.mojom.h"
14 #include "services/url_response_disk_cache/kTestData.h" 14 #include "services/url_response_disk_cache/kTestData.h"
15 15
16 namespace mojo { 16 namespace mojo {
17 17
18 namespace { 18 namespace {
19 19
20 class URLResponseDiskCacheAppTest : public mojo::test::ApplicationTestBase { 20 class URLResponseDiskCacheAppTest : public mojo::test::ApplicationTestBase {
21 public: 21 public:
22 URLResponseDiskCacheAppTest() : ApplicationTestBase() {} 22 URLResponseDiskCacheAppTest() : ApplicationTestBase() {}
23 ~URLResponseDiskCacheAppTest() override {} 23 ~URLResponseDiskCacheAppTest() override {}
24 24
25 void SetUp() override { 25 void SetUp() override {
26 mojo::test::ApplicationTestBase::SetUp(); 26 mojo::test::ApplicationTestBase::SetUp();
27 application_impl()->ConnectToService("mojo:url_response_disk_cache", 27 application_impl()->ConnectToServiceDeprecated(
28 &url_response_disk_cache_); 28 "mojo:url_response_disk_cache", &url_response_disk_cache_);
29 } 29 }
30 30
31 protected: 31 protected:
32 URLResponseDiskCachePtr url_response_disk_cache_; 32 URLResponseDiskCachePtr url_response_disk_cache_;
33 33
34 DISALLOW_COPY_AND_ASSIGN(URLResponseDiskCacheAppTest); 34 DISALLOW_COPY_AND_ASSIGN(URLResponseDiskCacheAppTest);
35 }; 35 };
36 36
37 base::FilePath toPath(Array<uint8_t> path) { 37 base::FilePath toPath(Array<uint8_t> path) {
38 if (path.is_null()) { 38 if (path.is_null()) {
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 }); 321 });
322 url_response_disk_cache_.WaitForIncomingResponse(); 322 url_response_disk_cache_.WaitForIncomingResponse();
323 ASSERT_FALSE(file.empty()); 323 ASSERT_FALSE(file.empty());
324 ASSERT_TRUE(base::ReadFileToString(file, &received_content)); 324 ASSERT_TRUE(base::ReadFileToString(file, &received_content));
325 EXPECT_EQ(new_content, received_content); 325 EXPECT_EQ(new_content, received_content);
326 saved_file = cache_dir.Append("file"); 326 saved_file = cache_dir.Append("file");
327 EXPECT_FALSE(base::PathExists(saved_file)); 327 EXPECT_FALSE(base::PathExists(saved_file));
328 } 328 }
329 329
330 } // namespace mojo 330 } // namespace mojo
OLDNEW
« no previous file with comments | « services/ui/view_manager/view_manager_app.cc ('k') | shell/android/android_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698