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

Unified Diff: content/shell/test_runner/layout_dump.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/DEPS ('k') | content/shell/test_runner/web_frame_test_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/test_runner/layout_dump.cc
diff --git a/content/shell/test_runner/layout_dump.cc b/content/shell/test_runner/layout_dump.cc
index 9c6837c8aeda5c0350038906e26e4c0aa040e08a..6d4f1d253bdd2a2554edde3f9a306909d0b7da43 100644
--- a/content/shell/test_runner/layout_dump.cc
+++ b/content/shell/test_runner/layout_dump.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/strings/stringprintf.h"
+#include "content/public/test/test_runner_support.h"
#include "third_party/WebKit/public/platform/WebSize.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebDocument.h"
@@ -23,26 +24,26 @@ using blink::WebSize;
namespace {
-std::string DumpFrameHeaderIfNeeded(WebFrame* frame) {
+std::string DumpFrameHeaderIfNeeded(WebLocalFrame* frame) {
std::string result;
// Add header for all but the main frame. Skip empty frames.
if (frame->parent() && !frame->document().documentElement().isNull()) {
result.append("\n--------\nFrame: '");
- result.append(frame->uniqueName().utf8());
+ result.append(content::GetUniqueNameForFrame(frame));
result.append("'\n--------\n");
}
return result;
}
-std::string DumpFrameScrollPosition(WebFrame* frame) {
+std::string DumpFrameScrollPosition(WebLocalFrame* frame) {
std::string result;
WebSize offset = frame->getScrollOffset();
if (offset.width > 0 || offset.height > 0) {
if (frame->parent()) {
result =
- std::string("frame '") + frame->uniqueName().utf8().data() + "' ";
+ std::string("frame '") + content::GetUniqueNameForFrame(frame) + "' ";
}
base::StringAppendF(&result, "scrolled to %d,%d\n", offset.width,
offset.height);
« no previous file with comments | « content/shell/test_runner/DEPS ('k') | content/shell/test_runner/web_frame_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698