OLD | NEW |
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 "mojo/shell/fetcher/about_fetcher.h" | 5 #include "mojo/shell/fetcher/about_fetcher.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/at_exit.h" | 11 #include "base/at_exit.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "mojo/application/public/cpp/application_connection.h" | |
18 #include "mojo/application/public/cpp/application_delegate.h" | |
19 #include "mojo/application/public/cpp/application_impl.h" | |
20 #include "mojo/application/public/cpp/interface_factory.h" | |
21 #include "mojo/application/public/interfaces/content_handler.mojom.h" | |
22 #include "mojo/common/weak_binding_set.h" | 17 #include "mojo/common/weak_binding_set.h" |
23 #include "mojo/shell/application_loader.h" | 18 #include "mojo/shell/application_loader.h" |
24 #include "mojo/shell/application_manager.h" | 19 #include "mojo/shell/application_manager.h" |
25 #include "mojo/shell/package_manager/package_manager_impl.h" | 20 #include "mojo/shell/package_manager/package_manager_impl.h" |
| 21 #include "mojo/shell/public/cpp/application_connection.h" |
| 22 #include "mojo/shell/public/cpp/application_delegate.h" |
| 23 #include "mojo/shell/public/cpp/application_impl.h" |
| 24 #include "mojo/shell/public/cpp/interface_factory.h" |
| 25 #include "mojo/shell/public/interfaces/content_handler.mojom.h" |
26 #include "mojo/util/filename_util.h" | 26 #include "mojo/util/filename_util.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
28 | 28 |
29 namespace mojo { | 29 namespace mojo { |
30 namespace shell { | 30 namespace shell { |
31 namespace { | 31 namespace { |
32 | 32 |
33 class TestContentHandler : public ApplicationDelegate, | 33 class TestContentHandler : public ApplicationDelegate, |
34 public InterfaceFactory<ContentHandler>, | 34 public InterfaceFactory<ContentHandler>, |
35 public ContentHandler { | 35 public ContentHandler { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 const URLResponse* response = html_content_handler()->latest_response(); | 172 const URLResponse* response = html_content_handler()->latest_response(); |
173 EXPECT_EQ("about:some_unrecognized_url", response->url); | 173 EXPECT_EQ("about:some_unrecognized_url", response->url); |
174 EXPECT_EQ(404u, response->status_code); | 174 EXPECT_EQ(404u, response->status_code); |
175 EXPECT_EQ("text/html", response->mime_type); | 175 EXPECT_EQ("text/html", response->mime_type); |
176 EXPECT_FALSE(response->body.is_valid()); | 176 EXPECT_FALSE(response->body.is_valid()); |
177 } | 177 } |
178 | 178 |
179 } // namespace | 179 } // namespace |
180 } // namespace shell | 180 } // namespace shell |
181 } // namespace mojo | 181 } // namespace mojo |
OLD | NEW |