summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxhwang <xhwang@chromium.org>2016-02-23 16:55:58 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-24 00:58:06 +0000
commit4499ff5785c7926f705d5abbdb46f20ba2e78f09 (patch)
tree6e22c30ab79f3c969dffce2e4792d1eaef644e4c
parent1607a8e566dea58e9270fb2ab6f98c6b740a8bee (diff)
downloadchromium_src-4499ff5785c7926f705d5abbdb46f20ba2e78f09.zip
chromium_src-4499ff5785c7926f705d5abbdb46f20ba2e78f09.tar.gz
chromium_src-4499ff5785c7926f705d5abbdb46f20ba2e78f09.tar.bz2
Revert of mojo: Delay ApplicationTestBase shell disconnection. (patchset #3 id:60001 of https://chromiumcodereview.appspot.com/1709173002/ )
Reason for revert: Revert this for now to investigate crash on Windows. Original issue's description: > mojo: Delay ApplicationTestBase shell disconnection. > > BUG=587523 > TEST=Reenable tests. > > Committed: https://crrev.com/74cb68fa1c313c885c6022eea11ef6855d9ca0da > Cr-Commit-Position: refs/heads/master@{#377068} TBR=rockot@chromium.org,msw@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=587523 Review URL: https://codereview.chromium.org/1728063002 Cr-Commit-Position: refs/heads/master@{#377160}
-rw-r--r--mojo/shell/public/cpp/application_test_base.h1
-rw-r--r--mojo/shell/public/cpp/lib/application_test_base.cc22
-rw-r--r--mojo/tools/data/apptests10
3 files changed, 15 insertions, 18 deletions
diff --git a/mojo/shell/public/cpp/application_test_base.h b/mojo/shell/public/cpp/application_test_base.h
index 65f86e3..f8ff6ad 100644
--- a/mojo/shell/public/cpp/application_test_base.h
+++ b/mojo/shell/public/cpp/application_test_base.h
@@ -75,7 +75,6 @@ class ApplicationTestBase : public testing::Test {
private:
scoped_ptr<TestHelper> test_helper_;
- bool use_default_run_loop_ = false;
MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationTestBase);
};
diff --git a/mojo/shell/public/cpp/lib/application_test_base.cc b/mojo/shell/public/cpp/lib/application_test_base.cc
index a6d253d..f9a726d 100644
--- a/mojo/shell/public/cpp/lib/application_test_base.cc
+++ b/mojo/shell/public/cpp/lib/application_test_base.cc
@@ -135,16 +135,9 @@ TestHelper::~TestHelper() {
shell_connection_.reset();
}
-ApplicationTestBase::ApplicationTestBase() {}
+ApplicationTestBase::ApplicationTestBase() : test_helper_(nullptr) {}
ApplicationTestBase::~ApplicationTestBase() {
- CHECK(!g_shell_client_request.is_pending());
- CHECK(!g_shell);
-
- test_helper_.reset();
-
- if (use_default_run_loop_)
- Environment::DestroyDefaultRunLoop();
}
ShellClient* ApplicationTestBase::GetShellClient() {
@@ -154,12 +147,8 @@ ShellClient* ApplicationTestBase::GetShellClient() {
void ApplicationTestBase::SetUp() {
// A run loop is recommended for ShellConnection initialization and
// communication.
- // Check this in SetUp() instead of in the constructor because we cannot call
- // virtual methods in the constructor.
- if (ShouldCreateDefaultRunLoop()) {
- use_default_run_loop_ = true;
+ if (ShouldCreateDefaultRunLoop())
Environment::InstantiateDefaultRunLoop();
- }
CHECK(g_shell_client_request.is_pending());
CHECK(g_shell);
@@ -169,6 +158,13 @@ void ApplicationTestBase::SetUp() {
}
void ApplicationTestBase::TearDown() {
+ CHECK(!g_shell_client_request.is_pending());
+ CHECK(!g_shell);
+
+ test_helper_.reset();
+
+ if (ShouldCreateDefaultRunLoop())
+ Environment::DestroyDefaultRunLoop();
}
bool ApplicationTestBase::ShouldCreateDefaultRunLoop() {
diff --git a/mojo/tools/data/apptests b/mojo/tools/data/apptests
index 594ca9b..a67ff16 100644
--- a/mojo/tools/data/apptests
+++ b/mojo/tools/data/apptests
@@ -65,10 +65,12 @@ if config.target_os != config.OS_ANDROID:
'test': 'mojo:media_apptests',
'type': 'gtest_isolated',
},
- {
- 'test': 'mojo:media_pipeline_integration_apptests',
- 'type': 'gtest_isolated',
- },
+ # TODO(media): these tests fail in debug, which has no bot-coverage.
+ # http://crbug.com/587523
+# {
+# 'test': 'mojo:media_pipeline_integration_apptests',
+# 'type': 'gtest_isolated',
+# },
# TODO(rockot): Flaky. Re-enable when brokering is sorted out.
# http://crbug.com/569367.
# {