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 ac85df245e22584c5628b14d64a80034f98aec02..1f83572f715674d47e972b3c091a9f77aa8389e2 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/renderer/render_frame_impl.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,20 @@ namespace test_runner { |
namespace { |
-void PrintFrameDescription(WebTestDelegate* delegate, blink::WebFrame* frame) { |
- std::string name8 = frame->uniqueName().utf8(); |
+void PrintFrameDescription(WebTestDelegate* delegate, |
+ blink::WebLocalFrame* frame) { |
+ const std::string& name = |
+ content::RenderFrameImpl::FromWebFrame(frame)->unique_name(); |
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, |