| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/test/test_render_view_host.h" | 5 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/app/chrome_dll_resource.h" | 8 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
| 10 #include "chrome/browser/prefs/pref_change_registrar.h" | 10 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 11 #include "chrome/browser/renderer_host/mock_render_process_host.h" | 11 #include "chrome/browser/renderer_host/mock_render_process_host.h" |
| 12 #include "chrome/browser/tab_contents/navigation_controller.h" | 12 #include "chrome/browser/tab_contents/navigation_controller.h" |
| 13 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 13 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
| 14 #include "chrome/browser/tab_contents/test_tab_contents.h" | 14 #include "chrome/browser/tab_contents/test_tab_contents.h" |
| 15 #include "chrome/browser/translate/translate_infobar_delegate.h" | 15 #include "chrome/browser/translate/translate_infobar_delegate.h" |
| 16 #include "chrome/browser/translate/translate_manager.h" | 16 #include "chrome/browser/translate/translate_manager.h" |
| 17 #include "chrome/browser/translate/translate_prefs.h" | 17 #include "chrome/browser/translate/translate_prefs.h" |
| 18 #include "chrome/common/ipc_test_sink.h" | 18 #include "chrome/common/ipc_test_sink.h" |
| (...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1224 NULL); | 1224 NULL); |
| 1225 // Now simulate the URL fetch. | 1225 // Now simulate the URL fetch. |
| 1226 SimulateURLFetch(true); | 1226 SimulateURLFetch(true); |
| 1227 // Now the message should have been sent. | 1227 // Now the message should have been sent. |
| 1228 int page_id = 0; | 1228 int page_id = 0; |
| 1229 std::string original_lang, target_lang; | 1229 std::string original_lang, target_lang; |
| 1230 EXPECT_TRUE(GetTranslateMessage(&page_id, &original_lang, &target_lang)); | 1230 EXPECT_TRUE(GetTranslateMessage(&page_id, &original_lang, &target_lang)); |
| 1231 EXPECT_EQ("es", original_lang); | 1231 EXPECT_EQ("es", original_lang); |
| 1232 EXPECT_EQ("en", target_lang); | 1232 EXPECT_EQ("en", target_lang); |
| 1233 } | 1233 } |
| OLD | NEW |