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

Unified Diff: chrome/browser/translate/translate_browser_test_utils.h

Issue 296943002: Simplify and extend commenting in test::ScopedCLDDynamicDataHarness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: msw@ comments redux Created 6 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/translate/translate_browser_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_browser_test_utils.h
diff --git a/chrome/browser/translate/translate_browser_test_utils.h b/chrome/browser/translate/translate_browser_test_utils.h
index d5e054b6838f4b33529fe9e2985eb8530fe32060..c8ad85a5d4d1c2de0f501ede5ad9681480a30aa3 100644
--- a/chrome/browser/translate/translate_browser_test_utils.h
+++ b/chrome/browser/translate/translate_browser_test_utils.h
@@ -11,13 +11,12 @@ namespace test {
// A utility class that sets up CLD dynamic data upon calling Init() and cleans
// it up when destroyed.
+// Test data lives under: src/chrome/test/data/cld2_component
//
// This class is intended to be instantiated within IN_PROC_BROWSER_TEST_F
// test fixtures; it uses ASSERT macros for correctness, so that tests will
// fail gracefully in error conditions. Sample use:
//
-// #include "chrome/browser/translate/translate_browser_test_utils.h"
-//
// IN_PROC_BROWSER_TEST_F(BrowserTest, PageLanguageDetection) {
// test::ScopedCLDDynamicDataHarness dynamic_data_scope;
// ASSERT_NO_FATAL_FAILURE(dynamic_data_scope.Init());
@@ -26,9 +25,19 @@ namespace test {
//
// If you have a lot of tests that need language translation features, you can
// add an instance of the ScopedCLDDynamicDataHarness to your test class'
-// private member variables and add the call to Init() into your Setup method.
+// private member variables and add the call to Init() into SetUpOnMainThread.
+// Sample use:
+//
+// class MyTestClass : public InProcessBrowserTest {
+// public:
+// virtual void SetUpOnMainThread() OVERRIDE {
+// dynamic_data_scope.Init();
+// InProcessBrowserTest::SetUpOnMainThread();
+// }
+// private:
+// test::ScopedCLDDynamicDataHarness dynamic_data_scope;
+// };
//
-// NB: Test data lives under src/chrome/test/data/cld2_component
class ScopedCLDDynamicDataHarness {
public:
// Constructs the object, but does nothing. Call Init() to prepare the
« no previous file with comments | « no previous file | chrome/browser/translate/translate_browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698