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

Side by Side Diff: chrome/test/chromedriver/chrome/dom_tracker_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 (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 <list> 5 #include <list>
6 #include <string> 6 #include <string>
7 7
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/test/chromedriver/chrome/dom_tracker.h" 10 #include "chrome/test/chromedriver/chrome/dom_tracker.h"
(...skipping 12 matching lines...) Expand all
23 std::string command; 23 std::string command;
24 if (!sent_command_queue_.empty()) { 24 if (!sent_command_queue_.empty()) {
25 command = sent_command_queue_.front(); 25 command = sent_command_queue_.front();
26 sent_command_queue_.pop_front(); 26 sent_command_queue_.pop_front();
27 } 27 }
28 return command; 28 return command;
29 } 29 }
30 30
31 // Overridden from DevToolsClient: 31 // Overridden from DevToolsClient:
32 virtual Status SendCommand(const std::string& method, 32 virtual Status SendCommand(const std::string& method,
33 const base::DictionaryValue& params) OVERRIDE { 33 const base::DictionaryValue& params) override {
34 sent_command_queue_.push_back(method); 34 sent_command_queue_.push_back(method);
35 return Status(kOk); 35 return Status(kOk);
36 } 36 }
37 virtual Status SendCommandAndGetResult( 37 virtual Status SendCommandAndGetResult(
38 const std::string& method, 38 const std::string& method,
39 const base::DictionaryValue& params, 39 const base::DictionaryValue& params,
40 scoped_ptr<base::DictionaryValue>* result) OVERRIDE { 40 scoped_ptr<base::DictionaryValue>* result) override {
41 return SendCommand(method, params); 41 return SendCommand(method, params);
42 } 42 }
43 43
44 private: 44 private:
45 std::list<std::string> sent_command_queue_; 45 std::list<std::string> sent_command_queue_;
46 }; 46 };
47 47
48 } // namespace 48 } // namespace
49 49
50 TEST(DomTracker, GetFrameIdForNode) { 50 TEST(DomTracker, GetFrameIdForNode) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 ASSERT_TRUE(frame_id.empty()); 86 ASSERT_TRUE(frame_id.empty());
87 87
88 params.Clear(); 88 params.Clear();
89 params.Set("node", base::JSONReader::Read( 89 params.Set("node", base::JSONReader::Read(
90 "{\"nodeId\":2,\"frameId\":\"f\"}")); 90 "{\"nodeId\":2,\"frameId\":\"f\"}"));
91 ASSERT_EQ(kOk, 91 ASSERT_EQ(kOk,
92 tracker.OnEvent(&client, "DOM.childNodeInserted", params).code()); 92 tracker.OnEvent(&client, "DOM.childNodeInserted", params).code());
93 ASSERT_TRUE(tracker.GetFrameIdForNode(2, &frame_id).IsOk()); 93 ASSERT_TRUE(tracker.GetFrameIdForNode(2, &frame_id).IsOk());
94 ASSERT_STREQ("f", frame_id.c_str()); 94 ASSERT_STREQ("f", frame_id.c_str());
95 } 95 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome/dom_tracker.h ('k') | chrome/test/chromedriver/chrome/frame_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698