[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
mjs at apple.com
mjs at apple.com
Sun Feb 20 23:13:31 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 54741f66c58cdf9fc9d876b432979309929618ed
Author: mjs at apple.com <mjs at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 19 03:16:35 2011 +0000
2011-01-18 Maciej Stachowiak <mjs at apple.com>
Reviewed by Sam Weinig.
WebKitTestRunner should track loading more like DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=52692
Change load tracking to track the current top loading frame, in the manner of DumpRenderTree.
This makes some tests that call notifyDone multiple times pass.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::InjectedBundle):
(WTR::InjectedBundle::done):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
(WTR::InjectedBundle::topLoadingFrame):
(WTR::InjectedBundle::setTopLoadingFrame):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
(WTR::InjectedBundlePage::stopLoading):
(WTR::InjectedBundlePage::didStartProvisionalLoadForFrame):
(WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame):
(WTR::InjectedBundlePage::didFinishLoadForFrame):
(WTR::InjectedBundlePage::didFailLoadWithErrorForFrame):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR::LayoutTestController::notifyDone):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::didReceiveMessageFromInjectedBundle):
2011-01-18 Maciej Stachowiak <mjs at apple.com>
Reviewed by Sam Weinig.
WebKitTestRunner should track loading more like DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=52692
Relax the message check in didSaveFrameToPageCache a bit more, since
layout tests were still hitting the old one.
* UIProcess/WebPageProxy.cpp:
(WebKit::isDisconnectedFrame):
(WebKit::WebPageProxy::didSaveFrameToPageCache):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/editing/pasteboard/copy-null-characters.html b/LayoutTests/editing/pasteboard/copy-null-characters.html
index c92ab8b..8ee26d6 100644
--- a/LayoutTests/editing/pasteboard/copy-null-characters.html
+++ b/LayoutTests/editing/pasteboard/copy-null-characters.html
@@ -18,6 +18,7 @@ function runTest()
var destinationRichText = document.getElementById("destination-rich-text");
sel.setPosition(destinationRichText, 0);
document.execCommand("Paste");
+ alert(destinationRichText.innerHTML);
var destinationPlainText = document.getElementById("destination-plain-text");
destinationPlainText.focus();
@@ -29,6 +30,8 @@ function runTest()
results.innerText = "Plain text field has the wrong value (expected " +
JSON.stringify(expectedPlainTextValue) + " but found " +
JSON.stringify(destinationPlainText.value) + ").";
+ Markup.dump(document.body);
+ Markup.notifyDone();
return;
}
@@ -52,6 +55,8 @@ function runTest()
results.innerText = "Plain text field has the wrong value (expected " +
JSON.stringify(expectedPlainTextValue2) + " but found " +
JSON.stringify(destinationPlainText.value) + ").";
+ Markup.dump(document.body);
+ Markup.notifyDone();
return;
}
diff --git a/LayoutTests/fast/events/scroll-event-does-not-bubble.html b/LayoutTests/fast/events/scroll-event-does-not-bubble.html
index 1e85113..0686350 100644
--- a/LayoutTests/fast/events/scroll-event-does-not-bubble.html
+++ b/LayoutTests/fast/events/scroll-event-does-not-bubble.html
@@ -14,6 +14,9 @@ function divScrolled() {
document.getElementById('result').innerHTML = 'SUCCESS: div.onscroll was called, but window.onscroll was not.';
// Don't call notifyDone straight away, in case there's another scroll event coming/bubbling.
doneTimeout = setTimeout(function() {
+
+ // Don't pollute the test result with nonsense.
+ document.getElementById('container').innerHTML = '';
if (window.layoutTestController)
layoutTestController.notifyDone();
}, 100);
@@ -32,9 +35,6 @@ function runTest() {
div.onscroll = divScrolled;
window.onscroll = windowScrolled;
div.scrollByLines(1);
-
- // Don't pollute the test result with nonsense.
- div.innerHTML = '';
}
</script>
diff --git a/LayoutTests/platform/mac-wk2/Skipped b/LayoutTests/platform/mac-wk2/Skipped
index 087bd26..7239146 100644
--- a/LayoutTests/platform/mac-wk2/Skipped
+++ b/LayoutTests/platform/mac-wk2/Skipped
@@ -976,6 +976,7 @@ java
# WebKit2 needs layoutTestController.overridePreference
# <https://bugs.webkit.org/show_bug.cgi?id=42197>
+http/tests/navigation/go-back-to-error-page.html
http/tests/navigation/ping-cookie.html
plugins/application-plugin-plugins-disabled.html
fast/canvas/webgl/context-lost-restored.html
@@ -1084,6 +1085,7 @@ media/restore-from-page-cache.html
# Pasteboard doesn't work in WebKit2
# <https://bugs.webkit.org/show_bug.cgi?id=42317>
+editing/pasteboard/copy-null-characters.html
editing/execCommand/4128080-2.html
editing/execCommand/5939887.html
editing/execCommand/copy-without-selection.html
@@ -2333,3 +2335,24 @@ http/tests/media/video-buffered.html
# These require DRT setSerializeHTTPLoads implementation for WebKit2 to be reliable.
http/tests/local/link-stylesheet-load-order.html
http/tests/local/link-stylesheet-load-order-preload.html
+
+
+# Transitions sometimes don't stop when they should
+transitions/hang-with-bad-transition-list.html
+transitions/remove-transition-style.html
+transitions/repeated-firing-background-color.html
+transitions/zero-duration-with-non-zero-delay-end.html
+
+
+# CSSValue and CSSPrimitiveValue prototypes are wrong
+fast/dom/global-constructors.html
+
+# WebKit2 doesn't support tiled layers
+compositing/tiling/huge-layer-resize.html
+
+# Unexplained plugin failures
+plugins/destroy-reentry.html
+platform/mac/plugins/testplugin-onnew-onpaint.html
+plugins/destroy-stream-twice.html
+plugins/embed-inside-object.html
+plugins/no-mime-with-valid-extension.html
diff --git a/LayoutTests/transitions/remove-transition-style.html b/LayoutTests/transitions/remove-transition-style.html
index 371f81e..548d615 100644
--- a/LayoutTests/transitions/remove-transition-style.html
+++ b/LayoutTests/transitions/remove-transition-style.html
@@ -51,6 +51,7 @@
function startTransition()
{
var box = document.getElementById('box');
+ box.addEventListener("webkitTransitionEnd", function() { alert("end"); }, false);
box.className = 'animated';
window.setTimeout(function() {
box.style.opacity = '0.5';
@@ -67,4 +68,4 @@
<div id="results"></div>
</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index 9779e1a..72d950e 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-18 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKitTestRunner should track loading more like DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=52692
+
+ Relax the message check in didSaveFrameToPageCache a bit more, since
+ layout tests were still hitting the old one.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::isDisconnectedFrame):
+ (WebKit::WebPageProxy::didSaveFrameToPageCache):
+
2011-01-18 Brady Eidson <beidson at apple.com>
Reviewed by Darin Adler.
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.cpp b/Source/WebKit2/UIProcess/WebPageProxy.cpp
index 4ff6888..2693f9a 100644
--- a/Source/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit2/UIProcess/WebPageProxy.cpp
@@ -1082,6 +1082,11 @@ void WebPageProxy::didCreateSubframe(uint64_t frameID, uint64_t parentFrameID)
parentFrame->appendChild(subFrame.get());
}
+static bool isDisconnectedFrame(WebFrameProxy* frame)
+{
+ return !frame->page() || !frame->page()->mainFrame() || !frame->isDescendantOf(frame->page()->mainFrame());
+}
+
void WebPageProxy::didSaveFrameToPageCache(uint64_t frameID)
{
MESSAGE_CHECK(m_mainFrame);
@@ -1089,7 +1094,7 @@ void WebPageProxy::didSaveFrameToPageCache(uint64_t frameID)
WebFrameProxy* subframe = process()->webFrame(frameID);
MESSAGE_CHECK(subframe);
- if (!subframe->parentFrame())
+ if (isDisconnectedFrame(subframe))
return;
MESSAGE_CHECK(subframe->isDescendantOf(m_mainFrame.get()));
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 8cbfcc3..9e83431 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,32 @@
+2011-01-18 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKitTestRunner should track loading more like DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=52692
+
+ Change load tracking to track the current top loading frame, in the manner of DumpRenderTree.
+ This makes some tests that call notifyDone multiple times pass.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::InjectedBundle):
+ (WTR::InjectedBundle::done):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+ (WTR::InjectedBundle::topLoadingFrame):
+ (WTR::InjectedBundle::setTopLoadingFrame):
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+ (WTR::InjectedBundlePage::stopLoading):
+ (WTR::InjectedBundlePage::didStartProvisionalLoadForFrame):
+ (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame):
+ (WTR::InjectedBundlePage::didFinishLoadForFrame):
+ (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame):
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ (WTR::LayoutTestController::notifyDone):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::didReceiveMessageFromInjectedBundle):
+
2011-01-18 Mihai Parparita <mihaip at chromium.org>
Reviewed by Kent Tamura.
diff --git a/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
index a691951..5903f78 100644
--- a/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
+++ b/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
@@ -266,6 +266,8 @@ unsigned LayoutTestController::workerThreadCount() const
void LayoutTestController::notifyDone()
{
+ puts("notifyDone");
+
if (m_waitToDump && !topLoadingFrame && !WorkQueue::shared()->count())
dump();
m_waitToDump = false;
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
index 999ca3a..972a606 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
@@ -47,6 +47,7 @@ InjectedBundle& InjectedBundle::shared()
InjectedBundle::InjectedBundle()
: m_bundle(0)
+ , m_topLoadingFrame(0)
, m_state(Idle)
{
}
@@ -161,6 +162,7 @@ void InjectedBundle::done()
m_state = Stopping;
page()->stopLoading();
+ setTopLoadingFrame(0);
WKRetainPtr<WKStringRef> doneMessageName(AdoptWK, WKStringCreateWithUTF8CString("Done"));
WKRetainPtr<WKStringRef> doneMessageBody(AdoptWK, WKStringCreateWithUTF8CString(m_outputStream.str().c_str()));
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
index c1d8b37..9778441 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
@@ -65,6 +65,9 @@ public:
bool isTestRunning() { return m_state == Testing; }
+ WKBundleFrameRef topLoadingFrame() { return m_topLoadingFrame; }
+ void setTopLoadingFrame(WKBundleFrameRef frame) { m_topLoadingFrame = frame; }
+
private:
InjectedBundle();
~InjectedBundle();
@@ -89,6 +92,8 @@ private:
RefPtr<GCController> m_gcController;
RefPtr<EventSendingController> m_eventSendingController;
+ WKBundleFrameRef m_topLoadingFrame;
+
std::ostringstream m_outputStream;
enum State {
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index 4bcb3c8..c90f914 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -37,6 +37,8 @@
#include <WebKit2/WKBundleFramePrivate.h>
#include <WebKit2/WKBundlePagePrivate.h>
+#include <WebKit2/WKStringCF.h>
+
using namespace std;
namespace WTR {
@@ -168,7 +170,6 @@ static ostream& operator<<(ostream& out, WKBundleFrameRef frame)
InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
: m_page(page)
, m_world(AdoptWK, WKBundleScriptWorldCreateWorld())
- , m_isLoading(false)
{
WKBundlePageLoaderClient loaderClient = {
0,
@@ -233,7 +234,6 @@ InjectedBundlePage::~InjectedBundlePage()
void InjectedBundlePage::stopLoading()
{
WKBundlePageStopLoading(m_page);
- m_isLoading = false;
}
void InjectedBundlePage::reset()
@@ -334,8 +334,9 @@ void InjectedBundlePage::didStartProvisionalLoadForFrame(WKBundleFrameRef frame)
if (!InjectedBundle::shared().isTestRunning())
return;
- if (frame == WKBundlePageGetMainFrame(m_page))
- m_isLoading = true;
+ if (InjectedBundle::shared().topLoadingFrame())
+ return;
+ InjectedBundle::shared().setTopLoadingFrame(frame);
}
void InjectedBundlePage::didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef frame)
@@ -344,6 +345,17 @@ void InjectedBundlePage::didReceiveServerRedirectForProvisionalLoadForFrame(WKBu
void InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame(WKBundleFrameRef frame, WKErrorRef error)
{
+ if (!InjectedBundle::shared().isTestRunning())
+ return;
+
+ if (frame != InjectedBundle::shared().topLoadingFrame())
+ return;
+ InjectedBundle::shared().setTopLoadingFrame(0);
+
+ if (InjectedBundle::shared().layoutTestController()->waitToDump())
+ return;
+
+ InjectedBundle::shared().done();
}
void InjectedBundlePage::didCommitLoadForFrame(WKBundleFrameRef frame)
@@ -475,18 +487,14 @@ void InjectedBundlePage::didFinishLoadForFrame(WKBundleFrameRef frame)
if (!InjectedBundle::shared().isTestRunning())
return;
- if (!WKBundleFrameIsMainFrame(frame))
- return;
-
- m_isLoading = false;
-
- if (this != InjectedBundle::shared().page())
+ if (frame != InjectedBundle::shared().topLoadingFrame())
return;
+ InjectedBundle::shared().setTopLoadingFrame(0);
if (InjectedBundle::shared().layoutTestController()->waitToDump())
return;
- dump();
+ InjectedBundle::shared().page()->dump();
}
void InjectedBundlePage::didFailLoadWithErrorForFrame(WKBundleFrameRef frame, WKErrorRef)
@@ -494,12 +502,11 @@ void InjectedBundlePage::didFailLoadWithErrorForFrame(WKBundleFrameRef frame, WK
if (!InjectedBundle::shared().isTestRunning())
return;
- if (!WKBundleFrameIsMainFrame(frame))
+ if (frame != InjectedBundle::shared().topLoadingFrame())
return;
+ InjectedBundle::shared().setTopLoadingFrame(0);
- m_isLoading = false;
-
- if (this != InjectedBundle::shared().page())
+ if (InjectedBundle::shared().layoutTestController()->waitToDump())
return;
InjectedBundle::shared().done();
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
index e9462df..3b99109 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
@@ -41,7 +41,6 @@ public:
void dump();
void stopLoading();
- bool isLoading() { return m_isLoading; }
void reset();
@@ -124,7 +123,6 @@ private:
WKBundlePageRef m_page;
WKRetainPtr<WKBundleScriptWorldRef> m_world;
WKRetainPtr<WKBundleBackForwardListItemRef> m_previousTestBackForwardListItem;
- bool m_isLoading;
};
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
index aa3dbf4..c8a6f84 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
@@ -132,8 +132,9 @@ void LayoutTestController::notifyDone()
if (!InjectedBundle::shared().isTestRunning())
return;
- if (m_waitToDump && !InjectedBundle::shared().page()->isLoading())
+ if (m_waitToDump && !InjectedBundle::shared().topLoadingFrame())
InjectedBundle::shared().page()->dump();
+
m_waitToDump = false;
}
diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
index 699982e..2557424 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -386,6 +386,8 @@ void TestController::didReceiveSynchronousMessageFromInjectedBundle(WKContextRef
void TestController::didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody)
{
+ if (!m_currentInvocation)
+ return;
m_currentInvocation->didReceiveMessageFromInjectedBundle(messageName, messageBody);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list