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

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

Issue 1408363004: [DevTools] Filter any messages from previous sessions in DevToolsAgentHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 293 }
294 294
295 private: 295 private:
296 scoped_ptr<MockKeyboard> mock_keyboard_; 296 scoped_ptr<MockKeyboard> mock_keyboard_;
297 }; 297 };
298 298
299 class DevToolsAgentTest : public RenderViewImplTest { 299 class DevToolsAgentTest : public RenderViewImplTest {
300 public: 300 public:
301 void Attach() { 301 void Attach() {
302 std::string host_id = "host_id"; 302 std::string host_id = "host_id";
303 agent()->OnAttach(host_id); 303 agent()->OnAttach(host_id, 17);
304 } 304 }
305 305
306 void Detach() { 306 void Detach() {
307 agent()->OnDetach(); 307 agent()->OnDetach();
308 } 308 }
309 309
310 bool IsPaused() { 310 bool IsPaused() {
311 return agent()->paused_; 311 return agent()->paused_;
312 } 312 }
313 313
314 void DispatchDevToolsMessage(const std::string& message) { 314 void DispatchDevToolsMessage(const std::string& message) {
315 agent()->OnDispatchOnInspectorBackend(message); 315 agent()->OnDispatchOnInspectorBackend(17, message);
316 } 316 }
317 317
318 void CloseWhilePaused() { 318 void CloseWhilePaused() {
319 EXPECT_TRUE(IsPaused()); 319 EXPECT_TRUE(IsPaused());
320 view()->NotifyOnClose(); 320 view()->NotifyOnClose();
321 } 321 }
322 322
323 private: 323 private:
324 DevToolsAgent* agent() { 324 DevToolsAgent* agent() {
325 return frame()->devtools_agent(); 325 return frame()->devtools_agent();
(...skipping 2028 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 FROM_HERE, 2354 FROM_HERE,
2355 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this))); 2355 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this)));
2356 ExecuteJavaScriptForTests("debugger;"); 2356 ExecuteJavaScriptForTests("debugger;");
2357 2357
2358 // CloseWhilePaused should resume execution and continue here. 2358 // CloseWhilePaused should resume execution and continue here.
2359 EXPECT_FALSE(IsPaused()); 2359 EXPECT_FALSE(IsPaused());
2360 Detach(); 2360 Detach();
2361 } 2361 }
2362 2362
2363 } // namespace content 2363 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/devtools/devtools_agent_filter.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