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

Side by Side Diff: content/shell/browser/layout_test/layout_test_devtools_frontend.h

Issue 2513423003: DevTools: Convert inspector-unit tests to use reusable test harness (Closed)
Patch Set: Moved type definition out of externs Created 4 years 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
OLDNEW
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 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_ 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_ 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "content/shell/browser/shell_devtools_frontend.h" 10 #include "content/shell/browser/shell_devtools_frontend.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 class Shell; 14 class Shell;
15 class WebContents; 15 class WebContents;
16 16
17 class LayoutTestDevToolsFrontend : public ShellDevToolsFrontend { 17 class LayoutTestDevToolsFrontend : public ShellDevToolsFrontend {
18 public: 18 public:
19 static LayoutTestDevToolsFrontend* Show(WebContents* inspected_contents, 19 static LayoutTestDevToolsFrontend* Show(WebContents* inspected_contents,
20 const std::string& settings, 20 const std::string& settings,
21 const std::string& frontend_url); 21 const std::string& frontend_url);
22 22
23 static GURL GetDevToolsPathAsURL(const std::string& frontend_url); 23 static GURL GetDevToolsPathAsURL(const std::string& frontend_url);
24 24
25 static GURL MapJSTestURL(const GURL& test_url);
26
25 void ReuseFrontend(const std::string& settings, 27 void ReuseFrontend(const std::string& settings,
26 const std::string frontend_url); 28 const std::string frontend_url);
27 void EvaluateInFrontend(int call_id, const std::string& expression); 29 void EvaluateInFrontend(int call_id, const std::string& expression);
28 30
29 private: 31 private:
30 LayoutTestDevToolsFrontend(Shell* frontend_shell, 32 LayoutTestDevToolsFrontend(Shell* frontend_shell,
31 WebContents* inspected_contents); 33 WebContents* inspected_contents);
32 ~LayoutTestDevToolsFrontend() override; 34 ~LayoutTestDevToolsFrontend() override;
33 35
34 // content::DevToolsAgentHostClient implementation. 36 // content::DevToolsAgentHostClient implementation.
35 void AgentHostClosed(DevToolsAgentHost* agent_host, bool replaced) override; 37 void AgentHostClosed(DevToolsAgentHost* agent_host, bool replaced) override;
36 38
37 // ShellDevToolsFrontend overrides. 39 // ShellDevToolsFrontend overrides.
38 void HandleMessageFromDevToolsFrontend(const std::string& message) override; 40 void HandleMessageFromDevToolsFrontend(const std::string& message) override;
39 41
40 // WebContentsObserver implementation. 42 // WebContentsObserver implementation.
41 void RenderProcessGone(base::TerminationStatus status) override; 43 void RenderProcessGone(base::TerminationStatus status) override;
42 void RenderFrameCreated(RenderFrameHost* render_frame_host) override; 44 void RenderFrameCreated(RenderFrameHost* render_frame_host) override;
43 45
44 bool ready_for_test_; 46 bool ready_for_test_;
45 std::vector<std::pair<int, std::string>> pending_evaluations_; 47 std::vector<std::pair<int, std::string>> pending_evaluations_;
46 48
47 DISALLOW_COPY_AND_ASSIGN(LayoutTestDevToolsFrontend); 49 DISALLOW_COPY_AND_ASSIGN(LayoutTestDevToolsFrontend);
48 }; 50 };
49 51
50 } // namespace content 52 } // namespace content
51 53
52 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_ 54 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698