| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/values.h" |
| 5 #include "chrome/browser/extensions/extension_message_service.h" | 6 #include "chrome/browser/extensions/extension_message_service.h" |
| 6 #include "chrome/common/render_messages.h" | 7 #include "chrome/common/render_messages.h" |
| 7 #include "chrome/renderer/extensions/event_bindings.h" | 8 #include "chrome/renderer/extensions/event_bindings.h" |
| 8 #include "chrome/renderer/extensions/renderer_extension_bindings.h" | 9 #include "chrome/renderer/extensions/renderer_extension_bindings.h" |
| 9 #include "chrome/test/render_view_test.h" | 10 #include "chrome/test/render_view_test.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 12 |
| 12 static void DispatchOnConnect(int source_port_id, const std::string& name, | 13 static void DispatchOnConnect(int source_port_id, const std::string& name, |
| 13 const std::string& tab_json) { | 14 const std::string& tab_json) { |
| 14 ListValue args; | 15 ListValue args; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 142 |
| 142 // Verify that we got it. | 143 // Verify that we got it. |
| 143 alert_msg = | 144 alert_msg = |
| 144 render_thread_.sink().GetUniqueMessageMatching( | 145 render_thread_.sink().GetUniqueMessageMatching( |
| 145 ViewHostMsg_RunJavaScriptMessage::ID); | 146 ViewHostMsg_RunJavaScriptMessage::ID); |
| 146 ASSERT_TRUE(alert_msg); | 147 ASSERT_TRUE(alert_msg); |
| 147 iter = IPC::SyncMessage::GetDataIterator(alert_msg); | 148 iter = IPC::SyncMessage::GetDataIterator(alert_msg); |
| 148 ASSERT_TRUE(IPC::ReadParam(alert_msg, &iter, &alert_param)); | 149 ASSERT_TRUE(IPC::ReadParam(alert_msg, &iter, &alert_param)); |
| 149 EXPECT_EQ(L"disconnected: 24", alert_param.a); | 150 EXPECT_EQ(L"disconnected: 24", alert_param.a); |
| 150 } | 151 } |
| OLD | NEW |