Lines Matching full:logs
95 // Create a MetricsServiceObserver that will observe logs from |service|. in TEST_F()
156 // Create a MetricsServiceObserver that will observe logs from |service|. in TEST_F()
229 // Set the max log size to be 1 byte so that pretty much all logs will be in TEST_F()
236 // Create a MetricsServiceObserver that will observe logs from |service|. in TEST_F()
260 // Trim logs and verify that |logs_observer| is aware that the log was in TEST_F()
270 // Verifies that MetricsServiceObserver is notified when logs are trimmed due to
271 // enough logs being stored.
276 // essentially means that the log store, when trimming logs, will only keep in TEST_F()
278 // due to having stored enough logs. in TEST_F()
284 // Create a MetricsServiceObserver that will observe logs from |service|. in TEST_F()
292 // Store 3 arbitrary logs. in TEST_F()
301 // Verify that |logs_observer| is aware of the 3 logs. in TEST_F()
306 // Trim logs. in TEST_F()
309 // Verify that all logs except the last one (the most recent one) have been in TEST_F()
325 // Verifies that logs created through MetricsLogStore, which is used by UMA, are
328 // Verify that logs created through MetricsLogStore::StoreLog() will be in TEST_F()
337 // Create a MetricsServiceObserver that will observe UMA logs from in TEST_F()
343 // Load logs from persistent storage, which is needed to internally in TEST_F()
344 // initialize |test_log_store|. There should be no logs loaded. in TEST_F()
346 std::vector<std::unique_ptr<MetricsServiceObserver::Log>>* logs = in TEST_F() local
348 EXPECT_EQ(logs->size(), 0U); in TEST_F()
353 ASSERT_EQ(logs->size(), 1U); in TEST_F()
354 ASSERT_TRUE(logs->back()->type.has_value()); in TEST_F()
355 EXPECT_EQ(logs->back()->type.value(), MetricsLog::LogType::ONGOING_LOG); in TEST_F()
359 ASSERT_EQ(logs->size(), 2U); in TEST_F()
360 ASSERT_TRUE(logs->back()->type.has_value()); in TEST_F()
361 EXPECT_EQ(logs->back()->type.value(), MetricsLog::LogType::INDEPENDENT_LOG); in TEST_F()
365 ASSERT_EQ(logs->size(), 3U); in TEST_F()
366 ASSERT_TRUE(logs->back()->type.has_value()); in TEST_F()
367 EXPECT_EQ(logs->back()->type.value(), in TEST_F()
370 // Store logs in persistent storage, in preparation for the next assertions. in TEST_F()
376 // Verify that logs loaded from persistent storage are annotated with a type. in TEST_F()
384 // Create a MetricsServiceObserver that will observe UMA logs from in TEST_F()
390 // Load logs from persistent storage, which were created previously. in TEST_F()
391 std::vector<std::unique_ptr<MetricsServiceObserver::Log>>* logs = in TEST_F() local
393 EXPECT_EQ(logs->size(), 0U); in TEST_F()
396 // Verify that logs were observed by |logs_observer|, and that they were in TEST_F()
397 // annotated with a type. There should be 3 logs. Note that the order in in TEST_F()
398 // which the logs are loaded (stability first, then ongoing) is hardcoded in in TEST_F()
400 // "ongoing" log (due to limitations on how logs are stored in persistent in TEST_F()
402 ASSERT_EQ(logs->size(), 3U); in TEST_F()
403 ASSERT_TRUE(logs->at(0)->type.has_value()); in TEST_F()
404 EXPECT_EQ(logs->at(0)->type.value(), in TEST_F()
406 ASSERT_TRUE(logs->at(1)->type.has_value()); in TEST_F()
407 EXPECT_EQ(logs->at(1)->type.value(), MetricsLog::LogType::ONGOING_LOG); in TEST_F()
408 ASSERT_TRUE(logs->at(2)->type.has_value()); in TEST_F()
409 EXPECT_EQ(logs->at(2)->type.value(), MetricsLog::LogType::ONGOING_LOG); in TEST_F()
414 // Verify that when loading logs from persistent storage after setting an in TEST_F()
415 // "alternate ongoing log store", the logs are annotated with a type. in TEST_F()
424 // Load logs from persistent storage, which is needed to internally in TEST_F()
425 // initialize |test_log_store|. There should be 3 logs loaded (however, we in TEST_F()
429 // Create a MetricsServiceObserver that will observe UMA logs from in TEST_F()
435 // Verify that |logs_observer| is not aware of any logs (since we started in TEST_F()
436 // observing *after* logs from persistent storage were loaded). in TEST_F()
437 std::vector<std::unique_ptr<MetricsServiceObserver::Log>>* logs = in TEST_F() local
439 EXPECT_EQ(logs->size(), 0U); in TEST_F()
453 // logs from persistent storage. in TEST_F()
457 // Verify that logs were observed by |logs_observer|, and that they were in TEST_F()
458 // annotated with a type. There should be 2 logs. The "independent" log in TEST_F()
459 // should have become an "ongoing" log (due to limitations on how logs are in TEST_F()
461 ASSERT_EQ(logs->size(), 2U); in TEST_F()
462 ASSERT_TRUE(logs->at(0)->type.has_value()); in TEST_F()
463 EXPECT_EQ(logs->at(0)->type.value(), MetricsLog::LogType::ONGOING_LOG); in TEST_F()
464 ASSERT_TRUE(logs->at(1)->type.has_value()); in TEST_F()
465 EXPECT_EQ(logs->at(1)->type.value(), MetricsLog::LogType::ONGOING_LOG); in TEST_F()
476 // JSON string that represents the logs that the observer is aware of.
484 // Create a MetricsServiceObserver that will observe logs from |service|. in TEST_P()
506 // Export logs as a JSON string. in TEST_P()
528 base::Value* logs_list_value = logs_dict.Find("logs"); in TEST_P()