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

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 2858043003: [DevTools] Pass session id in detach request (Closed)
Patch Set: test compile Created 3 years, 7 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <tuple> 7 #include <tuple>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 notifications_ = std::vector<std::string>(); 417 notifications_ = std::vector<std::string>();
418 expecting_pause_ = false; 418 expecting_pause_ = false;
419 std::string host_id = "host_id"; 419 std::string host_id = "host_id";
420 agent()->OnAttach(host_id, 17); 420 agent()->OnAttach(host_id, 17);
421 agent()->send_protocol_message_callback_for_test_ = base::Bind( 421 agent()->send_protocol_message_callback_for_test_ = base::Bind(
422 &DevToolsAgentTest::OnDevToolsMessage, base::Unretained(this)); 422 &DevToolsAgentTest::OnDevToolsMessage, base::Unretained(this));
423 } 423 }
424 424
425 void Detach() { 425 void Detach() {
426 agent()->send_protocol_message_callback_for_test_.Reset(); 426 agent()->send_protocol_message_callback_for_test_.Reset();
427 agent()->OnDetach(); 427 agent()->DetachAllSessions();
428 } 428 }
429 429
430 bool IsPaused() { 430 bool IsPaused() {
431 return agent()->paused_; 431 return agent()->paused_;
432 } 432 }
433 433
434 void DispatchDevToolsMessage(const std::string& method, 434 void DispatchDevToolsMessage(const std::string& method,
435 const std::string& message) { 435 const std::string& message) {
436 agent()->OnDispatchOnInspectorBackend(17, 1, method, message); 436 agent()->OnDispatchOnInspectorBackend(17, 1, method, message);
437 } 437 }
(...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2590 ExpectPauseAndResume(3); 2590 ExpectPauseAndResume(3);
2591 blink::WebScriptSource source2( 2591 blink::WebScriptSource source2(
2592 WebString::FromUTF8("function func2() { func1(); }; func2();")); 2592 WebString::FromUTF8("function func2() { func1(); }; func2();"));
2593 frame()->GetWebFrame()->ExecuteScriptInIsolatedWorld(17, &source2, 1); 2593 frame()->GetWebFrame()->ExecuteScriptInIsolatedWorld(17, &source2, 1);
2594 2594
2595 EXPECT_FALSE(IsPaused()); 2595 EXPECT_FALSE(IsPaused());
2596 Detach(); 2596 Detach();
2597 } 2597 }
2598 2598
2599 } // namespace content 2599 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/service_worker/embedded_worker_devtools_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698