| 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 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1015     EXPECT_TRUE(web_contents_->GetFrameTreeNodeIdForDevToolsAgentHostId( | 1015     EXPECT_TRUE(web_contents_->GetFrameTreeNodeIdForDevToolsAgentHostId( | 
| 1016         devtools_agent_host_id, &frame_tree_node_id)); | 1016         devtools_agent_host_id, &frame_tree_node_id)); | 
| 1017     EXPECT_NE(0, frame_tree_node_id); | 1017     EXPECT_NE(0, frame_tree_node_id); | 
| 1018     FinishAsynchronousTest(); | 1018     FinishAsynchronousTest(); | 
| 1019     return true; | 1019     return true; | 
| 1020   } | 1020   } | 
| 1021 }; | 1021 }; | 
| 1022 | 1022 | 
| 1023 HEADLESS_ASYNC_DEVTOOLED_TEST_F(RawDevtoolsProtocolTest); | 1023 HEADLESS_ASYNC_DEVTOOLED_TEST_F(RawDevtoolsProtocolTest); | 
| 1024 | 1024 | 
|  | 1025 class DevToolsAttachAndDetachNotifications | 
|  | 1026     : public HeadlessAsyncDevTooledBrowserTest { | 
|  | 1027  public: | 
|  | 1028   void DevToolsClientAttached() override { dev_tools_client_attached_ = true; } | 
|  | 1029 | 
|  | 1030   void RunDevTooledTest() override { | 
|  | 1031     EXPECT_TRUE(dev_tools_client_attached_); | 
|  | 1032     FinishAsynchronousTest(); | 
|  | 1033   } | 
|  | 1034 | 
|  | 1035   void DevToolsClientDetached() override { dev_tools_client_detached_ = true; } | 
|  | 1036 | 
|  | 1037   void TearDownOnMainThread() override { | 
|  | 1038     EXPECT_TRUE(dev_tools_client_detached_); | 
|  | 1039   } | 
|  | 1040 | 
|  | 1041  private: | 
|  | 1042   bool dev_tools_client_attached_ = false; | 
|  | 1043   bool dev_tools_client_detached_ = false; | 
|  | 1044 }; | 
|  | 1045 | 
|  | 1046 HEADLESS_ASYNC_DEVTOOLED_TEST_F(DevToolsAttachAndDetachNotifications); | 
|  | 1047 | 
| 1025 }  // namespace headless | 1048 }  // namespace headless | 
| OLD | NEW | 
|---|