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

Unified Diff: chrome/test/data/android/keygen.html

Issue 1432573002: Adding <keygen> Content Setting (Android UI) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@keygen_ui
Patch Set: Fix rebase across multiple ancestors. Created 5 years 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
Index: chrome/test/data/android/keygen.html
diff --git a/chrome/test/data/android/keygen.html b/chrome/test/data/android/keygen.html
new file mode 100644
index 0000000000000000000000000000000000000000..560692fe1fbe57c81b48b6264b01f5928847e214
--- /dev/null
+++ b/chrome/test/data/android/keygen.html
@@ -0,0 +1,35 @@
+<html>
+
+<head>
+<title>Test page for key generation</title>
+
+<script>
+var keygen = false;
+
+function runKeygen() {
+ if (window.location.search.indexOf('?') == -1) {
+ document.getElementById('test_form').submit();
+ } else {
+ // Verify that the form submission includes a generated key. A successful
+ // key generation will send a binary blob starting with 0x30, 0x82, 0x02
+ // ('MIIC' in base64) to the target. We check whether the GET request
+ // includes this data to determine whether the key generation successfully
+ // occurred.
+ keygen = (window.location.search.indexOf('?key=MIIC') == 0)
+ }
+}
+
+function didKeygen() {
+ return keygen;
+}
+</script>
+</head>
+
+<body onload="runKeygen()">
+This page tries to use a keygen element when it is loaded.
+<form id='test_form'>
+<keygen name='key'>
+</form>
+</body>
+
+</html>

Powered by Google App Engine
This is Rietveld 408576698