| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 5 #include <string> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 response->set_content( | 82 response->set_content( |
| 83 "<html><head><title>LogPrivateTest</title>" | 83 "<html><head><title>LogPrivateTest</title>" |
| 84 "</head><body>Hello!</body></html>"); | 84 "</head><body>Hello!</body></html>"); |
| 85 return std::move(response); | 85 return std::move(response); |
| 86 } | 86 } |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 IN_PROC_BROWSER_TEST_F(LogPrivateApiTest, DumpLogsAndCaptureEvents) { | 89 IN_PROC_BROWSER_TEST_F(LogPrivateApiTest, DumpLogsAndCaptureEvents) { |
| 90 // Setup dummy HTTP server. | 90 // Setup dummy HTTP server. |
| 91 host_resolver()->AddRule("www.test.com", "127.0.0.1"); | 91 host_resolver()->AddRule("www.test.com", "127.0.0.1"); |
| 92 ASSERT_TRUE(StartEmbeddedTestServer()); | |
| 93 embedded_test_server()->RegisterRequestHandler( | 92 embedded_test_server()->RegisterRequestHandler( |
| 94 base::Bind(&LogPrivateApiTest::HandleRequest, base::Unretained(this))); | 93 base::Bind(&LogPrivateApiTest::HandleRequest, base::Unretained(this))); |
| 94 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 95 | 95 |
| 96 ASSERT_TRUE(RunExtensionTest("log_private/dump_logs")); | 96 ASSERT_TRUE(RunExtensionTest("log_private/dump_logs")); |
| 97 } | 97 } |
| 98 | 98 |
| 99 } // namespace extensions | 99 } // namespace extensions |
| OLD | NEW |