| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "extensions/browser/api/file_handlers/mime_util.h" | 5 #include "extensions/browser/api/file_handlers/mime_util.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
| 13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 14 #include "content/public/browser/browser_context.h" | 14 #include "content/public/browser/browser_context.h" |
| 15 #include "content/public/test/test_browser_thread_bundle.h" | 15 #include "content/public/test/test_browser_thread_bundle.h" |
| 16 #include "content/public/test/test_file_system_context.h" | |
| 17 #include "content/public/test/test_utils.h" | 16 #include "content/public/test/test_utils.h" |
| 18 #include "extensions/browser/api/extensions_api_client.h" | 17 #include "extensions/browser/api/extensions_api_client.h" |
| 19 #include "extensions/browser/extensions_test.h" | 18 #include "extensions/browser/extensions_test.h" |
| 19 #include "storage/browser/test/test_file_system_context.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 | 21 |
| 22 namespace extensions { | 22 namespace extensions { |
| 23 namespace app_file_handler_util { | 23 namespace app_file_handler_util { |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 const char kOrigin[] = "chrome-extension://cmalghjoncmjoeakimpfhojhpgemgaje"; | 26 const char kOrigin[] = "chrome-extension://cmalghjoncmjoeakimpfhojhpgemgaje"; |
| 27 const char kJPEGExtensionFilePath[] = "/fake/path/foo.jpg"; | 27 const char kJPEGExtensionFilePath[] = "/fake/path/foo.jpg"; |
| 28 const char kJPEGExtensionUpperCaseFilePath[] = "/fake/path/FOO.JPG"; | 28 const char kJPEGExtensionUpperCaseFilePath[] = "/fake/path/FOO.JPG"; |
| 29 | 29 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 content::RunAllBlockingPoolTasksUntilIdle(); | 137 content::RunAllBlockingPoolTasksUntilIdle(); |
| 138 | 138 |
| 139 ASSERT_EQ(3u, result.size()); | 139 ASSERT_EQ(3u, result.size()); |
| 140 EXPECT_EQ("image/jpeg", result[0]); | 140 EXPECT_EQ("image/jpeg", result[0]); |
| 141 EXPECT_EQ("image/jpeg", result[1]); | 141 EXPECT_EQ("image/jpeg", result[1]); |
| 142 EXPECT_EQ("text/html", result[2]); | 142 EXPECT_EQ("text/html", result[2]); |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace app_file_handler_util | 145 } // namespace app_file_handler_util |
| 146 } // namespace extensions | 146 } // namespace extensions |
| OLD | NEW |