Index: Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp |
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp |
index a7d2aca22db2cddd45aef084a3da749742eadcd3..56a46d0bccd1884aada261cac9baf3e6a0d37c2c 100644 |
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp |
+++ b/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp |
@@ -117,17 +117,14 @@ void MockWebCrypto::importKey(WebKit::WebCryptoKeyFormat, const unsigned char* k |
{ |
std::string keyDataString(reinterpret_cast<const char*>(keyData), keyDataSize); |
- WebKit::WebCryptoKeyType type; |
if (keyDataString == "reject") { |
result.completeWithError(); |
} else if (keyDataString == "throw") { |
result.initializationFailed(); |
} else { |
- if (keyDataString == "public") { |
+ WebKit::WebCryptoKeyType type = WebKit::WebCryptoKeyTypePrivate; |
+ if (keyDataString == "public") |
type = WebKit::WebCryptoKeyTypePublic; |
- } else if (keyDataString == "private") { |
- type = WebKit::WebCryptoKeyTypePrivate; |
- } |
result.completeWithKey(WebKit::WebCryptoKey::create(0, type, extractable, algorithm, usages)); |
} |
} |