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

Side by Side Diff: mojo/runner/shell_apptest.cc

Issue 1157573002: Revert "Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « mojo/environment/default_logger_impl.cc ('k') | mojo/services/network/http_server_apptest.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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 local_address->ipv4->addr.resize(4); 84 local_address->ipv4->addr.resize(4);
85 local_address->ipv4->addr[0] = 127; 85 local_address->ipv4->addr[0] = 127;
86 local_address->ipv4->addr[1] = 0; 86 local_address->ipv4->addr[1] = 0;
87 local_address->ipv4->addr[2] = 0; 87 local_address->ipv4->addr[2] = 0;
88 local_address->ipv4->addr[3] = 1; 88 local_address->ipv4->addr[3] = 1;
89 local_address->ipv4->port = 0; 89 local_address->ipv4->port = 0;
90 http_server_factory_->CreateHttpServer(GetProxy(&http_server_), 90 http_server_factory_->CreateHttpServer(GetProxy(&http_server_),
91 local_address.Pass()); 91 local_address.Pass());
92 92
93 http_server_->GetPort([this](uint16_t p) { port_ = p; }); 93 http_server_->GetPort([this](uint16_t p) { port_ = p; });
94 EXPECT_TRUE(http_server_.WaitForIncomingResponse()); 94 EXPECT_TRUE(http_server_.WaitForIncomingMethodCall());
95 95
96 InterfacePtr<http_server::HttpHandler> http_handler; 96 InterfacePtr<http_server::HttpHandler> http_handler;
97 handler_.reset(new GetHandler(GetProxy(&http_handler).Pass(), port_)); 97 handler_.reset(new GetHandler(GetProxy(&http_handler).Pass(), port_));
98 http_server_->SetHandler(".*", http_handler.Pass(), 98 http_server_->SetHandler(".*", http_handler.Pass(),
99 [](bool result) { EXPECT_TRUE(result); }); 99 [](bool result) { EXPECT_TRUE(result); });
100 EXPECT_TRUE(http_server_.WaitForIncomingResponse()); 100 EXPECT_TRUE(http_server_.WaitForIncomingMethodCall());
101 } 101 }
102 102
103 std::string GetURL(const std::string& path) { 103 std::string GetURL(const std::string& path) {
104 return ::mojo::GetURL(port_, path); 104 return ::mojo::GetURL(port_, path);
105 } 105 }
106 106
107 http_server::HttpServerFactoryPtr http_server_factory_; 107 http_server::HttpServerFactoryPtr http_server_factory_;
108 http_server::HttpServerPtr http_server_; 108 http_server::HttpServerPtr http_server_;
109 scoped_ptr<GetHandler> handler_; 109 scoped_ptr<GetHandler> handler_;
110 uint16_t port_; 110 uint16_t port_;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 EXPECT_EQ(app_url.To<std::string>() + "?foo", connection_url); 188 EXPECT_EQ(app_url.To<std::string>() + "?foo", connection_url);
189 EXPECT_EQ("hello", message); 189 EXPECT_EQ("hello", message);
190 base::MessageLoop::current()->Quit(); 190 base::MessageLoop::current()->Quit();
191 }; 191 };
192 pingable->Ping("hello", callback); 192 pingable->Ping("hello", callback);
193 base::RunLoop().Run(); 193 base::RunLoop().Run();
194 } 194 }
195 195
196 } // namespace 196 } // namespace
197 } // namespace mojo 197 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/environment/default_logger_impl.cc ('k') | mojo/services/network/http_server_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698