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 "chrome/browser/chromeos/extensions/file_manager/file_tasks.h" | 5 #include "chrome/browser/chromeos/file_manager/file_tasks.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
11 #include "base/prefs/testing_pref_service.h" | 11 #include "base/prefs/testing_pref_service.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/chromeos/drive/drive_app_registry.h" | 13 #include "chrome/browser/chromeos/drive/drive_app_registry.h" |
14 #include "chrome/browser/chromeos/drive/file_system_util.h" | 14 #include "chrome/browser/chromeos/drive/file_system_util.h" |
15 #include "chrome/browser/chromeos/extensions/file_manager/app_id.h" | 15 #include "chrome/browser/chromeos/file_manager/app_id.h" |
16 #include "chrome/browser/google_apis/drive_api_parser.h" | 16 #include "chrome/browser/google_apis/drive_api_parser.h" |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "content/public/test/test_browser_thread_bundle.h" | 18 #include "content/public/test/test_browser_thread_bundle.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 namespace file_manager { | 21 namespace file_manager { |
22 namespace file_tasks { | 22 namespace file_tasks { |
23 namespace { | 23 namespace { |
24 | 24 |
25 // Registers the default task preferences. Used for testing | 25 // Registers the default task preferences. Used for testing |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 "text/plain")); | 356 "text/plain")); |
357 | 357 |
358 // The internal file browser handler should be chosen as default, as it's a | 358 // The internal file browser handler should be chosen as default, as it's a |
359 // fallback file browser handler. | 359 // fallback file browser handler. |
360 ChooseAndSetDefaultTask(pref_service, path_mime_set, &tasks); | 360 ChooseAndSetDefaultTask(pref_service, path_mime_set, &tasks); |
361 EXPECT_TRUE(tasks[0].is_default()); | 361 EXPECT_TRUE(tasks[0].is_default()); |
362 } | 362 } |
363 | 363 |
364 } // namespace file_tasks | 364 } // namespace file_tasks |
365 } // namespace file_manager. | 365 } // namespace file_manager. |
OLD | NEW |