| Index: chrome/test/ppapi/ppapi_filechooser_browsertest.cc
|
| diff --git a/chrome/test/ppapi/ppapi_filechooser_browsertest.cc b/chrome/test/ppapi/ppapi_filechooser_browsertest.cc
|
| index ae3c0a628049c50c0f5d320e35a2510cc1b8f0c7..897e15b47c6dbdc6c4fcd2f153885e30021e6850 100644
|
| --- a/chrome/test/ppapi/ppapi_filechooser_browsertest.cc
|
| +++ b/chrome/test/ppapi/ppapi_filechooser_browsertest.cc
|
| @@ -11,6 +11,7 @@
|
| #include "base/files/scoped_temp_dir.h"
|
| #include "base/strings/string_piece.h"
|
| #include "base/strings/string_util.h"
|
| +#include "base/threading/thread_restrictions.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/test/ppapi/ppapi_test.h"
|
| @@ -270,6 +271,7 @@ class PPAPIFileChooserTestWithSBService : public PPAPIFileChooserTest {
|
|
|
| IN_PROC_BROWSER_TEST_F(PPAPIFileChooserTest, FileChooser_Open_Success) {
|
| const char kContents[] = "Hello from browser";
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
|
|
| @@ -294,6 +296,7 @@ IN_PROC_BROWSER_TEST_F(PPAPIFileChooserTest, FileChooser_Open_Cancel) {
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_F(PPAPIFileChooserTest, FileChooser_SaveAs_Success) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| base::FilePath suggested_filename = temp_dir.GetPath().AppendASCII("foo");
|
| @@ -310,6 +313,7 @@ IN_PROC_BROWSER_TEST_F(PPAPIFileChooserTest, FileChooser_SaveAs_Success) {
|
|
|
| IN_PROC_BROWSER_TEST_F(PPAPIFileChooserTest,
|
| FileChooser_SaveAs_SafeDefaultName) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| base::FilePath suggested_filename = temp_dir.GetPath().AppendASCII("foo");
|
| @@ -332,6 +336,7 @@ IN_PROC_BROWSER_TEST_F(PPAPIFileChooserTest,
|
|
|
| IN_PROC_BROWSER_TEST_F(PPAPIFileChooserTest,
|
| FileChooser_SaveAs_UnsafeDefaultName) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| base::FilePath suggested_filename = temp_dir.GetPath().AppendASCII("foo");
|
| @@ -366,6 +371,7 @@ IN_PROC_BROWSER_TEST_F(PPAPIFileChooserTest, FileChooser_SaveAs_Cancel) {
|
| // file is created. This MOTW prevents the file being opened without due
|
| // security warnings if the file is executable.
|
| IN_PROC_BROWSER_TEST_F(PPAPIFileChooserTest, FileChooser_Quarantine) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| base::FilePath suggested_filename = temp_dir.GetPath().AppendASCII("foo");
|
| @@ -392,6 +398,7 @@ IN_PROC_BROWSER_TEST_F(PPAPIFileChooserTest, FileChooser_Quarantine) {
|
|
|
| IN_PROC_BROWSER_TEST_F(PPAPIFileChooserTestWithSBService,
|
| FileChooser_SaveAs_DangerousExecutable_Allowed) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| safe_browsing_test_configuration_.default_result =
|
| DownloadProtectionService::DANGEROUS;
|
| safe_browsing_test_configuration_.result_map.insert(
|
|
|