Chromium Code Reviews| Index: chrome/browser/browsing_data/browsing_data_appcache_helper_unittest.cc |
| diff --git a/chrome/browser/browsing_data/browsing_data_appcache_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_appcache_helper_unittest.cc |
| index 96b7c5a1abcf3a7d4371124d6e3dd7760715acad..548ba03ca2aea044077dacf06d1723523f3aa254 100644 |
| --- a/chrome/browser/browsing_data/browsing_data_appcache_helper_unittest.cc |
| +++ b/chrome/browser/browsing_data/browsing_data_appcache_helper_unittest.cc |
| @@ -12,6 +12,7 @@ |
| #include "base/stl_util.h" |
| #include "chrome/test/base/testing_profile.h" |
| #include "content/public/test/test_browser_thread_bundle.h" |
| +#include "content/public/test/test_utils.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| namespace { |
| @@ -43,12 +44,17 @@ class CannedBrowsingDataAppCacheHelperTest : public testing::Test { |
| CannedBrowsingDataAppCacheHelperTest() |
| : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD) {} |
| + void TearDown() override { |
| + // Make sure we run all pending tasks on IO thread before testing |
| + // profile is destructed. |
| + content::RunAllPendingInMessageLoop(content::BrowserThread::IO); |
|
kinuko
2016/07/21 03:06:25
This wasn't necessary before this CL because Testi
|
| + } |
| + |
| content::TestBrowserThreadBundle thread_bundle_; |
|
mmenke
2016/07/21 15:27:20
Doesn't really matter, but these should probably b
kinuko
2016/07/22 04:16:20
Done.
|
| + TestingProfile profile; |
|
mmenke
2016/07/21 15:27:20
profile_
kinuko
2016/07/22 04:16:20
Done.
|
| }; |
| TEST_F(CannedBrowsingDataAppCacheHelperTest, SetInfo) { |
| - TestingProfile profile; |
| - |
| GURL manifest1("http://example1.com/manifest.xml"); |
| GURL manifest2("http://example2.com/path1/manifest.xml"); |
| GURL manifest3("http://example2.com/path2/manifest.xml"); |
| @@ -82,8 +88,6 @@ TEST_F(CannedBrowsingDataAppCacheHelperTest, SetInfo) { |
| } |
| TEST_F(CannedBrowsingDataAppCacheHelperTest, Unique) { |
| - TestingProfile profile; |
| - |
| GURL manifest("http://example.com/manifest.xml"); |
| scoped_refptr<CannedBrowsingDataAppCacheHelper> helper( |
| @@ -106,8 +110,6 @@ TEST_F(CannedBrowsingDataAppCacheHelperTest, Unique) { |
| } |
| TEST_F(CannedBrowsingDataAppCacheHelperTest, Empty) { |
| - TestingProfile profile; |
| - |
| GURL manifest("http://example.com/manifest.xml"); |
| scoped_refptr<CannedBrowsingDataAppCacheHelper> helper( |
| @@ -121,8 +123,6 @@ TEST_F(CannedBrowsingDataAppCacheHelperTest, Empty) { |
| } |
| TEST_F(CannedBrowsingDataAppCacheHelperTest, Delete) { |
| - TestingProfile profile; |
| - |
| GURL manifest1("http://example.com/manifest1.xml"); |
| GURL manifest2("http://foo.example.com/manifest2.xml"); |
| GURL manifest3("http://bar.example.com/manifest3.xml"); |
| @@ -142,8 +142,6 @@ TEST_F(CannedBrowsingDataAppCacheHelperTest, Delete) { |
| } |
| TEST_F(CannedBrowsingDataAppCacheHelperTest, IgnoreExtensionsAndDevTools) { |
| - TestingProfile profile; |
| - |
| GURL manifest1("chrome-extension://abcdefghijklmnopqrstuvwxyz/manifest.xml"); |
| GURL manifest2("chrome-devtools://abcdefghijklmnopqrstuvwxyz/manifest.xml"); |