- Revision
- 153973
- Author
- [email protected]
- Date
- 2013-08-12 20:44:57 -0700 (Mon, 12 Aug 2013)
Log Message
http/tests/security/sandboxed-iframe-invalid.html is flaky on Mac
https://bugs.webkit.org/show_bug.cgi?id=85522
Reviewed by Andy Estes.
Source/WebCore:
Drive-by FIXMEs and trivial fixes for WebCore issues I noticed while working
on this bug. No behavior change expected.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::findFrameForNavigation):
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledFormSubmission::fire):
Tools:
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:addMessageToConsole:withSource:]): Don't print console messages
when already done with a test. We already had this check in all UI delegate functions,
except for -webView:addMessageToConsole:withSource: somehow.
LayoutTests:
* http/tests/security/sandboxed-iframe-form-top-expected.txt: Console logging got
improved while this test was marked as skipped or flaky, updating the results.
* platform/mac/TestExpectations: Removed sandboxed-iframe-form-top.html, this test
no longer leaks output into later ones. The test was erroneously marked as flaky
instead of skipped, but now it's good.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (153972 => 153973)
--- trunk/LayoutTests/ChangeLog 2013-08-13 03:34:26 UTC (rev 153972)
+++ trunk/LayoutTests/ChangeLog 2013-08-13 03:44:57 UTC (rev 153973)
@@ -1,3 +1,17 @@
+2013-08-12 Alexey Proskuryakov <[email protected]>
+
+ http/tests/security/sandboxed-iframe-invalid.html is flaky on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=85522
+
+ Reviewed by Andy Estes.
+
+ * http/tests/security/sandboxed-iframe-form-top-expected.txt: Console logging got
+ improved while this test was marked as skipped or flaky, updating the results.
+
+ * platform/mac/TestExpectations: Removed sandboxed-iframe-form-top.html, this test
+ no longer leaks output into later ones. The test was erroneously marked as flaky
+ instead of skipped, but now it's good.
+
2013-08-12 Ryuan Choi <[email protected]>
[EFL] Unreviewed gardening.
Modified: trunk/LayoutTests/http/tests/security/sandboxed-iframe-form-top-expected.txt (153972 => 153973)
--- trunk/LayoutTests/http/tests/security/sandboxed-iframe-form-top-expected.txt 2013-08-13 03:34:26 UTC (rev 153972)
+++ trunk/LayoutTests/http/tests/security/sandboxed-iframe-form-top-expected.txt 2013-08-13 03:44:57 UTC (rev 153973)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: Unsafe _javascript_ attempt to initiate a navigation change for frame with URL http://127.0.0.1:8000/security/sandboxed-iframe-form-top.html from frame with URL http://127.0.0.1:8000/security/resources/sandboxed-iframe-form-top.html.
+CONSOLE MESSAGE: Unsafe _javascript_ attempt to initiate navigation for frame with URL 'http://127.0.0.1:8000/security/sandboxed-iframe-form-top.html' from frame with URL 'http://127.0.0.1:8000/security/resources/sandboxed-iframe-form-top.html'. The frame attempting navigation of the top-level window is sandboxed, but the 'allow-top-navigation' flag is not set.
This tests passes if the sandboxed frame cannot navigate the top frame.
Modified: trunk/LayoutTests/platform/mac/TestExpectations (153972 => 153973)
--- trunk/LayoutTests/platform/mac/TestExpectations 2013-08-13 03:34:26 UTC (rev 153972)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2013-08-13 03:44:57 UTC (rev 153973)
@@ -621,8 +621,6 @@
# Requires ENABLE(MEDIA_CAPTURE)
fast/forms/file/file-input-capture.html
-webkit.org/b/85522 http/tests/security/sandboxed-iframe-form-top.html [ Pass Failure ]
-
webkit.org/b/85523 fullscreen/full-screen-iframe-legacy.html [ Pass Failure ]
webkit.org/b/85525 media/video-played-reset.html [ Pass Failure ]
Modified: trunk/Source/WebCore/ChangeLog (153972 => 153973)
--- trunk/Source/WebCore/ChangeLog 2013-08-13 03:34:26 UTC (rev 153972)
+++ trunk/Source/WebCore/ChangeLog 2013-08-13 03:44:57 UTC (rev 153973)
@@ -1,3 +1,19 @@
+2013-08-12 Alexey Proskuryakov <[email protected]>
+
+ http/tests/security/sandboxed-iframe-invalid.html is flaky on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=85522
+
+ Reviewed by Andy Estes.
+
+ Drive-by FIXMEs and trivial fixes for WebCore issues I noticed while working
+ on this bug. No behavior change expected.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::submitForm):
+ (WebCore::FrameLoader::findFrameForNavigation):
+ * loader/NavigationScheduler.cpp:
+ (WebCore::ScheduledFormSubmission::fire):
+
2013-08-13 Ryosuke Niwa <[email protected]>
Fix variable name |end| -> |size| in EventTarget::fireEventListeners
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (153972 => 153973)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2013-08-13 03:34:26 UTC (rev 153972)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2013-08-13 03:44:57 UTC (rev 153973)
@@ -356,6 +356,12 @@
if (!DOMWindow::allowPopUp(m_frame) && !ScriptController::processingUserGesture())
return;
+ // FIXME: targetFrame can be 0 for two distinct reasons:
+ // 1. The frame was not found by name, so we should try opening a new window.
+ // 2. The frame was found, but navigating it was not allowed, e.g. by HTML5 sandbox or by origin checks.
+ // Continuing form submission makes no sense in the latter case.
+ // There is a repeat check after timer fires, so this is not a correctness issue.
+
targetFrame = m_frame;
} else
submission->clearTarget();
@@ -3088,16 +3094,13 @@
ASSERT(frame != m_frame);
}
- if (activeDocument) {
- if (!activeDocument->canNavigate(frame))
- return 0;
- } else {
- // FIXME: Eventually all callers should supply the actual activeDocument
- // so we can call canNavigate with the right document.
- if (!m_frame->document()->canNavigate(frame))
- return 0;
- }
+ // FIXME: Eventually all callers should supply the actual activeDocument so we can call canNavigate with the right document.
+ if (!activeDocument)
+ activeDocument = m_frame->document();
+ if (!activeDocument->canNavigate(frame))
+ return 0;
+
return frame;
}
Modified: trunk/Source/WebCore/loader/NavigationScheduler.cpp (153972 => 153973)
--- trunk/Source/WebCore/loader/NavigationScheduler.cpp 2013-08-13 03:34:26 UTC (rev 153972)
+++ trunk/Source/WebCore/loader/NavigationScheduler.cpp 2013-08-13 03:44:57 UTC (rev 153973)
@@ -232,7 +232,7 @@
Document* requestingDocument = m_submission->state()->sourceDocument();
if (!requestingDocument->canNavigate(frame))
return;
- FrameLoadRequest frameRequest(requestingDocument->document()->securityOrigin());
+ FrameLoadRequest frameRequest(requestingDocument->securityOrigin());
m_submission->populateFrameLoadRequest(frameRequest);
frame->loader()->loadFrameRequest(frameRequest, lockHistory(), lockBackForwardList(), m_submission->event(), m_submission->state(), MaybeSendReferrer);
}
Modified: trunk/Tools/ChangeLog (153972 => 153973)
--- trunk/Tools/ChangeLog 2013-08-13 03:34:26 UTC (rev 153972)
+++ trunk/Tools/ChangeLog 2013-08-13 03:44:57 UTC (rev 153973)
@@ -1,5 +1,17 @@
2013-08-12 Alexey Proskuryakov <[email protected]>
+ http/tests/security/sandboxed-iframe-invalid.html is flaky on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=85522
+
+ Reviewed by Andy Estes.
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:addMessageToConsole:withSource:]): Don't print console messages
+ when already done with a test. We already had this check in all UI delegate functions,
+ except for -webView:addMessageToConsole:withSource: somehow.
+
+2013-08-12 Alexey Proskuryakov <[email protected]>
+
https://bugs.webkit.org/show_bug.cgi?id=119693
[Mac] security/contentSecurityPolicy/connect-src-websocket-blocked.html is flaky
because of connect-src-websocket-allowed.html
Modified: trunk/Tools/DumpRenderTree/mac/UIDelegate.mm (153972 => 153973)
--- trunk/Tools/DumpRenderTree/mac/UIDelegate.mm 2013-08-13 03:34:26 UTC (rev 153972)
+++ trunk/Tools/DumpRenderTree/mac/UIDelegate.mm 2013-08-13 03:44:57 UTC (rev 153973)
@@ -60,6 +60,9 @@
- (void)webView:(WebView *)sender addMessageToConsole:(NSDictionary *)dictionary withSource:(NSString *)source
{
+ if (done)
+ return;
+
NSString *message = [dictionary objectForKey:@"message"];
NSNumber *lineNumber = [dictionary objectForKey:@"lineNumber"];