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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/json/json_file_value_serializer.h" | 6 #include "base/json/json_file_value_serializer.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/threading/thread.h" | 8 #include "base/threading/thread.h" |
9 #include "chrome/browser/extensions/extension_service_unittest.h" | 9 #include "chrome/browser/extensions/extension_service_unittest.h" |
10 #include "chrome/browser/extensions/unpacked_installer.h" | 10 #include "chrome/browser/extensions/unpacked_installer.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 test_headers(), | 72 test_headers(), |
73 kTestData, | 73 kTestData, |
74 true) {} | 74 true) {} |
75 private: | 75 private: |
76 virtual ~SimpleTestJob() {} | 76 virtual ~SimpleTestJob() {} |
77 }; | 77 }; |
78 | 78 |
79 // Yoinked from extension_manifest_unittest.cc. | 79 // Yoinked from extension_manifest_unittest.cc. |
80 DictionaryValue* LoadManifestFile(const base::FilePath path, | 80 DictionaryValue* LoadManifestFile(const base::FilePath path, |
81 std::string* error) { | 81 std::string* error) { |
82 EXPECT_TRUE(file_util::PathExists(path)); | 82 EXPECT_TRUE(base::PathExists(path)); |
83 JSONFileValueSerializer serializer(path); | 83 JSONFileValueSerializer serializer(path); |
84 return static_cast<DictionaryValue*>(serializer.Deserialize(NULL, error)); | 84 return static_cast<DictionaryValue*>(serializer.Deserialize(NULL, error)); |
85 } | 85 } |
86 | 86 |
87 scoped_refptr<Extension> LoadExtension(const std::string& filename, | 87 scoped_refptr<Extension> LoadExtension(const std::string& filename, |
88 std::string* error) { | 88 std::string* error) { |
89 base::FilePath path; | 89 base::FilePath path; |
90 PathService::Get(chrome::DIR_TEST_DATA, &path); | 90 PathService::Get(chrome::DIR_TEST_DATA, &path); |
91 path = path. | 91 path = path. |
92 AppendASCII("extensions"). | 92 AppendASCII("extensions"). |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 base::MessageLoop::current()->RunUntilIdle(); | 342 base::MessageLoop::current()->RunUntilIdle(); |
343 | 343 |
344 bool defer = false; | 344 bool defer = false; |
345 throttle->WillStartRequest(&defer); | 345 throttle->WillStartRequest(&defer); |
346 ASSERT_FALSE(defer); | 346 ASSERT_FALSE(defer); |
347 } | 347 } |
348 | 348 |
349 } // namespace | 349 } // namespace |
350 | 350 |
351 } // namespace extensions | 351 } // namespace extensions |
OLD | NEW |