OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // File contains browser tests for the fileBrowserHandler api. | 5 // File contains browser tests for the fileBrowserHandler api. |
6 | 6 |
7 #include "chrome/browser/chromeos/extensions/file_manager/file_browser_handler_a
pi.h" | 7 #include "chrome/browser/chromeos/extensions/file_manager/file_browser_handler_a
pi.h" |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/extensions/extension_apitest.h" | 15 #include "chrome/browser/extensions/extension_apitest.h" |
16 #include "chrome/browser/extensions/extension_function_test_utils.h" | 16 #include "chrome/browser/extensions/extension_function_test_utils.h" |
17 #include "chrome/browser/extensions/extension_service.h" | 17 #include "chrome/browser/extensions/extension_service.h" |
18 #include "chrome/browser/extensions/extension_system.h" | 18 #include "chrome/browser/extensions/extension_system.h" |
19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/ui/browser.h" | 20 #include "chrome/browser/ui/browser.h" |
21 #include "chrome/common/extensions/extension.h" | 21 #include "chrome/common/extensions/extension.h" |
22 #include "chrome/test/base/in_process_browser_test.h" | 22 #include "chrome/test/base/in_process_browser_test.h" |
23 #include "chrome/test/base/ui_test_utils.h" | 23 #include "chrome/test/base/ui_test_utils.h" |
24 #include "content/public/browser/browser_context.h" | 24 #include "content/public/browser/browser_context.h" |
25 #include "webkit/browser/fileapi/external_mount_points.h" | 25 #include "webkit/browser/fileapi/external_mount_points.h" |
26 #include "webkit/fileapi/file_system_types.h" | 26 #include "webkit/common/fileapi/file_system_types.h" |
27 | 27 |
28 namespace utils = extension_function_test_utils; | 28 namespace utils = extension_function_test_utils; |
29 | 29 |
30 using content::BrowserContext; | 30 using content::BrowserContext; |
31 using extensions::Extension; | 31 using extensions::Extension; |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 // Data that defines FileSelector behaviour in each test case. | 35 // Data that defines FileSelector behaviour in each test case. |
36 struct TestCase { | 36 struct TestCase { |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 select_file_function.get(), | 371 select_file_function.get(), |
372 "[{\"suggestedName\": \"/path_to_file/some_file_name.txt\"}]", | 372 "[{\"suggestedName\": \"/path_to_file/some_file_name.txt\"}]", |
373 browser()))); | 373 browser()))); |
374 | 374 |
375 EXPECT_FALSE(utils::GetBoolean(result.get(), "success")); | 375 EXPECT_FALSE(utils::GetBoolean(result.get(), "success")); |
376 DictionaryValue* entry_info; | 376 DictionaryValue* entry_info; |
377 EXPECT_FALSE(result->GetDictionary("entry", &entry_info)); | 377 EXPECT_FALSE(result->GetDictionary("entry", &entry_info)); |
378 } | 378 } |
379 | 379 |
380 } // namespace | 380 } // namespace |
OLD | NEW |