Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: adblock-android-tests/src/org/adblockplus/libadblockplus/tests/BasePlatformTest.java

Issue 29857561: Fix libadblockplus-android tests, Part 2
Patch Set: Created Aug. 16, 2018, 11:48 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: adblock-android-tests/src/org/adblockplus/libadblockplus/tests/BasePlatformTest.java
diff --git a/adblock-android-tests/src/org/adblockplus/libadblockplus/tests/BasePlatformTest.java b/adblock-android-tests/src/org/adblockplus/libadblockplus/tests/BasePlatformTest.java
deleted file mode 100644
index 4d36ff1a2ba4154c2473397905a30e7375638dc2..0000000000000000000000000000000000000000
--- a/adblock-android-tests/src/org/adblockplus/libadblockplus/tests/BasePlatformTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * This file is part of Adblock Plus <https://adblockplus.org/>,
- * Copyright (C) 2006-present eyeo GmbH
- *
- * Adblock Plus is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Adblock Plus is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package org.adblockplus.libadblockplus.tests;
-
-import org.adblockplus.libadblockplus.Platform;
-
-import org.adblockplus.libadblockplus.LogSystem;
-import org.adblockplus.libadblockplus.ThrowingWebRequest;
-import org.adblockplus.libadblockplus.WebRequest;
-
-import android.content.Context;
-import android.test.InstrumentationTestCase;
-
-public abstract class BasePlatformTest extends InstrumentationTestCase
-{
- protected Platform platform;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- platform = new Platform(createLogSystem(), createWebRequest(),
- getContext().getFilesDir().getAbsolutePath());
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- if (platform != null)
- {
- platform.dispose();
- platform = null;
- }
- super.tearDown();
- }
-
- // If the method returns null then a default implementation of the Log System
- // provided by libadblockplus is used.
- protected LogSystem createLogSystem()
- {
- return null;
- }
-
- protected WebRequest createWebRequest()
- {
- return new ThrowingWebRequest();
- }
-
- protected Context getContext()
- {
- return getInstrumentation().getTargetContext();
- }
-}

Powered by Google App Engine
This is Rietveld