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

Unified Diff: chrome/renderer/translate_helper.h

Issue 12209114: Translate: introduce unittest for TranslateHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add a missing file Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/translate_helper.h
diff --git a/chrome/renderer/translate_helper.h b/chrome/renderer/translate_helper.h
index 83e0cc6b36414b3e1256f213ba1148f63f069bfb..dab2006a36723740f4de75da380fb81f65714b3c 100644
--- a/chrome/renderer/translate_helper.h
+++ b/chrome/renderer/translate_helper.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/gtest_prod_util.h"
#include "base/memory/weak_ptr.h"
#include "chrome/common/translate_errors.h"
#include "content/public/renderer/render_view_observer.h"
@@ -28,9 +29,6 @@ class TranslateHelper : public content::RenderViewObserver {
void PageCaptured(const string16& contents);
protected:
- // Convert language code to the one used in server supporting list.
- static void ConvertLanguageCodeSynonym(std::string* code);
-
// The following methods are protected so they can be overridden in
// unit-tests.
void OnTranslatePage(int page_id,
@@ -68,6 +66,11 @@ class TranslateHelper : public content::RenderViewObserver {
virtual bool DontDelayTasks();
private:
+ FRIEND_TEST_ALL_PREFIXES(TranslateHelperTest, LanguageCodeSynonyms);
+
+ // Convert language code to the one used in server supporting list.
+ static void ConvertLanguageCodeSynonym(std::string* code);
+
// Returns whether the page associated with |document| is a candidate for
// translation. Some pages can explictly specify (via a meta-tag) that they
// should not be translated.

Powered by Google App Engine
This is Rietveld 408576698