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

Side by Side Diff: chrome/browser/translate/translate_manager_browsertest.cc

Issue 6721021: Move a bunch of renderer->browser messages to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 5
6 #include <set> 6 #include <set>
7 7
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
11 #include "chrome/browser/prefs/pref_change_registrar.h" 11 #include "chrome/browser/prefs/pref_change_registrar.h"
12 #include "chrome/browser/tab_contents/render_view_context_menu.h" 12 #include "chrome/browser/tab_contents/render_view_context_menu.h"
13 #include "chrome/browser/translate/translate_infobar_delegate.h" 13 #include "chrome/browser/translate/translate_infobar_delegate.h"
14 #include "chrome/browser/translate/translate_manager.h" 14 #include "chrome/browser/translate/translate_manager.h"
15 #include "chrome/browser/translate/translate_prefs.h" 15 #include "chrome/browser/translate/translate_prefs.h"
16 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "chrome/common/render_messages.h" 17 #include "chrome/common/render_messages.h"
18 #include "chrome/common/net/test_url_fetcher_factory.h" 18 #include "chrome/common/net/test_url_fetcher_factory.h"
19 #include "chrome/test/testing_browser_process.h" 19 #include "chrome/test/testing_browser_process.h"
20 #include "chrome/test/testing_profile.h" 20 #include "chrome/test/testing_profile.h"
21 #include "content/browser/browser_thread.h" 21 #include "content/browser/browser_thread.h"
22 #include "content/browser/renderer_host/mock_render_process_host.h" 22 #include "content/browser/renderer_host/mock_render_process_host.h"
23 #include "content/browser/renderer_host/test_render_view_host.h" 23 #include "content/browser/renderer_host/test_render_view_host.h"
24 #include "content/browser/tab_contents/navigation_controller.h" 24 #include "content/browser/tab_contents/navigation_controller.h"
25 #include "content/browser/tab_contents/test_tab_contents.h" 25 #include "content/browser/tab_contents/test_tab_contents.h"
26 #include "content/common/notification_details.h" 26 #include "content/common/notification_details.h"
27 #include "content/common/notification_observer_mock.h" 27 #include "content/common/notification_observer_mock.h"
28 #include "content/common/notification_registrar.h" 28 #include "content/common/notification_registrar.h"
29 #include "content/common/notification_type.h" 29 #include "content/common/notification_type.h"
30 #include "content/common/view_messages.h"
30 #include "grit/generated_resources.h" 31 #include "grit/generated_resources.h"
31 #include "ipc/ipc_test_sink.h" 32 #include "ipc/ipc_test_sink.h"
32 #include "testing/gmock/include/gmock/gmock.h" 33 #include "testing/gmock/include/gmock/gmock.h"
33 #include "third_party/cld/languages/public/languages.h" 34 #include "third_party/cld/languages/public/languages.h"
34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" 35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
35 36
36 using testing::_; 37 using testing::_;
37 using testing::Pointee; 38 using testing::Pointee;
38 using testing::Property; 39 using testing::Property;
39 using WebKit::WebContextMenuData; 40 using WebKit::WebContextMenuData;
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 NULL); 1218 NULL);
1218 // Now simulate the URL fetch. 1219 // Now simulate the URL fetch.
1219 SimulateURLFetch(true); 1220 SimulateURLFetch(true);
1220 // Now the message should have been sent. 1221 // Now the message should have been sent.
1221 int page_id = 0; 1222 int page_id = 0;
1222 std::string original_lang, target_lang; 1223 std::string original_lang, target_lang;
1223 EXPECT_TRUE(GetTranslateMessage(&page_id, &original_lang, &target_lang)); 1224 EXPECT_TRUE(GetTranslateMessage(&page_id, &original_lang, &target_lang));
1224 EXPECT_EQ("es", original_lang); 1225 EXPECT_EQ("es", original_lang);
1225 EXPECT_EQ("en", target_lang); 1226 EXPECT_EQ("en", target_lang);
1226 } 1227 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698