summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpolina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-14 00:13:41 +0000
committerpolina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-14 00:13:41 +0000
commit474785f104ade61cecd76052b6df3409ff5ae1da (patch)
treece62d754b280acd610cf418713e254012a35d981
parent32de46257e00f213e040bb18341a36145a8dfa62 (diff)
downloadchromium_src-474785f104ade61cecd76052b6df3409ff5ae1da.zip
chromium_src-474785f104ade61cecd76052b6df3409ff5ae1da.tar.gz
chromium_src-474785f104ade61cecd76052b6df3409ff5ae1da.tar.bz2
ppapi_tests: Move implementation of virtual Init to the .cc file.
Otherwise, the compiler instantiates an implementation in every .o file that this header is included in, and then the linker picks one. This tends to bloat things. BUG=none TEST=bots Review URL: http://codereview.chromium.org/7890016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101000 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ppapi/tests/test_case.cc4
-rw-r--r--ppapi/tests/test_case.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/ppapi/tests/test_case.cc b/ppapi/tests/test_case.cc
index 4bfac10..9f0675e 100644
--- a/ppapi/tests/test_case.cc
+++ b/ppapi/tests/test_case.cc
@@ -18,6 +18,10 @@ TestCase::TestCase(TestingInstance* instance)
TestCase::~TestCase() {
}
+bool TestCase::Init() {
+ return true;
+}
+
// static
std::string TestCase::MakeFailureMessage(const char* file,
int line,
diff --git a/ppapi/tests/test_case.h b/ppapi/tests/test_case.h
index 5bf295e..975e666 100644
--- a/ppapi/tests/test_case.h
+++ b/ppapi/tests/test_case.h
@@ -34,7 +34,8 @@ class TestCase {
virtual ~TestCase();
// Optionally override to do testcase specific initialization.
- virtual bool Init() { return true; }
+ // Default implementation just returns true.
+ virtual bool Init();
// Override to implement the test. It will be called after the plugin is
// first displayed.