OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
11 #include "chrome/test/ppapi/ppapi_test.h" | 11 #include "chrome/test/ppapi/ppapi_test.h" |
12 #include "ppapi/shared_impl/test_utils.h" | 12 #include "ppapi/shared_impl/test_utils.h" |
13 #include "ui/shell_dialogs/select_file_dialog.h" | 13 #include "ui/shell_dialogs/select_file_dialog.h" |
14 #include "ui/shell_dialogs/select_file_dialog_factory.h" | 14 #include "ui/shell_dialogs/select_file_dialog_factory.h" |
15 #include "ui/shell_dialogs/selected_file_info.h" | 15 #include "ui/shell_dialogs/selected_file_info.h" |
16 | 16 |
17 #if defined(FULL_SAFE_BROWSING) | 17 #if defined(FULL_SAFE_BROWSING) |
18 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 18 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
19 #include "components/safe_browsing_db/test_database_manager.h" | 19 #include "components/safe_browsing_db/test_database_manager.h" |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 RunTestViaHTTP("FileChooser_SaveAsDangerousExecutableAllowed"); | 341 RunTestViaHTTP("FileChooser_SaveAsDangerousExecutableAllowed"); |
342 base::FilePath actual_filename = temp_dir.path().AppendASCII("dangerous.exe"); | 342 base::FilePath actual_filename = temp_dir.path().AppendASCII("dangerous.exe"); |
343 | 343 |
344 ASSERT_TRUE(base::PathExists(actual_filename)); | 344 ASSERT_TRUE(base::PathExists(actual_filename)); |
345 std::string file_contents; | 345 std::string file_contents; |
346 ASSERT_TRUE(base::ReadFileToString(actual_filename, &file_contents)); | 346 ASSERT_TRUE(base::ReadFileToString(actual_filename, &file_contents)); |
347 EXPECT_EQ("Hello from PPAPI", file_contents); | 347 EXPECT_EQ("Hello from PPAPI", file_contents); |
348 } | 348 } |
349 | 349 |
350 #endif // FULL_SAFE_BROWSING | 350 #endif // FULL_SAFE_BROWSING |
OLD | NEW |