| OLD | NEW |
| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.h" |
| 22 #include "chrome/browser/ui/browser_window.h" | 22 #include "chrome/browser/ui/browser_window.h" |
| 23 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 23 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 24 #include "chrome/common/chrome_notification_types.h" | 24 #include "chrome/common/chrome_notification_types.h" |
| 25 #include "chrome/common/render_messages.h" | 25 #include "chrome/common/render_messages.h" |
| 26 #include "chrome/renderer/translate_helper.h" | 26 #include "chrome/renderer/translate_helper.h" |
| 27 #include "chrome/test/base/in_process_browser_test.h" | 27 #include "chrome/test/base/in_process_browser_test.h" |
| 28 #include "chrome/test/base/ui_test_utils.h" | 28 #include "chrome/test/base/ui_test_utils.h" |
| 29 #include "content/browser/renderer_host/mock_render_process_host.h" | 29 #include "content/browser/renderer_host/mock_render_process_host.h" |
| 30 #include "content/browser/renderer_host/render_view_host.h" | 30 #include "content/browser/renderer_host/render_view_host.h" |
| 31 #include "content/browser/tab_contents/navigation_controller.h" | 31 #include "content/public/browser/navigation_controller.h" |
| 32 #include "content/public/browser/notification_service.h" | 32 #include "content/public/browser/notification_service.h" |
| 33 #include "content/public/browser/web_contents.h" | 33 #include "content/public/browser/web_contents.h" |
| 34 #include "content/test/test_url_fetcher_factory.h" | 34 #include "content/test/test_url_fetcher_factory.h" |
| 35 #include "testing/gtest/include/gtest/gtest.h" | 35 #include "testing/gtest/include/gtest/gtest.h" |
| 36 #include "ui/base/keycodes/keyboard_codes.h" | 36 #include "ui/base/keycodes/keyboard_codes.h" |
| 37 | 37 |
| 38 using content::WebContents; | 38 using content::WebContents; |
| 39 | 39 |
| 40 static const char* kDataURIPrefix = "data:text/html;charset=utf-8,"; | 40 static const char* kDataURIPrefix = "data:text/html;charset=utf-8,"; |
| 41 static const char* kTestFormString = | 41 static const char* kTestFormString = |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 // Once click the text field, it starts again. | 715 // Once click the text field, it starts again. |
| 716 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( | 716 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( |
| 717 render_view_host(), L"", | 717 render_view_host(), L"", |
| 718 L"cr.googleTranslate.onTranslateElementLoad();")); | 718 L"cr.googleTranslate.onTranslateElementLoad();")); |
| 719 | 719 |
| 720 // Simulate the render notifying the translation has been done. | 720 // Simulate the render notifying the translation has been done. |
| 721 translation_observer.Wait(); | 721 translation_observer.Wait(); |
| 722 | 722 |
| 723 TryBasicFormFill(); | 723 TryBasicFormFill(); |
| 724 } | 724 } |
| OLD | NEW |