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_dll_resource.h" |
9 #include "chrome/browser/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/browser/renderer_host/mock_render_process_host.h" | 10 #include "chrome/browser/renderer_host/mock_render_process_host.h" |
11 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 11 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
12 #include "chrome/browser/tab_contents/test_tab_contents.h" | 12 #include "chrome/browser/tab_contents/test_tab_contents.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/ipc_test_sink.h" | 16 #include "chrome/common/ipc_test_sink.h" |
17 #include "chrome/common/notification_details.h" | 17 #include "chrome/common/notification_details.h" |
18 #include "chrome/common/notification_observer_mock.h" | 18 #include "chrome/common/notification_observer_mock.h" |
19 #include "chrome/common/notification_registrar.h" | 19 #include "chrome/common/notification_registrar.h" |
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1237 // Now simulate the URL fetch. | 1237 // Now simulate the URL fetch. |
1238 SimulateURLFetch(true); | 1238 SimulateURLFetch(true); |
1239 // Now the message should have been sent. | 1239 // Now the message should have been sent. |
1240 int page_id = 0; | 1240 int page_id = 0; |
1241 std::string original_lang, target_lang; | 1241 std::string original_lang, target_lang; |
1242 EXPECT_TRUE(GetTranslateMessage(&page_id, &original_lang, &target_lang)); | 1242 EXPECT_TRUE(GetTranslateMessage(&page_id, &original_lang, &target_lang)); |
1243 EXPECT_EQ(1, page_id); | 1243 EXPECT_EQ(1, page_id); |
1244 EXPECT_EQ("es", original_lang); | 1244 EXPECT_EQ("es", original_lang); |
1245 EXPECT_EQ("en", target_lang); | 1245 EXPECT_EQ("en", target_lang); |
1246 } | 1246 } |
OLD | NEW |