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

Side by Side Diff: components/subresource_filter/content/browser/async_document_subresource_filter_test_utils.cc

Issue 2731013002: ActivationStateComputingThrottle unit tests (Closed)
Patch Set: rebase and touch up Created 3 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/subresource_filter/content/browser/async_document_subresour ce_filter_test_utils.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
engedy 2017/03/10 10:56:57 nit: Also #include base/bind.h and bind_helpers.h
Charlie Harrison 2017/03/10 17:12:47 Done.
8
9 namespace subresource_filter {
10 namespace testing {
11
12 base::Callback<void(ActivationState)>
13 TestActivationStateCallbackReceiver::GetCallback() {
14 return base::Bind(&TestActivationStateCallbackReceiver::Callback,
15 base::Unretained(this));
16 }
17
18 void TestActivationStateCallbackReceiver::ExpectReceivedOnce(
19 const ActivationState& expected_state) const {
20 ASSERT_EQ(1, callback_count_);
21 EXPECT_EQ(expected_state, last_activation_state_);
22 }
23
24 void TestActivationStateCallbackReceiver::Callback(
25 ActivationState activation_state) {
26 ++callback_count_;
27 last_activation_state_ = activation_state;
28 }
29
30 } // namespace testing
31 } // namespace subresource_filter
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698