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

Unified Diff: content/shell/test_runner/web_frame_test_client.cc

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
« no previous file with comments | « content/shell/test_runner/layout_dump.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/test_runner/web_frame_test_client.cc
diff --git a/content/shell/test_runner/web_frame_test_client.cc b/content/shell/test_runner/web_frame_test_client.cc
index dc8a4eeee553ca9212b1d626f1fc9701819cfe4c..f8fd9e9e4ad7fef3c6ee8e63816cf47e2dfab003 100644
--- a/content/shell/test_runner/web_frame_test_client.cc
+++ b/content/shell/test_runner/web_frame_test_client.cc
@@ -10,6 +10,7 @@
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "content/public/test/test_runner_support.h"
#include "content/shell/test_runner/accessibility_controller.h"
#include "content/shell/test_runner/event_sender.h"
#include "content/shell/test_runner/mock_color_chooser.h"
@@ -44,21 +45,19 @@ namespace test_runner {
namespace {
-void PrintFrameDescription(WebTestDelegate* delegate, blink::WebFrame* frame) {
- std::string name8 = frame->uniqueName().utf8();
+void PrintFrameDescription(WebTestDelegate* delegate,
+ blink::WebLocalFrame* frame) {
+ std::string name = content::GetUniqueNameForFrame(frame);
if (frame == frame->view()->mainFrame()) {
- if (!name8.length()) {
- delegate->PrintMessage("main frame");
- return;
- }
- delegate->PrintMessage(std::string("main frame \"") + name8 + "\"");
+ DCHECK(name.empty());
+ delegate->PrintMessage("main frame");
return;
}
- if (!name8.length()) {
+ if (name.empty()) {
delegate->PrintMessage("frame (anonymous)");
return;
}
- delegate->PrintMessage(std::string("frame \"") + name8 + "\"");
+ delegate->PrintMessage(std::string("frame \"") + name + "\"");
}
void PrintFrameuserGestureStatus(WebTestDelegate* delegate,
« no previous file with comments | « content/shell/test_runner/layout_dump.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698