OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/common/devtools/ash_devtools_dom_agent.h" | 5 #include "ash/common/devtools/ash_devtools_dom_agent.h" |
6 | 6 |
7 #include "ash/common/test/ash_test.h" | 7 #include "ash/common/test/ash_test.h" |
8 #include "ash/common/wm_lookup.h" | 8 #include "ash/common/wm_lookup.h" |
9 #include "ash/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
10 #include "ash/common/wm_window.h" | 10 #include "ash/common/wm_window.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 } | 40 } |
41 return count; | 41 return count; |
42 } | 42 } |
43 | 43 |
44 int CountProtocolNotificationMessage(const std::string& message) { | 44 int CountProtocolNotificationMessage(const std::string& message) { |
45 return std::count(protocol_notification_messages_.begin(), | 45 return std::count(protocol_notification_messages_.begin(), |
46 protocol_notification_messages_.end(), message); | 46 protocol_notification_messages_.end(), message); |
47 } | 47 } |
48 | 48 |
49 // FrontendChannel | 49 // FrontendChannel |
50 void sendProtocolResponse(int callId, const std::string& message) override {} | 50 void sendProtocolResponse(int callId, |
| 51 std::unique_ptr<Serializable> message) override {} |
51 void flushProtocolNotifications() override {} | 52 void flushProtocolNotifications() override {} |
52 void sendProtocolNotification(const std::string& message) override { | 53 void sendProtocolNotification( |
53 protocol_notification_messages_.push_back(message); | 54 std::unique_ptr<Serializable> message) override { |
| 55 protocol_notification_messages_.push_back(message->serialize()); |
54 } | 56 } |
55 | 57 |
56 private: | 58 private: |
57 std::vector<std::string> protocol_notification_messages_; | 59 std::vector<std::string> protocol_notification_messages_; |
58 | 60 |
59 DISALLOW_COPY_AND_ASSIGN(FakeFrontendChannel); | 61 DISALLOW_COPY_AND_ASSIGN(FakeFrontendChannel); |
60 }; | 62 }; |
61 | 63 |
62 std::string GetAttributeValue(const std::string& attribute, DOM::Node* node) { | 64 std::string GetAttributeValue(const std::string& attribute, DOM::Node* node) { |
63 EXPECT_TRUE(node->hasAttributes()); | 65 EXPECT_TRUE(node->hasAttributes()); |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 int parent_id = parent_node->getNodeId(); | 304 int parent_id = parent_node->getNodeId(); |
303 | 305 |
304 Compare(parent_window, parent_node); | 306 Compare(parent_window, parent_node); |
305 Compare(child_window, child_node); | 307 Compare(child_window, child_node); |
306 parent_window->StackChildAbove(child_window, target_window); | 308 parent_window->StackChildAbove(child_window, target_window); |
307 ExpectChildNodeRemoved(parent_id, child_node->getNodeId()); | 309 ExpectChildNodeRemoved(parent_id, child_node->getNodeId()); |
308 ExpectChildNodeInserted(parent_id, sibling_node->getNodeId()); | 310 ExpectChildNodeInserted(parent_id, sibling_node->getNodeId()); |
309 } | 311 } |
310 | 312 |
311 } // namespace ash | 313 } // namespace ash |
OLD | NEW |