Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: components/webcrypto/test/test_helpers.cc

Issue 1077273002: html_viewer: Move webcrypto to a place where html_viewer can use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/webcrypto/test/test_helpers.h ('k') | components/webcrypto/webcrypto.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « components/webcrypto/test/test_helpers.h ('k') | components/webcrypto/webcrypto.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698