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

Unified Diff: chrome/browser/android/data_usage/data_use_ui_tab_model_unittest.cc

Issue 2158913002: Make DataUseTabModel and DataUseMatcher more independent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fix Created 4 years, 5 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/browser/android/data_usage/data_use_ui_tab_model_unittest.cc
diff --git a/chrome/browser/android/data_usage/data_use_ui_tab_model_unittest.cc b/chrome/browser/android/data_usage/data_use_ui_tab_model_unittest.cc
index 5a00a686b418182cd86b8524958a7cb68581d4ec..823e713772023fc3d85007b2aba5df5401d8b92b 100644
--- a/chrome/browser/android/data_usage/data_use_ui_tab_model_unittest.cc
+++ b/chrome/browser/android/data_usage/data_use_ui_tab_model_unittest.cc
@@ -11,6 +11,7 @@
#include <string>
#include <vector>
+#include "base/bind_helpers.h"
#include "base/macros.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
@@ -66,9 +67,17 @@ class MockTabDataUseObserver : public DataUseTabModel::TabDataUseObserver {
class TestDataUseTabModel : public DataUseTabModel {
public:
- TestDataUseTabModel() {}
+ TestDataUseTabModel()
+ : DataUseTabModel(base::Bind(&TestDataUseTabModel::FetchMatchingRules,
+ base::Unretained(this)),
+ base::Bind(&TestDataUseTabModel::OnMatchingRulesFetched,
+ base::Unretained(this))) {}
~TestDataUseTabModel() override {}
+ void FetchMatchingRules() {}
+
+ void OnMatchingRulesFetched(bool is_valid) {}
+
using DataUseTabModel::NotifyObserversOfTrackingStarting;
using DataUseTabModel::NotifyObserversOfTrackingEnding;
};
@@ -120,8 +129,6 @@ class DataUseUITabModelTest : public testing::Test {
base::RunLoop().RunUntilIdle();
data_use_tab_model_.reset(new TestDataUseTabModel());
- data_use_tab_model_->InitOnUIThread(
- external_data_use_observer_->external_data_use_observer_bridge_);
}
void SetUpDataUseUITabModel() {

Powered by Google App Engine
This is Rietveld 408576698