
This CL is a part of moving mojom::FrameHost::UpdateState to blink,
and moves content::UniqueNameHelper to blink, and a unit test file
will be moved with a followup CL for moving
{page_state_serialization.cc, h} by the dependency.
Bug: 1110246
Change-Id: Iaae877403e27eeda2146191854e1a6f2b29f2e87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2415912
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Cr-Commit-Position: refs/heads/master@{#808329}
24 lines
909 B
C++
24 lines
909 B
C++
// 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.
|
|
|
|
#include "content/public/test/blink_test_browser_support.h"
|
|
|
|
#include "content/browser/renderer_host/frame_tree_node.h"
|
|
#include "content/browser/renderer_host/render_frame_host_impl.h"
|
|
#include "content/public/browser/render_frame_host.h"
|
|
#include "third_party/blink/public/common/unique_name/unique_name_helper.h"
|
|
|
|
namespace content {
|
|
|
|
std::string GetFrameNameFromBrowserForWebTests(
|
|
RenderFrameHost* render_frame_host) {
|
|
RenderFrameHostImpl* render_frame_host_impl =
|
|
static_cast<RenderFrameHostImpl*>(render_frame_host);
|
|
FrameTreeNode* frame_tree_node = render_frame_host_impl->frame_tree_node();
|
|
return blink::UniqueNameHelper::ExtractStableNameForTesting(
|
|
frame_tree_node->unique_name());
|
|
}
|
|
|
|
} // namespace content
|