Title: [100575] branches/chromium/912
Revision
100575
Author
[email protected]
Date
2011-11-17 00:37:08 -0800 (Thu, 17 Nov 2011)

Log Message

Merge 99579
BUG=101235
Review URL: http://codereview.chromium.org/8587027

Modified Paths

Added Paths

Diff

Copied: branches/chromium/912/LayoutTests/fast/loader/stateobjects/replacestate-in-onunload-expected.txt (from rev 99579, trunk/LayoutTests/fast/loader/stateobjects/replacestate-in-onunload-expected.txt) (0 => 100575)


--- branches/chromium/912/LayoutTests/fast/loader/stateobjects/replacestate-in-onunload-expected.txt	                        (rev 0)
+++ branches/chromium/912/LayoutTests/fast/loader/stateobjects/replacestate-in-onunload-expected.txt	2011-11-17 08:37:08 UTC (rev 100575)
@@ -0,0 +1,4 @@
+This test calls replaceState during the onload handler to verify that the correct document's state is modified. If the test succeeds the URL and text below will show a success message.
+
+PASS
+

Copied: branches/chromium/912/LayoutTests/fast/loader/stateobjects/replacestate-in-onunload.html (from rev 99579, trunk/LayoutTests/fast/loader/stateobjects/replacestate-in-onunload.html) (0 => 100575)


--- branches/chromium/912/LayoutTests/fast/loader/stateobjects/replacestate-in-onunload.html	                        (rev 0)
+++ branches/chromium/912/LayoutTests/fast/loader/stateobjects/replacestate-in-onunload.html	2011-11-17 08:37:08 UTC (rev 100575)
@@ -0,0 +1,36 @@
+<html>
+<head>
+<script>
+
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+}
+
+function log(txt)
+{
+    document.getElementById("logger").innerText += txt + "\n";
+}
+
+
+window._onload_ = function()
+{
+    if (!window.location.search) {
+        window._onunload_ = function() { history.replaceState({}, '', '?FAIL') }
+        window.location = window.location.href + "?PASS";
+    } else {
+        log(window.location.search.slice(1));
+        if (window.layoutTestController)
+            layoutTestController.notifyDone();
+    }
+}
+
+</script>
+<body>
+<p>
+This test calls replaceState during the onload handler to verify that the correct document's state is modified.
+If the test succeeds the URL and text below will show a success message.
+</p>
+<pre id="logger"></pre>
+</body>
+</html>

Modified: branches/chromium/912/Source/WebCore/dom/Document.cpp (100574 => 100575)


--- branches/chromium/912/Source/WebCore/dom/Document.cpp	2011-11-17 08:25:40 UTC (rev 100574)
+++ branches/chromium/912/Source/WebCore/dom/Document.cpp	2011-11-17 08:37:08 UTC (rev 100575)
@@ -5163,7 +5163,7 @@
     if (!m_frame)
         return 0;
     
-    DocumentLoader* loader = m_frame->loader()->activeDocumentLoader();
+    DocumentLoader* loader = m_frame->loader()->documentLoader();
     if (!loader)
         return 0;
     
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to