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

Side by Side Diff: chrome/browser/web_resource/eula_accepted_notifier_unittest.cc

Issue 739173002: Remove dependencies of ResourceRequestAllowedNotifier on chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and cleanup Created 6 years, 1 month 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/web_resource/eula_accepted_notifier.h" 5 #include "chrome/browser/web_resource/eula_accepted_notifier.h"
6 6
7 #include "base/prefs/pref_registry_simple.h" 7 #include "base/prefs/pref_registry_simple.h"
8 #include "base/prefs/testing_pref_service.h"
8 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
9 #include "chrome/test/base/scoped_testing_local_state.h"
10 #include "chrome/test/base/testing_browser_process.h"
11 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
12 11
13 class EulaAcceptedNotifierTest : public testing::Test, 12 class EulaAcceptedNotifierTest : public testing::Test,
14 public EulaAcceptedNotifier::Observer { 13 public EulaAcceptedNotifier::Observer {
15 public: 14 public:
16 EulaAcceptedNotifierTest() : eula_accepted_called_(false) { 15 EulaAcceptedNotifierTest() : eula_accepted_called_(false) {
17 } 16 }
18 17
19 // testing::Test overrides. 18 // testing::Test overrides.
20 void SetUp() override { 19 void SetUp() override {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 66 }
68 67
69 TEST_F(EulaAcceptedNotifierTest, EulaNotInitiallyAccepted) { 68 TEST_F(EulaAcceptedNotifierTest, EulaNotInitiallyAccepted) {
70 EXPECT_FALSE(notifier()->IsEulaAccepted()); 69 EXPECT_FALSE(notifier()->IsEulaAccepted());
71 SetEulaAcceptedPref(); 70 SetEulaAcceptedPref();
72 EXPECT_TRUE(notifier()->IsEulaAccepted()); 71 EXPECT_TRUE(notifier()->IsEulaAccepted());
73 EXPECT_TRUE(eula_accepted_called()); 72 EXPECT_TRUE(eula_accepted_called());
74 // Call it a second time, to ensure the answer doesn't change. 73 // Call it a second time, to ensure the answer doesn't change.
75 EXPECT_TRUE(notifier()->IsEulaAccepted()); 74 EXPECT_TRUE(notifier()->IsEulaAccepted());
76 } 75 }
OLDNEW
« no previous file with comments | « chrome/browser/web_resource/eula_accepted_notifier.cc ('k') | chrome/browser/web_resource/resource_request_allowed_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698