OLD | NEW |
---|---|
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef CONTENT_BROWSER_SITE_PER_PROCESS_BROWSERTEST_H_ | 5 #ifndef CONTENT_BROWSER_SITE_PER_PROCESS_BROWSERTEST_H_ |
6 #define CONTENT_BROWSER_SITE_PER_PROCESS_BROWSERTEST_H_ | 6 #define CONTENT_BROWSER_SITE_PER_PROCESS_BROWSERTEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "content/browser/web_contents/web_contents_impl.h" | |
10 #include "content/public/test/content_browser_test.h" | 11 #include "content/public/test/content_browser_test.h" |
12 #include "content/shell/browser/shell.h" | |
EhsanK
2016/03/15 23:51:18
This was necessary for web_contents() to be define
Charlie Reis
2016/03/16 16:55:13
Yep, that's fine.
| |
11 #include "content/test/content_browser_test_utils_internal.h" | 13 #include "content/test/content_browser_test_utils_internal.h" |
12 #include "url/gurl.h" | 14 #include "url/gurl.h" |
13 | 15 |
14 namespace content { | 16 namespace content { |
15 | 17 |
16 class FrameTreeNode; | 18 class FrameTreeNode; |
17 class Shell; | 19 class Shell; |
20 class WebContentsImpl; | |
Charlie Reis
2016/03/16 16:55:13
nit: Don't need these 2 lines anymore.
EhsanK
2016/03/30 20:46:04
Done.
| |
18 | 21 |
19 class SitePerProcessBrowserTest : public ContentBrowserTest { | 22 class SitePerProcessBrowserTest : public ContentBrowserTest { |
20 public: | 23 public: |
21 SitePerProcessBrowserTest(); | 24 SitePerProcessBrowserTest(); |
22 | 25 |
23 protected: | 26 protected: |
24 std::string DepictFrameTree(FrameTreeNode* node); | 27 std::string DepictFrameTree(FrameTreeNode* node); |
25 | 28 |
26 void SetUpCommandLine(base::CommandLine* command_line) override; | 29 void SetUpCommandLine(base::CommandLine* command_line) override; |
27 void SetUpOnMainThread() override; | 30 void SetUpOnMainThread() override; |
28 | 31 |
32 WebContentsImpl* web_contents() { | |
33 return static_cast<WebContentsImpl*>(shell()->web_contents()); | |
34 } | |
35 | |
29 private: | 36 private: |
30 FrameTreeVisualizer visualizer_; | 37 FrameTreeVisualizer visualizer_; |
31 }; | 38 }; |
32 | 39 |
33 } // namespace content | 40 } // namespace content |
34 | 41 |
35 #endif // CONTENT_BROWSER_SITE_PER_PROCESS_BROWSERTEST_H_ | 42 #endif // CONTENT_BROWSER_SITE_PER_PROCESS_BROWSERTEST_H_ |
OLD | NEW |