| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #import <EarlGrey/EarlGrey.h> | 5 #import <EarlGrey/EarlGrey.h> |
| 6 | 6 |
| 7 #import "ios/chrome/browser/metrics/tab_usage_recorder.h" | 7 #import "ios/chrome/browser/metrics/tab_usage_recorder.h" |
| 8 #import "ios/chrome/browser/metrics/tab_usage_recorder_test_util.h" | 8 #import "ios/chrome/browser/metrics/tab_usage_recorder_test_util.h" |
| 9 #import "ios/chrome/test/app/histogram_test_util.h" | 9 #import "ios/chrome/test/app/histogram_test_util.h" |
| 10 #import "ios/chrome/test/app/tab_test_util.h" | 10 #import "ios/chrome/test/app/tab_test_util.h" |
| 11 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | 11 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |
| 12 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 12 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
| 13 #include "ios/web/public/test/http_server_util.h" | 13 #include "ios/web/public/test/http_server/http_server_util.h" |
| 14 | 14 |
| 15 #if !defined(__has_feature) || !__has_feature(objc_arc) | 15 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 16 #error "This file requires ARC support." | 16 #error "This file requires ARC support." |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 const char kTestUrl[] = | 21 const char kTestUrl[] = |
| 22 "http://ios/testing/data/http_server_files/memory_usage.html"; | 22 "http://ios/testing/data/http_server_files/memory_usage.html"; |
| 23 | 23 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 52 histogramTester.ExpectUniqueSample(kEvictedTabReloadSuccessRate, | 52 histogramTester.ExpectUniqueSample(kEvictedTabReloadSuccessRate, |
| 53 TabUsageRecorder::LOAD_FAILURE, 1, | 53 TabUsageRecorder::LOAD_FAILURE, 1, |
| 54 failureBlock); | 54 failureBlock); |
| 55 histogramTester.ExpectUniqueSample(kDidUserWaitForEvictedTabReload, | 55 histogramTester.ExpectUniqueSample(kDidUserWaitForEvictedTabReload, |
| 56 TabUsageRecorder::USER_WAITED, 1, | 56 TabUsageRecorder::USER_WAITED, 1, |
| 57 failureBlock); | 57 failureBlock); |
| 58 histogramTester.ExpectTotalCount(kEvictedTabReloadTime, 0, failureBlock); | 58 histogramTester.ExpectTotalCount(kEvictedTabReloadTime, 0, failureBlock); |
| 59 } | 59 } |
| 60 | 60 |
| 61 @end | 61 @end |
| OLD | NEW |