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

Unified Diff: chrome/test/media_router/media_router_integration_browsertest.cc

Issue 2910263002: [Media Router tests] Add minimal ScopedAllowIO for the tests to pass. (Closed)
Patch Set: crbug Created 3 years, 7 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
« no previous file with comments | « PRESUBMIT.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/media_router/media_router_integration_browsertest.cc
diff --git a/chrome/test/media_router/media_router_integration_browsertest.cc b/chrome/test/media_router/media_router_integration_browsertest.cc
index ff88be48d2fdbf023220b2cd6ee90f269ef2360b..78b2abf74ad4469ddc8438bd301d1ab86efd54e2 100644
--- a/chrome/test/media_router/media_router_integration_browsertest.cc
+++ b/chrome/test/media_router/media_router_integration_browsertest.cc
@@ -13,6 +13,7 @@
#include "base/json/json_writer.h"
#include "base/path_service.h"
#include "base/strings/stringprintf.h"
+#include "base/threading/thread_restrictions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_finder.h"
@@ -279,6 +280,8 @@ void MediaRouterIntegrationBrowserTest::CheckDialogRemainsOpen(
void MediaRouterIntegrationBrowserTest::SetTestData(
base::FilePath::StringPieceType test_data_file) {
+ // crbug.com/724573
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
mark a. foltz 2017/05/30 23:50:04 I don't see anything in this stack frame that requ
imcheng 2017/05/31 00:30:22 JSONFileValueDeserializer::Deserialize requires it
base::FilePath full_path = GetResourceFile(test_data_file);
JSONFileValueDeserializer deserializer(full_path);
int error_code = 0;
@@ -312,6 +315,8 @@ WebContents* MediaRouterIntegrationBrowserTest::OpenMRDialog(
base::FilePath MediaRouterIntegrationBrowserTest::GetResourceFile(
base::FilePath::StringPieceType relative_path) const {
+ // crbug.com/724573
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
mark a. foltz 2017/05/30 23:50:03 Can this be scoped to only include PathExists?
imcheng 2017/05/31 00:30:22 Done.
base::FilePath base_dir;
// ASSERT_TRUE can only be used in void returning functions.
// Use CHECK instead in non-void returning functions.
« no previous file with comments | « PRESUBMIT.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698