Modified: trunk/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp (133165 => 133166)
--- trunk/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp 2012-11-01 14:24:34 UTC (rev 133165)
+++ trunk/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp 2012-11-01 14:25:10 UTC (rev 133166)
@@ -373,12 +373,12 @@
if (frame->tree()->parent())
s = String::format("\n--------\nFrame: '%s'\n--------\n", frame->tree()->uniqueName().string().utf8().data());
- s += documentElement->innerText() + "\n";
+ s = s + documentElement->innerText() + "\n";
if (gTestRunner->dumpChildFramesAsText()) {
WebCore::FrameTree* tree = frame->tree();
for (WebCore::Frame* child = tree->firstChild(); child; child = child->tree()->nextSibling())
- s += dumpFramesAsText(child);
+ s = s + dumpFramesAsText(child);
}
return s;
}
@@ -426,11 +426,11 @@
int start = 0;
if (current) {
- result += "curr->";
+ result = result + "curr->";
start = 6;
}
for (int i = start; i < indent; i++)
- result += " ";
+ result = result + " ";
String url = ""
if (url.contains("file://")) {
@@ -441,25 +441,25 @@
if (res.isEmpty())
return result;
- result += fileTestString;
- result += res;
+ result = result + fileTestString;
+ result = result + res;
} else
- result += url;
+ result = result + url;
String target = item->target();
if (!target.isEmpty())
- result += " (in frame \"" + target + "\")";
+ result = result + " (in frame \"" + target + "\")";
if (item->isTargetItem())
- result += " **nav target**";
- result += "\n";
+ result = result + " **nav target**";
+ result = result + "\n";
WebCore::HistoryItemVector children = item->children();
// Must sort to eliminate arbitrary result ordering which defeats reproducible testing.
nonCopyingSort(children.begin(), children.end(), historyItemCompare);
unsigned resultSize = children.size();
for (unsigned i = 0; i < resultSize; ++i)
- result += dumpHistoryItem(children[i], indent + 4, false);
+ result = result + dumpHistoryItem(children[i], indent + 4, false);
return result;
}
@@ -476,16 +476,16 @@
bfList->backListWithLimit(maxItems, entries);
unsigned resultSize = entries.size();
for (unsigned i = 0; i < resultSize; ++i)
- result += dumpHistoryItem(entries[i], 8, false);
+ result = result + dumpHistoryItem(entries[i], 8, false);
- result += dumpHistoryItem(bfList->currentItem(), 8, true);
+ result = result + dumpHistoryItem(bfList->currentItem(), 8, true);
bfList->forwardListWithLimit(maxItems, entries);
resultSize = entries.size();
for (unsigned i = 0; i < resultSize; ++i)
- result += dumpHistoryItem(entries[i], 8, false);
+ result = result + dumpHistoryItem(entries[i], 8, false);
- result += "===============================================\n";
+ result = result + "===============================================\n";
return result;
}
@@ -506,7 +506,7 @@
String data = "" ? dumpFramesAsText(mainFrame) : renderTreeDump();
if (gTestRunner->dumpBackForwardList())
- data += dumpBackForwardListForWebView();
+ data = "" + dumpBackForwardListForWebView();
String result = "Content-Type: " + resultMimeType + "\n" + data;
@@ -631,7 +631,7 @@
if (gTestRunner->dumpFrameLoadCallbacks())
printf("%s - didFinishDocumentLoadForFrame\n", drtFrameDescription(frame).utf8().data());
else {
- unsigned pendingFrameUnloadEvents = frame->domWindow()->pendingUnloadEventListeners();
+ unsigned pendingFrameUnloadEvents = frame->document()->domWindow()->pendingUnloadEventListeners();
if (pendingFrameUnloadEvents)
printf("%s - has %u onunload handler(s)\n", drtFrameDescription(frame).utf8().data(), pendingFrameUnloadEvents);
}
@@ -664,7 +664,7 @@
printf("%s - didReceiveTitle: %s\n", drtFrameDescription(frame).utf8().data(), title.utf8().data());
if (gTestRunner->dumpTitleChanges())
- printf("TITLE CHANGED: '%s'\n", title.utf8().data());
+ printf("TITLE CHANGED: %s\n", title.utf8().data());
}
// ChromeClient delegates.
@@ -691,10 +691,8 @@
void DumpRenderTree::runJavaScriptAlert(const String& message)
{
- if (!testDone) {
+ if (!testDone)
printf("ALERT: %s\n", message.utf8().data());
- fflush(stdout);
- }
}
bool DumpRenderTree::runJavaScriptConfirm(const String& message)
@@ -767,12 +765,6 @@
printf("EDITING DELEGATE: webViewDidChangeSelection:%s\n", "WebViewDidChangeSelectionNotification");
}
-bool DumpRenderTree::findString(const String& string, WebCore::FindOptions options)
-{
- WebCore::Page* page = mainFrame ? mainFrame->page() : 0;
- return page && page->findString(string, options);
-}
-
bool DumpRenderTree::shouldBeginEditingInDOMRange(WebCore::Range* range)
{
if (!testDone && gTestRunner->dumpEditingCallbacks())
Modified: trunk/Tools/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h (133165 => 133166)
--- trunk/Tools/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h 2012-11-01 14:24:34 UTC (rev 133165)
+++ trunk/Tools/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h 2012-11-01 14:25:10 UTC (rev 133166)
@@ -23,11 +23,11 @@
#include "DumpRenderTreeClient.h"
-#include "PlatformString.h"
#include "Timer.h"
#include <BlackBerryPlatformLayoutTest.h>
#include <FindOptions.h>
#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
namespace WebCore {
class Credential;
@@ -94,7 +94,6 @@
void didEndEditing();
void didChange();
void didChangeSelection();
- bool findString(const String&, WebCore::FindOptions);
bool shouldBeginEditingInDOMRange(WebCore::Range*);
bool shouldEndEditingInDOMRange(WebCore::Range*);
bool shouldDeleteDOMRange(WebCore::Range*);
Modified: trunk/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp (133165 => 133166)
--- trunk/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp 2012-11-01 14:24:34 UTC (rev 133165)
+++ trunk/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp 2012-11-01 14:25:10 UTC (rev 133166)
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2009, 2010, 2012 Research In Motion Limited. All rights reserved.
- * Copyright (C) 2012 Apple Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -20,7 +19,6 @@
#include "config.h"
#include "TestRunner.h"
-#include "CString.h"
#include "DatabaseTracker.h"
#include "Document.h"
#include "DocumentLoader.h"
@@ -36,14 +34,12 @@
#include "JSElement.h"
#include "KURL.h"
#include "NotImplemented.h"
-#include "OwnArrayPtr.h"
#include "Page.h"
#include "RenderTreeAsText.h"
#include "SchemeRegistry.h"
#include "SecurityOrigin.h"
#include "SecurityPolicy.h"
#include "Settings.h"
-#include "UnusedParam.h"
#include "WorkQueue.h"
#include "WorkQueueItem.h"
#include "WorkerThread.h"
@@ -53,6 +49,10 @@
#include <WebPage.h>
#include <WebSettings.h>
+#include <wtf/OwnArrayPtr.h>
+#include <wtf/UnusedParam.h>
+#include <wtf/text/CString.h>
+
using WebCore::toElement;
using WebCore::toJS;
@@ -452,10 +452,10 @@
DumpRenderTreeSupport::setMockGeolocationPosition(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), latitude, longitude, accuracy);
}
-void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef message)
+void TestRunner::setMockGeolocationError(int code, JSStringRef message)
{
String messageStr = jsStringRefToWebCoreString(message);
- DumpRenderTreeSupport::setMockGeolocationPositionUnavailableError(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), messageStr);
+ DumpRenderTreeSupport::setMockGeolocationError(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), code, messageStr);
}
void TestRunner::showWebInspector()
@@ -587,6 +587,12 @@
return DumpRenderTreeSupport::computedStyleIncludingVisitedInfo(context, value);
}
+JSRetainPtr<JSStringRef> TestRunner::layerTreeAsText() const
+{
+ notImplemented();
+ return 0;
+}
+
JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
{
WebCore::Element* element = toElement(toJS(toJS(context), nodeObject));
@@ -746,9 +752,7 @@
options |= WebCore::StartInSelection;
}
- // Our layout tests assume find will wrap and highlight all matches.
- return BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->findNextString(nameStr.utf8().data(),
- !(options & WebCore::Backwards), !(options & WebCore::CaseInsensitive), true /* wrap */, true /* highlightAllMatches */);
+ return mainFrame->page()->findString(nameStr, options);
}
void TestRunner::deleteLocalStorageForOrigin(JSStringRef URL)
@@ -839,3 +843,9 @@
{
notImplemented();
}
+
+void TestRunner::setStorageDatabaseIdleInterval(double)
+{
+ // FIXME: Implement this.
+ notImplemented();
+}