[unseasoned-pdf] Make sent_message_
private.
Make `sent_message_` a private member of FakePdfViewPluginBase and provide a public accessor for it. Change-Id: I68cabfc6bdc7bc2821a06850d94801ac9fa4ffed Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2812506 Commit-Queue: Hui Yingst <nigi@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#870595}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
ac2ec0fa49
commit
10bbbd8618
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2020 The Chromium Authors. All rights reserved.
|
// Copyright 2021 The Chromium Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
@@ -122,6 +122,9 @@ class FakePdfViewPluginBase : public PdfViewPluginBase {
|
|||||||
|
|
||||||
MOCK_METHOD(void, UserMetricsRecordAction, (const std::string&), (override));
|
MOCK_METHOD(void, UserMetricsRecordAction, (const std::string&), (override));
|
||||||
|
|
||||||
|
const base::Value& sent_message() const { return sent_message_; }
|
||||||
|
|
||||||
|
private:
|
||||||
base::Value sent_message_;
|
base::Value sent_message_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -140,7 +143,7 @@ TEST_F(PdfViewPluginBaseTest, ConsumeSaveToken) {
|
|||||||
expected_message.SetStringKey("type", "consumeSaveToken");
|
expected_message.SetStringKey("type", "consumeSaveToken");
|
||||||
expected_message.SetStringKey("token", kTokenString);
|
expected_message.SetStringKey("token", kTokenString);
|
||||||
|
|
||||||
EXPECT_EQ(expected_message, fake_plugin_.sent_message_);
|
EXPECT_EQ(expected_message, fake_plugin_.sent_message());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(PdfViewPluginBaseTest, HandleSetBackgroundColorMessage) {
|
TEST_F(PdfViewPluginBaseTest, HandleSetBackgroundColorMessage) {
|
||||||
|
Reference in New Issue
Block a user