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 <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "content/public/browser/render_widget_host_view.h" | 9 #include "content/public/browser/render_widget_host_view.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 } | 1004 } |
1005 | 1005 |
1006 bool OnProtocolMessage(const std::string& devtools_agent_host_id, | 1006 bool OnProtocolMessage(const std::string& devtools_agent_host_id, |
1007 const std::string& json_message, | 1007 const std::string& json_message, |
1008 const base::DictionaryValue& parsed_message) override { | 1008 const base::DictionaryValue& parsed_message) override { |
1009 EXPECT_EQ( | 1009 EXPECT_EQ( |
1010 "{\"id\":1,\"result\":{\"result\":{\"type\":\"number\"," | 1010 "{\"id\":1,\"result\":{\"result\":{\"type\":\"number\"," |
1011 "\"value\":2,\"description\":\"2\"}}}", | 1011 "\"value\":2,\"description\":\"2\"}}}", |
1012 json_message); | 1012 json_message); |
1013 | 1013 |
1014 int frame_tree_node_id = 0; | |
1015 EXPECT_TRUE(web_contents_->GetFrameTreeNodeIdForDevToolsAgentHostId( | |
1016 devtools_agent_host_id, &frame_tree_node_id)); | |
1017 EXPECT_NE(0, frame_tree_node_id); | |
1018 FinishAsynchronousTest(); | 1014 FinishAsynchronousTest(); |
1019 return true; | 1015 return true; |
1020 } | 1016 } |
1021 }; | 1017 }; |
1022 | 1018 |
1023 HEADLESS_ASYNC_DEVTOOLED_TEST_F(RawDevtoolsProtocolTest); | 1019 HEADLESS_ASYNC_DEVTOOLED_TEST_F(RawDevtoolsProtocolTest); |
1024 | 1020 |
1025 class DevToolsAttachAndDetachNotifications | 1021 class DevToolsAttachAndDetachNotifications |
1026 : public HeadlessAsyncDevTooledBrowserTest { | 1022 : public HeadlessAsyncDevTooledBrowserTest { |
1027 public: | 1023 public: |
(...skipping 11 matching lines...) Expand all Loading... |
1039 } | 1035 } |
1040 | 1036 |
1041 private: | 1037 private: |
1042 bool dev_tools_client_attached_ = false; | 1038 bool dev_tools_client_attached_ = false; |
1043 bool dev_tools_client_detached_ = false; | 1039 bool dev_tools_client_detached_ = false; |
1044 }; | 1040 }; |
1045 | 1041 |
1046 HEADLESS_ASYNC_DEVTOOLED_TEST_F(DevToolsAttachAndDetachNotifications); | 1042 HEADLESS_ASYNC_DEVTOOLED_TEST_F(DevToolsAttachAndDetachNotifications); |
1047 | 1043 |
1048 } // namespace headless | 1044 } // namespace headless |
OLD | NEW |