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

Unified Diff: chrome/browser/apps/app_shim/app_shim_host_manager_browsertest_mac.mm

Issue 2835233002: Fix integration tests in src/chrome and src/extensions so that we can turn on IO thread checks wi... (Closed)
Patch Set: ready for review Created 3 years, 8 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
Index: chrome/browser/apps/app_shim/app_shim_host_manager_browsertest_mac.mm
diff --git a/chrome/browser/apps/app_shim/app_shim_host_manager_browsertest_mac.mm b/chrome/browser/apps/app_shim/app_shim_host_manager_browsertest_mac.mm
index 33f94c58b231b5270b4c476086b3229e5aa10e2e..919877c7d0869e40c9a6303049da666ba5e58555 100644
--- a/chrome/browser/apps/app_shim/app_shim_host_manager_browsertest_mac.mm
+++ b/chrome/browser/apps/app_shim/app_shim_host_manager_browsertest_mac.mm
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/path_service.h"
+#include "base/threading/thread_restrictions.h"
#include "chrome/browser/apps/app_shim/app_shim_handler_mac.h"
#include "chrome/browser/apps/app_shim/test/app_shim_host_manager_test_api_mac.h"
#include "chrome/browser/browser_process.h"
@@ -65,6 +66,7 @@ TestShimClient::TestShimClient() : io_thread_("TestShimClientIO") {
user_data_dir.Append(app_mode::kAppShimSocketSymlinkName);
base::FilePath socket_path;
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
CHECK(base::ReadSymbolicLink(symlink_path, &socket_path));
app_mode::VerifySocketPermissions(socket_path);
@@ -76,7 +78,10 @@ TestShimClient::TestShimClient() : io_thread_("TestShimClientIO") {
this, io_thread_.task_runner().get());
}
-TestShimClient::~TestShimClient() {}
+TestShimClient::~TestShimClient() {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ io_thread_.Stop();
+}
bool TestShimClient::OnMessageReceived(const IPC::Message& message) {
return true;
@@ -276,6 +281,7 @@ IN_PROC_BROWSER_TEST_F(AppShimHostManagerBrowserTestSocketFiles,
directory_in_tmp_ = test_api.directory_in_tmp();
// Check that socket files have been created.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
EXPECT_TRUE(base::PathExists(directory_in_tmp_));
EXPECT_TRUE(base::PathExists(symlink_path_));
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698