| Index: components/webcrypto/test/test_helpers.cc
|
| diff --git a/content/child/webcrypto/test/test_helpers.cc b/components/webcrypto/test/test_helpers.cc
|
| similarity index 97%
|
| rename from content/child/webcrypto/test/test_helpers.cc
|
| rename to components/webcrypto/test/test_helpers.cc
|
| index 538a7d686402b9688e0727ec400171122b0928a1..a14440abf79cc55a6415f753746679a971741833 100644
|
| --- a/content/child/webcrypto/test/test_helpers.cc
|
| +++ b/components/webcrypto/test/test_helpers.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "content/child/webcrypto/test/test_helpers.h"
|
| +#include "components/webcrypto/test/test_helpers.h"
|
|
|
| #include <algorithm>
|
|
|
| @@ -15,13 +15,12 @@
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/values.h"
|
| -#include "content/child/webcrypto/algorithm_dispatch.h"
|
| -#include "content/child/webcrypto/crypto_data.h"
|
| -#include "content/child/webcrypto/generate_key_result.h"
|
| -#include "content/child/webcrypto/jwk.h"
|
| -#include "content/child/webcrypto/status.h"
|
| -#include "content/child/webcrypto/webcrypto_util.h"
|
| -#include "content/public/common/content_paths.h"
|
| +#include "components/webcrypto/algorithm_dispatch.h"
|
| +#include "components/webcrypto/crypto_data.h"
|
| +#include "components/webcrypto/generate_key_result.h"
|
| +#include "components/webcrypto/jwk.h"
|
| +#include "components/webcrypto/status.h"
|
| +#include "components/webcrypto/webcrypto_util.h"
|
| #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h"
|
| #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h"
|
| #include "third_party/re2/re2/re2.h"
|
| @@ -34,8 +33,6 @@
|
| #include "crypto/scoped_nss_types.h"
|
| #endif
|
|
|
| -namespace content {
|
| -
|
| namespace webcrypto {
|
|
|
| void PrintTo(const Status& status, ::std::ostream* os) {
|
| @@ -178,11 +175,14 @@ std::vector<uint8_t> MakeJsonVector(const base::DictionaryValue& dict) {
|
| ::testing::AssertionResult ReadJsonTestFile(const char* test_file_name,
|
| scoped_ptr<base::Value>* value) {
|
| base::FilePath test_data_dir;
|
| - if (!PathService::Get(DIR_TEST_DATA, &test_data_dir))
|
| + if (!PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir))
|
| return ::testing::AssertionFailure() << "Couldn't retrieve test dir";
|
|
|
| - base::FilePath file_path =
|
| - test_data_dir.AppendASCII("webcrypto").AppendASCII(test_file_name);
|
| + base::FilePath file_path = test_data_dir.AppendASCII("components")
|
| + .AppendASCII("test")
|
| + .AppendASCII("data")
|
| + .AppendASCII("webcrypto")
|
| + .AppendASCII(test_file_name);
|
|
|
| std::string file_contents;
|
| if (!base::ReadFileToString(file_path, &file_contents)) {
|
| @@ -686,5 +686,3 @@ blink::WebCryptoNamedCurve GetCurveNameFromDictionary(
|
| }
|
|
|
| } // namespace webcrypto
|
| -
|
| -} // namesapce content
|
|
|