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

Unified Diff: chrome/android/junit/src/org/chromium/chrome/browser/TestableChromeApplication.java

Issue 2392763002: Sanitize unparcable intents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 2 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: chrome/android/junit/src/org/chromium/chrome/browser/TestableChromeApplication.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/TestableChromeApplication.java b/chrome/android/junit/src/org/chromium/chrome/browser/TestableChromeApplication.java
new file mode 100644
index 0000000000000000000000000000000000000000..a5d3fa0ba1ef0f04d7d5fec912a99cfc79780b1d
--- /dev/null
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/TestableChromeApplication.java
@@ -0,0 +1,17 @@
+// Copyright 2016 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.
+
+package org.chromium.chrome.browser;
+
+/**
+ * To make ChromeApplication unit testable, it can't execite ContentApplication's onTerminate,
+ * which interacts with its (in tests nonexistant) TracingController.
Ted C 2016/10/04 20:19:23 This actually seems like a bug in ContentApplicati
kraush 2016/10/04 21:36:36 Using BaseChromiumApplication actually fixes this
+ * Compared to a Mock, this class can be used within an @Config
+ */
+public class TestableChromeApplication extends ChromeApplication {
+ @Override
+ public void onTerminate() {
+ // Do nothing
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698