Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1173)

Unified Diff: third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp

Issue 2714943004: Move unique name generation and tracking into //content. (Closed)
Patch Set: Rebase again. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp
diff --git a/third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp b/third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp
index bf5f5d24436939397d5d842f624acaeff7f28488..731b037a477c64f152a9292b40c3dbefe3c7521d 100644
--- a/third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp
+++ b/third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp
@@ -100,18 +100,6 @@ TestWebViewClient* defaultWebViewClient() {
return &client;
}
-// |uniqueName| is normally calculated in a somewhat complicated way by the
-// FrameTree class, but for test purposes the approximation below should be
-// close enough.
-String nameToUniqueName(const String& name) {
- static int uniqueNameCounter = 0;
- StringBuilder uniqueName;
- uniqueName.append(name);
- uniqueName.append(' ');
- uniqueName.appendNumber(uniqueNameCounter++);
- return uniqueName.toString();
-}
-
} // namespace
void loadFrame(WebFrame* frame, const std::string& url) {
@@ -176,8 +164,7 @@ WebLocalFrameImpl* createLocalChild(WebRemoteFrame* parent,
client = defaultWebFrameClient();
WebLocalFrameImpl* frame = toWebLocalFrameImpl(parent->createLocalChild(
- WebTreeScopeType::Document, name, nameToUniqueName(name),
- WebSandboxFlags::None, client,
+ WebTreeScopeType::Document, name, WebSandboxFlags::None, client,
static_cast<TestWebFrameClient*>(client)->interfaceProvider(), nullptr,
previousSibling, properties, nullptr));
@@ -191,9 +178,9 @@ WebLocalFrameImpl* createLocalChild(WebRemoteFrame* parent,
WebRemoteFrameImpl* createRemoteChild(WebRemoteFrame* parent,
WebRemoteFrameClient* client,
const WebString& name) {
- return toWebRemoteFrameImpl(parent->createRemoteChild(
- WebTreeScopeType::Document, name, nameToUniqueName(name),
- WebSandboxFlags::None, client, nullptr));
+ return toWebRemoteFrameImpl(
+ parent->createRemoteChild(WebTreeScopeType::Document, name,
+ WebSandboxFlags::None, client, nullptr));
}
WebViewHelper::WebViewHelper(SettingOverrider* settingOverrider)
@@ -316,7 +303,7 @@ WebLocalFrame* TestWebFrameClient::createChildFrame(
WebLocalFrame* parent,
WebTreeScopeType scope,
const WebString& name,
- const WebString& uniqueName,
+ const WebString& fallbackName,
WebSandboxFlags sandboxFlags,
const WebFrameOwnerProperties& frameOwnerProperties) {
WebLocalFrame* frame =
« no previous file with comments | « third_party/WebKit/Source/web/tests/FrameTestHelpers.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698