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

Unified Diff: base/android/java_handler_thread_for_testing.h

Issue 2169553002: Properly throw java exceptions from shouldOverrideUrlLoading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test-only subclasses for JavaHandlerThread and SystemMessageHandler. Created 4 years, 4 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: base/android/java_handler_thread_for_testing.h
diff --git a/base/android/java_handler_thread_for_testing.h b/base/android/java_handler_thread_for_testing.h
new file mode 100644
index 0000000000000000000000000000000000000000..68d736aaa3343f08d92d60739c62a88058895169
--- /dev/null
+++ b/base/android/java_handler_thread_for_testing.h
@@ -0,0 +1,32 @@
+// 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.
+
+#ifndef BASE_ANDROID_JAVA_HANDLER_THREAD_FOR_TESTING_H_
+#define BASE_ANDROID_JAVA_HANDLER_THREAD_FOR_TESTING_H_
+
+#include "base/android/java_handler_thread.h"
+
+namespace base {
+
+// class WaitableEvent;
+
+namespace android {
+
+class JavaHandlerThreadForTesting : public JavaHandlerThread {
+ public:
+ JavaHandlerThreadForTesting(const char* name,
+ base::WaitableEvent* test_done_event);
+ virtual ~JavaHandlerThreadForTesting();
+
+ void StartMessageLoop() override;
+ void StopMessageLoop() override;
+
+ private:
+ base::WaitableEvent* test_done_event_;
+};
+
+} // namespace android
+} // namespace base
+
+#endif // BASE_ANDROID_JAVA_HANDLER_THREAD_FOR_TESTING_H_

Powered by Google App Engine
This is Rietveld 408576698