Lines Matching refs:kKey

42 const char kKey[] = "test-key";  variable
203 ASSERT_TRUE(SetValue(kKey, test_data)); in TEST_F()
205 EXPECT_TRUE(prefs_.GetString(kKey, &value)); in TEST_F()
221 EXPECT_TRUE(prefs_.SetString(kKey, kValue)); in TEST_F()
223 EXPECT_TRUE(base::ReadFileToString(prefs_dir_.Append(kKey), &value)); in TEST_F()
237 EXPECT_TRUE(prefs_.SetString(kKey, kValue)); in TEST_F()
239 EXPECT_TRUE(base::ReadFileToString(subdir.Append(kKey), &value)); in TEST_F()
245 EXPECT_FALSE(prefs_.SetString(kKey, "test value")); in TEST_F()
249 base::CreateDirectory(prefs_dir_.Append(kKey)); in TEST_F()
250 EXPECT_FALSE(prefs_.SetString(kKey, "test value")); in TEST_F()
251 EXPECT_TRUE(base::DirectoryExists(prefs_dir_.Append(kKey))); in TEST_F()
255 ASSERT_TRUE(SetValue(kKey, " \n 25 \t ")); in TEST_F()
257 EXPECT_TRUE(prefs_.GetInt64(kKey, &value)); in TEST_F()
262 ASSERT_TRUE(SetValue(kKey, "30a")); in TEST_F()
264 EXPECT_FALSE(prefs_.GetInt64(kKey, &value)); in TEST_F()
269 kKey, in TEST_F()
272 EXPECT_TRUE(prefs_.GetInt64(kKey, &value)); in TEST_F()
278 kKey, in TEST_F()
281 EXPECT_TRUE(prefs_.GetInt64(kKey, &value)); in TEST_F()
286 ASSERT_TRUE(SetValue(kKey, " \t -100 \n ")); in TEST_F()
288 EXPECT_TRUE(prefs_.GetInt64(kKey, &value)); in TEST_F()
298 EXPECT_TRUE(prefs_.SetInt64(kKey, -123)); in TEST_F()
300 EXPECT_TRUE(base::ReadFileToString(prefs_dir_.Append(kKey), &value)); in TEST_F()
311 EXPECT_TRUE(prefs_.SetInt64(kKey, std::numeric_limits<int64_t>::max())); in TEST_F()
313 EXPECT_TRUE(base::ReadFileToString(prefs_dir_.Append(kKey), &value)); in TEST_F()
319 EXPECT_TRUE(prefs_.SetInt64(kKey, std::numeric_limits<int64_t>::min())); in TEST_F()
321 EXPECT_TRUE(base::ReadFileToString(prefs_dir_.Append(kKey), &value)); in TEST_F()
327 ASSERT_TRUE(SetValue(kKey, " \n false \t ")); in TEST_F()
329 EXPECT_TRUE(prefs_.GetBoolean(kKey, &value)); in TEST_F()
334 const char kKey[] = "test-key"; in TEST_F() local
335 ASSERT_TRUE(SetValue(kKey, " \t true \n ")); in TEST_F()
337 EXPECT_TRUE(prefs_.GetBoolean(kKey, &value)); in TEST_F()
342 const char kKey[] = "test-key"; in TEST_F() local
343 ASSERT_TRUE(SetValue(kKey, "1")); in TEST_F()
345 EXPECT_FALSE(prefs_.GetBoolean(kKey, &value)); in TEST_F()
349 const char kKey[] = "test-key"; in TEST_F() local
350 ASSERT_TRUE(SetValue(kKey, "")); in TEST_F()
352 EXPECT_FALSE(prefs_.GetBoolean(kKey, &value)); in TEST_F()
361 const char kKey[] = "test-bool"; in TEST_F() local
362 EXPECT_TRUE(prefs_.SetBoolean(kKey, true)); in TEST_F()
364 EXPECT_TRUE(base::ReadFileToString(prefs_dir_.Append(kKey), &value)); in TEST_F()
369 const char kKey[] = "test-bool"; in TEST_F() local
370 EXPECT_TRUE(prefs_.SetBoolean(kKey, false)); in TEST_F()
372 EXPECT_TRUE(base::ReadFileToString(prefs_dir_.Append(kKey), &value)); in TEST_F()
377 const char kKey[] = "s p a c e s"; in TEST_F() local
378 EXPECT_FALSE(prefs_.SetBoolean(kKey, true)); in TEST_F()
379 EXPECT_FALSE(base::PathExists(prefs_dir_.Append(kKey))); in TEST_F()
384 EXPECT_FALSE(prefs_.Exists(kKey)); in TEST_F()
387 ASSERT_TRUE(prefs_.SetInt64(kKey, 8)); in TEST_F()
388 EXPECT_TRUE(prefs_.Exists(kKey)); in TEST_F()
393 EXPECT_TRUE(prefs_.Delete(kKey)); in TEST_F()
396 ASSERT_TRUE(prefs_.SetInt64(kKey, 0)); in TEST_F()
397 EXPECT_TRUE(prefs_.Delete(kKey)); in TEST_F()
400 EXPECT_FALSE(prefs_.Exists(kKey)); in TEST_F()
434 prefs_.AddObserver(kKey, &mock_obserser); in TEST_F()
436 EXPECT_CALL(mock_obserser, OnPrefSet(Eq(kKey))); in TEST_F()
438 prefs_.SetString(kKey, "value"); in TEST_F()
442 EXPECT_CALL(mock_obserser, OnPrefDeleted(Eq(kKey))); in TEST_F()
443 prefs_.Delete(kKey); in TEST_F()
459 prefs_.RemoveObserver(kKey, &mock_obserser); in TEST_F()
469 prefs_.SetString(kKey, "value"); in TEST_F()
470 prefs_.Delete(kKey); in TEST_F()
477 prefs_.AddObserver(kKey, &mock_obserser_a); in TEST_F()
478 prefs_.AddObserver(kKey, &mock_obserser_b); in TEST_F()
481 EXPECT_TRUE(prefs_.SetString(kKey, "value")); in TEST_F()
482 prefs_.RemoveObserver(kKey, &mock_obserser_b); in TEST_F()
483 EXPECT_TRUE(prefs_.SetString(kKey, "other value")); in TEST_F()
484 prefs_.RemoveObserver(kKey, &mock_obserser_a); in TEST_F()
485 EXPECT_TRUE(prefs_.SetString(kKey, "yet another value")); in TEST_F()
513 EXPECT_FALSE(prefs_.Exists(kKey)); in TEST_F()
515 EXPECT_FALSE(prefs_.GetInt64(kKey, &value)); in TEST_F()
517 EXPECT_TRUE(prefs_.SetInt64(kKey, 1234)); in TEST_F()
518 EXPECT_TRUE(prefs_.Exists(kKey)); in TEST_F()
519 EXPECT_TRUE(prefs_.GetInt64(kKey, &value)); in TEST_F()
522 EXPECT_TRUE(prefs_.Delete(kKey)); in TEST_F()
523 EXPECT_FALSE(prefs_.Exists(kKey)); in TEST_F()
524 EXPECT_TRUE(prefs_.Delete(kKey)); in TEST_F()
529 EXPECT_TRUE(prefs_.Delete(kKey)); in TEST_F()