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

Side by Side Diff: chrome/browser/extensions/extension_messages_browsertest.cc

Issue 7537033: Move more files from chrome/test to chrome/test/base, part #5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "base/values.h" 6 #include "base/values.h"
7 #include "chrome/browser/extensions/extension_message_service.h" 7 #include "chrome/browser/extensions/extension_message_service.h"
8 #include "chrome/common/extensions/extension_messages.h" 8 #include "chrome/common/extensions/extension_messages.h"
9 #include "chrome/common/render_messages.h" 9 #include "chrome/common/render_messages.h"
10 #include "chrome/renderer/extensions/event_bindings.h" 10 #include "chrome/renderer/extensions/event_bindings.h"
11 #include "chrome/test/render_view_test.h" 11 #include "chrome/test/base/render_view_test.h"
12 #include "content/common/view_messages.h" 12 #include "content/common/view_messages.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 static void DispatchOnConnect(int source_port_id, const std::string& name, 15 static void DispatchOnConnect(int source_port_id, const std::string& name,
16 const std::string& tab_json) { 16 const std::string& tab_json) {
17 ListValue args; 17 ListValue args;
18 args.Set(0, Value::CreateIntegerValue(source_port_id)); 18 args.Set(0, Value::CreateIntegerValue(source_port_id));
19 args.Set(1, Value::CreateStringValue(name)); 19 args.Set(1, Value::CreateStringValue(name));
20 args.Set(2, Value::CreateStringValue(tab_json)); 20 args.Set(2, Value::CreateStringValue(tab_json));
21 // Testing extensionId. Set in EventBindings::HandleContextCreated. 21 // Testing extensionId. Set in EventBindings::HandleContextCreated.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 // Verify that we got it. 147 // Verify that we got it.
148 alert_msg = 148 alert_msg =
149 render_thread_.sink().GetUniqueMessageMatching( 149 render_thread_.sink().GetUniqueMessageMatching(
150 ViewHostMsg_RunJavaScriptMessage::ID); 150 ViewHostMsg_RunJavaScriptMessage::ID);
151 ASSERT_TRUE(alert_msg); 151 ASSERT_TRUE(alert_msg);
152 iter = IPC::SyncMessage::GetDataIterator(alert_msg); 152 iter = IPC::SyncMessage::GetDataIterator(alert_msg);
153 ASSERT_TRUE(IPC::ReadParam(alert_msg, &iter, &alert_param)); 153 ASSERT_TRUE(IPC::ReadParam(alert_msg, &iter, &alert_param));
154 EXPECT_EQ(ASCIIToUTF16("disconnected: 24"), alert_param.a); 154 EXPECT_EQ(ASCIIToUTF16("disconnected: 24"), alert_param.a);
155 } 155 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/apps_promo_unittest.cc ('k') | chrome/browser/extensions/extension_webrequest_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698