summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/mobile_metrics/mobile_metrics_test_helpers.h
blob: 1601f8bf878f4e55bec75dc275a01cbd0dc45bab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_MOBILE_METRICS_MOBILE_METRICS_TEST_HELPERS_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_MOBILE_METRICS_MOBILE_METRICS_TEST_HELPERS_H_

#include "third_party/blink/public/common/mobile_metrics/mobile_friendliness.h"
#include "third_party/blink/renderer/core/frame/frame_test_helpers.h"

namespace blink {
namespace mobile_metrics_test_helpers {

class TestWebFrameClient : public frame_test_helpers::TestWebFrameClient {
 public:
  void DidChangeMobileFriendliness(const MobileFriendliness& mf) override {
    mobile_friendliness_ = mf;
  }
  const MobileFriendliness& GetMobileFriendliness() const {
    return mobile_friendliness_;
  }

 private:
  MobileFriendliness mobile_friendliness_;
};

}  // namespace mobile_metrics_test_helpers
}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_MOBILE_METRICS_MOBILE_METRICS_TEST_HELPERS_H_