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

Side by Side Diff: chrome/renderer/translate_helper_browsertest.cc

Issue 8220006: Rename RenderView to RenderViewImpl. Update Chrome's DEPS so that it can't include the RenderView... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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) 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/common/chrome_constants.h" 5 #include "chrome/common/chrome_constants.h"
6 #include "chrome/common/render_messages.h" 6 #include "chrome/common/render_messages.h"
7 #include "chrome/renderer/translate_helper.h" 7 #include "chrome/renderer/translate_helper.h"
8 #include "chrome/test/base/render_view_test.h" 8 #include "chrome/test/base/render_view_test.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 using testing::AtLeast; 12 using testing::AtLeast;
13 using testing::Return; 13 using testing::Return;
14 14
15 class TestTranslateHelper : public TranslateHelper { 15 class TestTranslateHelper : public TranslateHelper {
16 public: 16 public:
17 explicit TestTranslateHelper(RenderView* render_view) 17 explicit TestTranslateHelper(content::RenderView* render_view)
18 : TranslateHelper(render_view, NULL) { 18 : TranslateHelper(render_view, NULL) {
19 } 19 }
20 20
21 virtual bool DontDelayTasks() { return true; } 21 virtual bool DontDelayTasks() { return true; }
22 22
23 void TranslatePage(int page_id, 23 void TranslatePage(int page_id,
24 const std::string& source_lang, 24 const std::string& source_lang,
25 const std::string& target_lang, 25 const std::string& target_lang,
26 const std::string& translate_script) { 26 const std::string& translate_script) {
27 OnTranslatePage(page_id, translate_script, source_lang, target_lang); 27 OnTranslatePage(page_id, translate_script, source_lang, target_lang);
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 LoadHTML("<html><head><meta http-equiv=\"content-language\" " 357 LoadHTML("<html><head><meta http-equiv=\"content-language\" "
358 "content=\" fr , es,en \">" 358 "content=\" fr , es,en \">"
359 "</head><body>A random page with random content.</body></html>"); 359 "</head><body>A random page with random content.</body></html>");
360 ProcessPendingMessages(); 360 ProcessPendingMessages();
361 message = render_thread_.sink().GetUniqueMessageMatching( 361 message = render_thread_.sink().GetUniqueMessageMatching(
362 ChromeViewHostMsg_TranslateLanguageDetermined::ID); 362 ChromeViewHostMsg_TranslateLanguageDetermined::ID);
363 ASSERT_NE(static_cast<IPC::Message*>(NULL), message); 363 ASSERT_NE(static_cast<IPC::Message*>(NULL), message);
364 ChromeViewHostMsg_TranslateLanguageDetermined::Read(message, &params); 364 ChromeViewHostMsg_TranslateLanguageDetermined::Read(message, &params);
365 EXPECT_EQ("fr", params.a); 365 EXPECT_EQ("fr", params.a);
366 } 366 }
OLDNEW
« no previous file with comments | « chrome/renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc ('k') | chrome/test/base/render_view_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698