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

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

Issue 14696007: Warn on missing OVERRIDE/virtual everywhere, not just in header files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/format_macros.h" 5 #include "base/format_macros.h"
6 #include "base/json/json_reader.h" 6 #include "base/json/json_reader.h"
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/json/string_escape.h" 8 #include "base/json/string_escape.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 const base::DictionaryValue& params, 44 const base::DictionaryValue& params,
45 scoped_ptr<base::DictionaryValue>* result) OVERRIDE { 45 scoped_ptr<base::DictionaryValue>* result) OVERRIDE {
46 sent_command_queue_.push_back(method); 46 sent_command_queue_.push_back(method);
47 return Status(kOk); 47 return Status(kOk);
48 } 48 }
49 49
50 virtual void AddListener(DevToolsEventListener* listener) OVERRIDE { 50 virtual void AddListener(DevToolsEventListener* listener) OVERRIDE {
51 listener_ = listener; 51 listener_ = listener;
52 } 52 }
53 53
54 const std::string& GetId() OVERRIDE { 54 virtual const std::string& GetId() OVERRIDE {
55 return id_; 55 return id_;
56 } 56 }
57 57
58 private: 58 private:
59 const std::string id_; 59 const std::string id_;
60 std::list<std::string> sent_command_queue_; 60 std::list<std::string> sent_command_queue_;
61 DevToolsEventListener* listener_; 61 DevToolsEventListener* listener_;
62 }; 62 };
63 63
64 scoped_ptr<DictionaryValue> ParseDictionary(const std::string& json) { 64 scoped_ptr<DictionaryValue> ParseDictionary(const std::string& json) {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 client1.TriggerEvent("Console.gaga1"); 165 client1.TriggerEvent("Console.gaga1");
166 client2.TriggerEvent("Console.gaga2"); 166 client2.TriggerEvent("Console.gaga2");
167 167
168 scoped_ptr<base::ListValue> entries(logger.GetAndClearLogEntries()); 168 scoped_ptr<base::ListValue> entries(logger.GetAndClearLogEntries());
169 169
170 ASSERT_EQ(2u, entries->GetSize()); 170 ASSERT_EQ(2u, entries->GetSize());
171 ValidateLogEntry(entries.get(), 0, "webview-1", "Console.gaga1", "INFO"); 171 ValidateLogEntry(entries.get(), 0, "webview-1", "Console.gaga1", "INFO");
172 ValidateLogEntry(entries.get(), 1, "webview-2", "Console.gaga2", "INFO"); 172 ValidateLogEntry(entries.get(), 1, "webview-2", "Console.gaga2", "INFO");
173 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698