OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/stringprintf.h" |
10 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
11 #include "base/string_util.h" | 12 #include "base/string_util.h" |
12 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
13 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
14 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
15 #include "chrome/common/extensions/extension.h" | 16 #include "chrome/common/extensions/extension.h" |
16 #include "chrome/common/extensions/extension_constants.h" | 17 #include "chrome/common/extensions/extension_constants.h" |
17 #include "chrome/common/extensions/extension_error_utils.h" | 18 #include "chrome/common/extensions/extension_error_utils.h" |
18 #include "chrome/common/extensions/extension_sidebar_defaults.h" | 19 #include "chrome/common/extensions/extension_sidebar_defaults.h" |
19 #include "chrome/common/extensions/file_browser_handler.h" | 20 #include "chrome/common/extensions/file_browser_handler.h" |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 ASSERT_EQ(extension->file_browser_handlers()->size(), 1U); | 603 ASSERT_EQ(extension->file_browser_handlers()->size(), 1U); |
603 const FileBrowserHandler* action = | 604 const FileBrowserHandler* action = |
604 extension->file_browser_handlers()->at(0).get(); | 605 extension->file_browser_handlers()->at(0).get(); |
605 EXPECT_EQ(action->title(), "Default title"); | 606 EXPECT_EQ(action->title(), "Default title"); |
606 EXPECT_EQ(action->icon_path(), "icon.png"); | 607 EXPECT_EQ(action->icon_path(), "icon.png"); |
607 const FileBrowserHandler::PatternList& patterns = action->file_url_patterns(); | 608 const FileBrowserHandler::PatternList& patterns = action->file_url_patterns(); |
608 ASSERT_EQ(patterns.size(), 1U); | 609 ASSERT_EQ(patterns.size(), 1U); |
609 ASSERT_TRUE(action->MatchesURL( | 610 ASSERT_TRUE(action->MatchesURL( |
610 GURL("filesystem:chrome-extension://foo/local/test.txt"))); | 611 GURL("filesystem:chrome-extension://foo/local/test.txt"))); |
611 } | 612 } |
OLD | NEW |