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

Side by Side Diff: chrome/test/chromedriver/chrome/heap_snapshot_taker_unittest.cc

Issue 637933002: Replace FINAL and OVERRIDE with their C++11 counterparts in chrome/test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <list> 5 #include <list>
6 #include <string> 6 #include <string>
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/test/chromedriver/chrome/heap_snapshot_taker.h" 10 #include "chrome/test/chromedriver/chrome/heap_snapshot_taker.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 Status status = listeners_.front()->OnEvent( 42 Status status = listeners_.front()->OnEvent(
43 this, "HeapProfiler.addHeapSnapshotChunk", event_params); 43 this, "HeapProfiler.addHeapSnapshotChunk", event_params);
44 if (status.IsError()) 44 if (status.IsError())
45 return status; 45 return status;
46 } 46 }
47 return Status(kOk); 47 return Status(kOk);
48 } 48 }
49 49
50 // Overridden from DevToolsClient: 50 // Overridden from DevToolsClient:
51 virtual Status SendCommand(const std::string& method, 51 virtual Status SendCommand(const std::string& method,
52 const base::DictionaryValue& params) OVERRIDE { 52 const base::DictionaryValue& params) override {
53 if (!disabled_) 53 if (!disabled_)
54 disabled_ = method == "Debugger.disable"; 54 disabled_ = method == "Debugger.disable";
55 if (method == method_ && !error_after_events_) 55 if (method == method_ && !error_after_events_)
56 return Status(kUnknownError); 56 return Status(kUnknownError);
57 57
58 if (method == "HeapProfiler.takeHeapSnapshot") { 58 if (method == "HeapProfiler.takeHeapSnapshot") {
59 Status status = SendAddHeapSnapshotChunkEvent(); 59 Status status = SendAddHeapSnapshotChunkEvent();
60 if (status.IsError()) 60 if (status.IsError())
61 return status; 61 return status;
62 } 62 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 TEST(HeapSnapshotTaker, ErrorBeforeWhenReceivingSnapshot) { 108 TEST(HeapSnapshotTaker, ErrorBeforeWhenReceivingSnapshot) {
109 DummyDevToolsClient client("HeapProfiler.takeHeapSnapshot", false); 109 DummyDevToolsClient client("HeapProfiler.takeHeapSnapshot", false);
110 HeapSnapshotTaker taker(&client); 110 HeapSnapshotTaker taker(&client);
111 scoped_ptr<base::Value> snapshot; 111 scoped_ptr<base::Value> snapshot;
112 Status status = taker.TakeSnapshot(&snapshot); 112 Status status = taker.TakeSnapshot(&snapshot);
113 ASSERT_TRUE(status.IsError()); 113 ASSERT_TRUE(status.IsError());
114 ASSERT_FALSE(snapshot.get()); 114 ASSERT_FALSE(snapshot.get());
115 ASSERT_TRUE(client.IsDisabled()); 115 ASSERT_TRUE(client.IsDisabled());
116 } 116 }
117 117
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome/heap_snapshot_taker.h ('k') | chrome/test/chromedriver/chrome/javascript_dialog_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698