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 #include "chrome/browser/extensions/convert_user_script.h" |
| 6 |
| 7 #include <memory> |
5 #include <string> | 8 #include <string> |
6 #include <vector> | 9 #include <vector> |
7 | 10 |
8 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "base/path_service.h" | 14 #include "base/path_service.h" |
13 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
14 #include "chrome/browser/extensions/convert_user_script.h" | |
15 #include "chrome/common/chrome_paths.h" | 16 #include "chrome/common/chrome_paths.h" |
16 #include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h" | 17 #include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h" |
17 #include "extensions/common/constants.h" | 18 #include "extensions/common/constants.h" |
18 #include "extensions/common/extension.h" | 19 #include "extensions/common/extension.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
20 | 21 |
21 namespace extensions { | 22 namespace extensions { |
22 | 23 |
23 namespace { | 24 namespace { |
24 | 25 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 EXPECT_EQ(Manifest::TYPE_USER_SCRIPT, extension->GetType()); | 253 EXPECT_EQ(Manifest::TYPE_USER_SCRIPT, extension->GetType()); |
253 | 254 |
254 // Validate run location. | 255 // Validate run location. |
255 ASSERT_EQ(1u, ContentScriptsInfo::GetContentScripts(extension.get()).size()); | 256 ASSERT_EQ(1u, ContentScriptsInfo::GetContentScripts(extension.get()).size()); |
256 const UserScript& script = | 257 const UserScript& script = |
257 ContentScriptsInfo::GetContentScripts(extension.get())[0]; | 258 ContentScriptsInfo::GetContentScripts(extension.get())[0]; |
258 EXPECT_EQ(UserScript::DOCUMENT_IDLE, script.run_location()); | 259 EXPECT_EQ(UserScript::DOCUMENT_IDLE, script.run_location()); |
259 } | 260 } |
260 | 261 |
261 } // namespace extensions | 262 } // namespace extensions |
OLD | NEW |