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

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

Issue 2950713002: [DevTools] New harness for inspector-protocol layout tests (Closed)
Patch Set: addressed comments, 4 tests Created 3 years, 6 months 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_DEVTOOLS_PROTOCOL_TEST_BINDINGS_H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_DEVTOOLS_PROTOCOL_TEST_BINDINGS_H_
7
8 #include <memory>
9 #include <string>
10
11 #include "content/public/browser/devtools_agent_host_client.h"
12 #include "content/public/browser/web_contents_observer.h"
13 #include "url/gurl.h"
14
15 namespace content {
16
17 class DevToolsAgentHost;
18 class DevToolsFrontendHost;
19
20 class DevToolsProtocolTestBindings : public WebContentsObserver,
21 public DevToolsAgentHostClient {
22 public:
23 explicit DevToolsProtocolTestBindings(WebContents* devtools);
24 ~DevToolsProtocolTestBindings() override;
25 static GURL MapTestURLIfNeeded(const GURL& test_url, bool* is_protocol_test);
26
27 private:
28 // content::DevToolsAgentHostClient implementation.
29 void AgentHostClosed(DevToolsAgentHost* agent_host, bool replaced) override;
30 void DispatchProtocolMessage(DevToolsAgentHost* agent_host,
31 const std::string& message) override;
32
33 // WebContentsObserver overrides
34 void ReadyToCommitNavigation(NavigationHandle* navigation_handle) override;
35 void WebContentsDestroyed() override;
36
37 void HandleMessageFromTest(const std::string& message);
38
39 scoped_refptr<DevToolsAgentHost> agent_host_;
40 #if !defined(OS_ANDROID)
41 std::unique_ptr<DevToolsFrontendHost> frontend_host_;
42 #endif
43
44 DISALLOW_COPY_AND_ASSIGN(DevToolsProtocolTestBindings);
45 };
46
47 } // namespace content
48
49 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_DEVTOOLS_PROTOCOL_TEST_BINDINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698