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

Side by Side Diff: shell/shell_apptest.cc

Issue 981733002: Rename {In,OutOf}ProcessDynamicServiceRunner -> ...NativeRunner. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: remove incorrect/flaky NOTREACHED() Created 5 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 unified diff | Download patch
« no previous file with comments | « shell/out_of_process_native_runner.cc ('k') | shell/shell_test_base_unittest.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/base_paths.h" 5 #include "base/base_paths.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 ~ShellHTTPAppTest() override {} 78 ~ShellHTTPAppTest() override {}
79 79
80 protected: 80 protected:
81 // ApplicationTestBase: 81 // ApplicationTestBase:
82 void SetUp() override { 82 void SetUp() override {
83 ApplicationTestBase::SetUp(); 83 ApplicationTestBase::SetUp();
84 84
85 application_impl()->ConnectToService("mojo:http_server", 85 application_impl()->ConnectToService("mojo:http_server",
86 &http_server_factory_); 86 &http_server_factory_);
87 87
88 mojo::NetAddressPtr local_address(mojo::NetAddress::New()); 88 NetAddressPtr local_address(NetAddress::New());
89 local_address->family = mojo::NET_ADDRESS_FAMILY_IPV4; 89 local_address->family = NET_ADDRESS_FAMILY_IPV4;
90 local_address->ipv4 = mojo::NetAddressIPv4::New(); 90 local_address->ipv4 = NetAddressIPv4::New();
91 local_address->ipv4->addr.resize(4); 91 local_address->ipv4->addr.resize(4);
92 local_address->ipv4->addr[0] = 127; 92 local_address->ipv4->addr[0] = 127;
93 local_address->ipv4->addr[1] = 0; 93 local_address->ipv4->addr[1] = 0;
94 local_address->ipv4->addr[2] = 0; 94 local_address->ipv4->addr[2] = 0;
95 local_address->ipv4->addr[3] = 1; 95 local_address->ipv4->addr[3] = 1;
96 local_address->ipv4->port = 0; 96 local_address->ipv4->port = 0;
97 http_server_factory_->CreateHttpServer(GetProxy(&http_server_), 97 http_server_factory_->CreateHttpServer(GetProxy(&http_server_),
98 local_address.Pass()); 98 local_address.Pass());
99 99
100 http_server_->GetPort([this](uint16_t p) { port_ = p; }); 100 http_server_->GetPort([this](uint16_t p) { port_ = p; });
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 EXPECT_TRUE(EndsWith(app_url, "/pingable_app.mojo", true)); 199 EXPECT_TRUE(EndsWith(app_url, "/pingable_app.mojo", true));
200 EXPECT_EQ(app_url.To<std::string>() + "?foo", connection_url); 200 EXPECT_EQ(app_url.To<std::string>() + "?foo", connection_url);
201 EXPECT_EQ("hello", message); 201 EXPECT_EQ("hello", message);
202 base::MessageLoop::current()->Quit(); 202 base::MessageLoop::current()->Quit();
203 }; 203 };
204 pingable->Ping("hello", callback); 204 pingable->Ping("hello", callback);
205 base::RunLoop().Run(); 205 base::RunLoop().Run();
206 } 206 }
207 207
208 } // namespace mojo 208 } // namespace mojo
OLDNEW
« no previous file with comments | « shell/out_of_process_native_runner.cc ('k') | shell/shell_test_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698