Lines Matching refs:kKey

42 const char kKey[] = "test-key";  variable
220 ASSERT_TRUE(SetValue(kKey, test_data)); in TEST_F()
222 EXPECT_TRUE(prefs_.GetString(kKey, &value)); in TEST_F()
238 EXPECT_TRUE(prefs_.SetString(kKey, kValue)); in TEST_F()
240 EXPECT_TRUE(base::ReadFileToString(prefs_dir_.Append(kKey), &value)); in TEST_F()
254 EXPECT_TRUE(prefs_.SetString(kKey, kValue)); in TEST_F()
256 EXPECT_TRUE(base::ReadFileToString(subdir.Append(kKey), &value)); in TEST_F()
262 EXPECT_FALSE(prefs_.SetString(kKey, "test value")); in TEST_F()
266 base::CreateDirectory(prefs_dir_.Append(kKey)); in TEST_F()
267 EXPECT_FALSE(prefs_.SetString(kKey, "test value")); in TEST_F()
268 EXPECT_TRUE(base::DirectoryExists(prefs_dir_.Append(kKey))); in TEST_F()
272 ASSERT_TRUE(SetValue(kKey, " \n 25 \t ")); in TEST_F()
274 EXPECT_TRUE(prefs_.GetInt64(kKey, &value)); in TEST_F()
279 ASSERT_TRUE(SetValue(kKey, "30a")); in TEST_F()
281 EXPECT_FALSE(prefs_.GetInt64(kKey, &value)); in TEST_F()
286 kKey, in TEST_F()
289 EXPECT_TRUE(prefs_.GetInt64(kKey, &value)); in TEST_F()
295 kKey, in TEST_F()
298 EXPECT_TRUE(prefs_.GetInt64(kKey, &value)); in TEST_F()
303 ASSERT_TRUE(SetValue(kKey, " \t -100 \n ")); in TEST_F()
305 EXPECT_TRUE(prefs_.GetInt64(kKey, &value)); in TEST_F()
315 EXPECT_TRUE(prefs_.SetInt64(kKey, -123)); in TEST_F()
317 EXPECT_TRUE(base::ReadFileToString(prefs_dir_.Append(kKey), &value)); in TEST_F()
328 EXPECT_TRUE(prefs_.SetInt64(kKey, std::numeric_limits<int64_t>::max())); in TEST_F()
330 EXPECT_TRUE(base::ReadFileToString(prefs_dir_.Append(kKey), &value)); in TEST_F()
336 EXPECT_TRUE(prefs_.SetInt64(kKey, std::numeric_limits<int64_t>::min())); in TEST_F()
338 EXPECT_TRUE(base::ReadFileToString(prefs_dir_.Append(kKey), &value)); in TEST_F()
344 ASSERT_TRUE(SetValue(kKey, " \n false \t ")); in TEST_F()
346 EXPECT_TRUE(prefs_.GetBoolean(kKey, &value)); in TEST_F()
351 const char kKey[] = "test-key"; in TEST_F() local
352 ASSERT_TRUE(SetValue(kKey, " \t true \n ")); in TEST_F()
354 EXPECT_TRUE(prefs_.GetBoolean(kKey, &value)); in TEST_F()
359 const char kKey[] = "test-key"; in TEST_F() local
360 ASSERT_TRUE(SetValue(kKey, "1")); in TEST_F()
362 EXPECT_FALSE(prefs_.GetBoolean(kKey, &value)); in TEST_F()
366 const char kKey[] = "test-key"; in TEST_F() local
367 ASSERT_TRUE(SetValue(kKey, "")); in TEST_F()
369 EXPECT_FALSE(prefs_.GetBoolean(kKey, &value)); in TEST_F()
378 const char kKey[] = "test-bool"; in TEST_F() local
379 EXPECT_TRUE(prefs_.SetBoolean(kKey, true)); in TEST_F()
381 EXPECT_TRUE(base::ReadFileToString(prefs_dir_.Append(kKey), &value)); in TEST_F()
386 const char kKey[] = "test-bool"; in TEST_F() local
387 EXPECT_TRUE(prefs_.SetBoolean(kKey, false)); in TEST_F()
389 EXPECT_TRUE(base::ReadFileToString(prefs_dir_.Append(kKey), &value)); in TEST_F()
394 const char kKey[] = "s p a c e s"; in TEST_F() local
395 EXPECT_FALSE(prefs_.SetBoolean(kKey, true)); in TEST_F()
396 EXPECT_FALSE(base::PathExists(prefs_dir_.Append(kKey))); in TEST_F()
401 EXPECT_FALSE(prefs_.Exists(kKey)); in TEST_F()
404 ASSERT_TRUE(prefs_.SetInt64(kKey, 8)); in TEST_F()
405 EXPECT_TRUE(prefs_.Exists(kKey)); in TEST_F()
410 EXPECT_TRUE(prefs_.Delete(kKey)); in TEST_F()
413 ASSERT_TRUE(prefs_.SetInt64(kKey, 0)); in TEST_F()
414 EXPECT_TRUE(prefs_.Delete(kKey)); in TEST_F()
417 EXPECT_FALSE(prefs_.Exists(kKey)); in TEST_F()
516 prefs_.AddObserver(kKey, &mock_obserser); in TEST_F()
518 EXPECT_CALL(mock_obserser, OnPrefSet(Eq(kKey))); in TEST_F()
520 prefs_.SetString(kKey, "value"); in TEST_F()
524 EXPECT_CALL(mock_obserser, OnPrefDeleted(Eq(kKey))); in TEST_F()
525 prefs_.Delete(kKey); in TEST_F()
541 prefs_.RemoveObserver(kKey, &mock_obserser); in TEST_F()
551 prefs_.SetString(kKey, "value"); in TEST_F()
552 prefs_.Delete(kKey); in TEST_F()
559 prefs_.AddObserver(kKey, &mock_obserser_a); in TEST_F()
560 prefs_.AddObserver(kKey, &mock_obserser_b); in TEST_F()
563 EXPECT_TRUE(prefs_.SetString(kKey, "value")); in TEST_F()
564 prefs_.RemoveObserver(kKey, &mock_obserser_b); in TEST_F()
565 EXPECT_TRUE(prefs_.SetString(kKey, "other value")); in TEST_F()
566 prefs_.RemoveObserver(kKey, &mock_obserser_a); in TEST_F()
567 EXPECT_TRUE(prefs_.SetString(kKey, "yet another value")); in TEST_F()
595 EXPECT_FALSE(prefs_.Exists(kKey)); in TEST_F()
597 EXPECT_FALSE(prefs_.GetInt64(kKey, &value)); in TEST_F()
599 EXPECT_TRUE(prefs_.SetInt64(kKey, 1234)); in TEST_F()
600 EXPECT_TRUE(prefs_.Exists(kKey)); in TEST_F()
601 EXPECT_TRUE(prefs_.GetInt64(kKey, &value)); in TEST_F()
604 EXPECT_TRUE(prefs_.Delete(kKey)); in TEST_F()
605 EXPECT_FALSE(prefs_.Exists(kKey)); in TEST_F()
606 EXPECT_TRUE(prefs_.Delete(kKey)); in TEST_F()
611 EXPECT_TRUE(prefs_.Delete(kKey)); in TEST_F()