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

Unified Diff: android_webview/common/crash_reporter/aw_microdump_unittest.cc

Issue 2717223003: Add WebView-specific whitelist for crash keys. (Closed)
Patch Set: Use non-allocating whitelist implementation. Add instrumentation tests. Created 3 years, 10 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
Index: android_webview/common/crash_reporter/aw_microdump_unittest.cc
diff --git a/android_webview/common/crash_reporter/aw_microdump_unittest.cc b/android_webview/common/crash_reporter/aw_microdump_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c52bfd496a2b1a4517afe50bd242a1850255e2fe
--- /dev/null
+++ b/android_webview/common/crash_reporter/aw_microdump_unittest.cc
@@ -0,0 +1,22 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "android_webview/common/crash_reporter/crash_keys.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+class AwMicroDumpTest : public Test {
+ public:
+ AwMicroDumpUnittest() {}
+
+ protected:
+};
+
+TEST_F(AwMicroDumpTest, WhitelistedKeysAreRegistered) {
+ std::vector<const char*> whitelisted_keys =
+ crash_keys::GetWhiteListedWebViewCrashKeys();
+ std::vector<const char*> registered_keys =
+ crash_keys::GetWebViewCrashKeysToRegister();
+ // TODO ensure whitelisted_keys is a sub-set of registered keys (with
+ // special-cases for kMediumSize keys).
+}

Powered by Google App Engine
This is Rietveld 408576698