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

Side by Side Diff: chrome/browser/extensions/extension_pref_value_map_unittest.cc

Issue 26432002: Fix unit_tests build on Fedora 20. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-uploading. The upload script failed during the upload. Created 7 years, 2 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
« no previous file with comments | « chrome/browser/extensions/api/web_request/web_request_time_tracker_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/pref_store_observer_mock.h" 8 #include "base/prefs/pref_store_observer_mock.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/extension_pref_value_map.h" 10 #include "chrome/browser/extensions/extension_pref_value_map.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 epvm_.UnregisterExtension(kExt2); 199 epvm_.UnregisterExtension(kExt2);
200 200
201 EXPECT_EQ("val3", GetValue(kPref1, false)); 201 EXPECT_EQ("val3", GetValue(kPref1, false));
202 EXPECT_EQ("val4", GetValue(kPref2, false)); 202 EXPECT_EQ("val4", GetValue(kPref2, false));
203 EXPECT_EQ("val6", GetValue(kPref3, false)); 203 EXPECT_EQ("val6", GetValue(kPref3, false));
204 EXPECT_EQ("", GetValue(kPref4, false)); 204 EXPECT_EQ("", GetValue(kPref4, false));
205 } 205 }
206 206
207 // Tests triggering of notifications to registered observers. 207 // Tests triggering of notifications to registered observers.
208 TEST_F(ExtensionPrefValueMapTest, NotifyWhenNeeded) { 208 TEST_F(ExtensionPrefValueMapTest, NotifyWhenNeeded) {
209 using testing::_;
210 using testing::Mock; 209 using testing::Mock;
211 using testing::StrEq; 210 using testing::StrEq;
212 211
213 epvm_.RegisterExtension(kExt1, CreateTime(10), true); 212 epvm_.RegisterExtension(kExt1, CreateTime(10), true);
214 213
215 ExtensionPrefValueMapObserverMock observer; 214 ExtensionPrefValueMapObserverMock observer;
216 epvm_.AddObserver(&observer); 215 epvm_.AddObserver(&observer);
217 216
218 EXPECT_CALL(observer, OnPrefValueChanged(std::string(kPref1))); 217 EXPECT_CALL(observer, OnPrefValueChanged(std::string(kPref1)));
219 epvm_.SetExtensionPref(kExt1, kPref1, kRegular, CreateVal("val1")); 218 epvm_.SetExtensionPref(kExt1, kPref1, kRegular, CreateVal("val1"));
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 OverrideIncognitoTestCase(1, 0, 0, 0, 5, 0, 0, 0, 5, 5), 390 OverrideIncognitoTestCase(1, 0, 0, 0, 5, 0, 0, 0, 5, 5),
392 OverrideIncognitoTestCase(1, 2, 3, 0, 5, 0, 0, 0, 5, 5), 391 OverrideIncognitoTestCase(1, 2, 3, 0, 5, 0, 0, 0, 5, 5),
393 OverrideIncognitoTestCase(1, 0, 0, 0, 0, 6, 0, 0, 6, 1), 392 OverrideIncognitoTestCase(1, 0, 0, 0, 0, 6, 0, 0, 6, 1),
394 OverrideIncognitoTestCase(1, 0, 3, 0, 5, 6, 0, 0, 6, 5), 393 OverrideIncognitoTestCase(1, 0, 3, 0, 5, 6, 0, 0, 6, 5),
395 OverrideIncognitoTestCase(1, 0, 0, 4, 5, 6, 0, 0, 6, 5), 394 OverrideIncognitoTestCase(1, 0, 0, 4, 5, 6, 0, 0, 6, 5),
396 OverrideIncognitoTestCase(1, 0, 0, 0, 0, 0, 7, 0, 1, 7), 395 OverrideIncognitoTestCase(1, 0, 0, 0, 0, 0, 7, 0, 1, 7),
397 OverrideIncognitoTestCase(1, 2, 0, 0, 5, 0, 7, 0, 5, 7), 396 OverrideIncognitoTestCase(1, 2, 0, 0, 5, 0, 7, 0, 5, 7),
398 OverrideIncognitoTestCase(1, 2, 0, 0, 5, 0, 0, 8, 5, 8), 397 OverrideIncognitoTestCase(1, 2, 0, 0, 5, 0, 0, 8, 5, 8),
399 OverrideIncognitoTestCase(1, 2, 0, 0, 5, 0, 7, 8, 5, 8), 398 OverrideIncognitoTestCase(1, 2, 0, 0, 5, 0, 7, 8, 5, 8),
400 OverrideIncognitoTestCase(1, 2, 3, 0, 0, 6, 7, 0, 6, 7))); 399 OverrideIncognitoTestCase(1, 2, 3, 0, 0, 6, 7, 0, 6, 7)));
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/web_request/web_request_time_tracker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698