Fix integration tests in src/chrome and src/extensions so that we can turn on IO thread checks without failures.
These were never turned on because they were only in content_browsertests. We should turn them on everywhere to catch changes that make blocking I/O calls on the UI or (non-blocking) IO threads.
In the follow up cl, I'll turn on IO checks on the main thread in integration tests in src/chrome.
BUG=713847
NOPRESUBMIT=true
Review-Url: https://codereview.chromium.org/2835233002
Cr-Commit-Position: refs/heads/master@{#467438}
diff --git a/chrome/browser/extensions/service_worker_apitest.cc b/chrome/browser/extensions/service_worker_apitest.cc
index 80336cee..9d2dd5de 100644
--- a/chrome/browser/extensions/service_worker_apitest.cc
+++ b/chrome/browser/extensions/service_worker_apitest.cc
@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/threading/thread_restrictions.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/gcm/fake_gcm_profile_service.h"
@@ -283,6 +284,7 @@
}
IN_PROC_BROWSER_TEST_F(ServiceWorkerTest, UpdateRefreshesServiceWorker) {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
base::ScopedTempDir scoped_temp_dir;
ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDir());
base::FilePath pem_path = test_data_dir_.AppendASCII("service_worker")
@@ -323,6 +325,7 @@
}
IN_PROC_BROWSER_TEST_F(ServiceWorkerTest, UpdateWithoutSkipWaiting) {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
base::ScopedTempDir scoped_temp_dir;
ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDir());
base::FilePath pem_path = test_data_dir_.AppendASCII("service_worker")