OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "headless/test/headless_browser_test.h" | 5 #include "headless/test/headless_browser_test.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 #include "content/public/browser/render_process_host.h" | 12 #include "content/public/browser/render_process_host.h" |
13 #include "content/public/common/url_constants.h" | 13 #include "content/public/common/url_constants.h" |
14 #include "headless/lib/browser/headless_browser_impl.h" | 14 #include "headless/lib/browser/headless_browser_impl.h" |
15 #include "headless/lib/headless_content_main_delegate.h" | 15 #include "headless/lib/headless_content_main_delegate.h" |
16 #include "headless/public/domains/runtime.h" | 16 #include "headless/public/devtools/domains/runtime.h" |
17 #include "headless/public/headless_devtools_client.h" | 17 #include "headless/public/headless_devtools_client.h" |
18 #include "headless/public/headless_devtools_target.h" | 18 #include "headless/public/headless_devtools_target.h" |
19 #include "headless/public/headless_web_contents.h" | 19 #include "headless/public/headless_web_contents.h" |
20 #include "ui/gfx/geometry/size.h" | 20 #include "ui/gfx/geometry/size.h" |
21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
22 | 22 |
23 namespace headless { | 23 namespace headless { |
24 namespace { | 24 namespace { |
25 | 25 |
26 class SynchronousLoadObserver { | 26 class SynchronousLoadObserver { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 200 |
201 web_contents_->GetDevToolsTarget()->DetachClient(devtools_client_.get()); | 201 web_contents_->GetDevToolsTarget()->DetachClient(devtools_client_.get()); |
202 web_contents_->RemoveObserver(this); | 202 web_contents_->RemoveObserver(this); |
203 web_contents_->Close(); | 203 web_contents_->Close(); |
204 web_contents_ = nullptr; | 204 web_contents_ = nullptr; |
205 browser_context_->Close(); | 205 browser_context_->Close(); |
206 browser_context_ = nullptr; | 206 browser_context_ = nullptr; |
207 } | 207 } |
208 | 208 |
209 } // namespace headless | 209 } // namespace headless |
OLD | NEW |