Changeset 211373 in webkit
- Timestamp:
- Jan 30, 2017 10:14:25 AM (7 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 added
- 1 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r211361 r211373 1 2017-01-30 Daniel Bates <dabates@apple.com> 2 3 [QuickLook] Make HTTP QuickLook tests work in Apple Internal DumpRenderTree 4 https://bugs.webkit.org/show_bug.cgi?id=167483 5 6 Reviewed by Andy Estes. 7 8 Write QuickLook tests that tap a hyperlink in terms of UIHelper (in LayoutTests/resources/ui-helper.js) 9 so that we can run these tests in an Apple Internal build of DumpRenderTree. 10 11 * http/tests/quicklook/at-import-stylesheet-blocked.html: Write in terms of UIHelper. 12 * http/tests/quicklook/base-url-blocked.html: Ditto. 13 * http/tests/quicklook/cross-origin-iframe-blocked.html: Ditto. 14 * http/tests/quicklook/document-domain-is-empty-string.html: Ditto. 15 * http/tests/quicklook/external-stylesheet-blocked.html: Ditto. 16 * http/tests/quicklook/hide-referer-on-navigation.html: Ditto. 17 * http/tests/quicklook/resources/tap-at-point-and-notify-done.js: Removed. 18 * http/tests/quicklook/resources/tap-run-test-hyperlink.js: Added. 19 (runTest): 20 * http/tests/quicklook/submit-form-blocked.html: Ditto. 21 * http/tests/quicklook/top-navigation-blocked.html: Ditto. 22 * platform/ios-simulator-wk1/TestExpectations: Unskip QuickLook tests as we can now run 23 them in an Apple Internal build of DumpRenderTree. Note that these test are listed in 24 file LayoutTests/platform/ios-simulator/TestExpectations so that they are skipped in 25 WebKit for iOS Simulator built with the public iOS SDK as we need to fix <https://bugs.webkit.org/show_bug.cgi?id=141906>. 26 * platform/ios-simulator-wk1/http/tests/quicklook/top-navigation-blocked-expected.txt: Added. 27 For some reason the console message "Unsafe JavaScript attempt to initiate navigation" includes 28 a line number in DumpRenderTree (why?). This line number is not emitted when the test is run 29 in WebKitTestRunner. Add platform-specific result for now. 30 1 31 2017-01-30 Carlos Garcia Campos <cgarcia@igalia.com> 2 32 -
trunk/LayoutTests/http/tests/quicklook/at-import-stylesheet-blocked.html
r207155 r211373 2 2 <html> 3 3 <head> 4 <script src="resources/tap-at-point-and-notify-done.js"></script> 4 <script src="/js-test-resources/ui-helper.js"></script> 5 <script src="resources/tap-run-test-hyperlink.js"></script> 5 6 <script> 6 7 if (window.testRunner) { 7 8 testRunner.dumpAsText(); 8 9 testRunner.dumpChildFramesAsText(); 9 testRunner.waitUntilDone();10 10 } 11 11 </script> 12 12 </head> 13 13 <body> 14 <iframe src="resources/at-import-stylesheet-blocked.docx" onload=" tapAtPointAndNotifyDone(this.offsetLeft + 5, this.offsetTop + 5)"></iframe>14 <iframe src="resources/at-import-stylesheet-blocked.docx" onload="runTest(this)"></iframe> 15 15 </body> 16 16 </html> -
trunk/LayoutTests/http/tests/quicklook/base-url-blocked.html
r207155 r211373 2 2 <html> 3 3 <head> 4 <script src="resources/tap-at-point-and-notify-done.js"></script> 4 <script src="/js-test-resources/ui-helper.js"></script> 5 <script src="resources/tap-run-test-hyperlink.js"></script> 5 6 <script> 6 if (window.testRunner) {7 if (window.testRunner) 7 8 testRunner.dumpAsText(); 8 testRunner.waitUntilDone();9 }10 9 </script> 11 10 </head> 12 11 <body> 13 12 <p>This test verifies that a base URL is blocked when using QuickLook to preview a Microsoft Word document. This test PASSED only if a security error is logged to the console.</p> 14 <iframe src="resources/base-url-blocked.docx" onload=" tapAtPointAndNotifyDone(this.offsetLeft + 5, this.offsetTop + 5)"></iframe>13 <iframe src="resources/base-url-blocked.docx" onload="runTest(this)"></iframe> 15 14 </body> 16 15 </html> -
trunk/LayoutTests/http/tests/quicklook/cross-origin-iframe-blocked.html
r207155 r211373 2 2 <html> 3 3 <head> 4 <script src="resources/tap-at-point-and-notify-done.js"></script> 4 <script src="/js-test-resources/ui-helper.js"></script> 5 <script src="resources/tap-run-test-hyperlink.js"></script> 5 6 <script> 6 7 if (window.testRunner) { 7 8 testRunner.dumpAsText(); 8 9 testRunner.dumpChildFramesAsText(); 9 testRunner.waitUntilDone();10 10 } 11 11 </script> … … 13 13 <body> 14 14 <p>This test verifies that loading a cross-origin iframe is blocked when created by a QuickLook preview of a Microsoft Word document. This test PASSED only if a security error is logged to the console.</p> 15 <iframe src="resources/cross-origin-iframe-blocked.docx" onload=" tapAtPointAndNotifyDone(this.offsetLeft + 5, this.offsetTop + 5)"></iframe>15 <iframe src="resources/cross-origin-iframe-blocked.docx" onload="runTest(this)"></iframe> 16 16 </body> 17 17 </html> -
trunk/LayoutTests/http/tests/quicklook/document-domain-is-empty-string.html
r207155 r211373 2 2 <html> 3 3 <head> 4 <script src="resources/tap-at-point-and-notify-done.js"></script> 4 <script src="/js-test-resources/ui-helper.js"></script> 5 <script src="resources/tap-run-test-hyperlink.js"></script> 5 6 <script> 6 7 if (window.testRunner) { 7 8 testRunner.dumpAsText(); 8 9 testRunner.dumpChildFramesAsText(); 9 testRunner.waitUntilDone();10 10 } 11 11 </script> 12 12 </head> 13 13 <body> 14 <iframe src="resources/document-domain-is-empty-string.docx" onload=" tapAtPointAndNotifyDone(this.offsetLeft + 5, this.offsetTop + 5)"></iframe>14 <iframe src="resources/document-domain-is-empty-string.docx" onload="runTest(this)"></iframe> 15 15 </body> 16 16 </html> -
trunk/LayoutTests/http/tests/quicklook/external-stylesheet-blocked.html
r207155 r211373 2 2 <html> 3 3 <head> 4 <script src="resources/tap-at-point-and-notify-done.js"></script> 4 <script src="/js-test-resources/ui-helper.js"></script> 5 <script src="resources/tap-run-test-hyperlink.js"></script> 5 6 <script> 6 7 if (window.testRunner) { 7 8 testRunner.dumpAsText(); 8 9 testRunner.dumpChildFramesAsText(); 9 testRunner.waitUntilDone();10 10 } 11 11 </script> 12 12 </head> 13 13 <body> 14 <iframe src="resources/external-stylesheet-blocked.docx" onload=" tapAtPointAndNotifyDone(this.offsetLeft + 5, this.offsetTop + 5)"></iframe>14 <iframe src="resources/external-stylesheet-blocked.docx" onload="runTest(this)"></iframe> 15 15 </body> 16 16 </html> -
trunk/LayoutTests/http/tests/quicklook/hide-referer-on-navigation.html
r210022 r211373 2 2 <html> 3 3 <head> 4 <script src="resources/tap-at-point-and-notify-done.js"></script> 4 <script src="/js-test-resources/ui-helper.js"></script> 5 <script src="resources/tap-run-test-hyperlink.js"></script> 5 6 <script> 6 function doTest(){7 tapAtPointAndNotifyDone(document.getElementsByTagName('iframe')[0].offsetLeft + 5, document.getElementsByTagName('iframe')[0].offsetTop + 5)8 }9 10 7 if (window.testRunner) { 11 8 testRunner.dumpAsText(); 12 9 testRunner.dumpChildFramesAsText(); 13 testRunner.waitUntilDone();14 10 } 15 11 </script> 16 12 </head> 17 <body onload=" doTest()">13 <body onload="runTest(document.querySelector('iframe'))"> 18 14 <p>This test verifies that the HTTP referrer is hidden when navigating from a Microsoft Word QuickLook preview. This test PASSED only if nothing is printed below.</p> 19 15 -
trunk/LayoutTests/http/tests/quicklook/rtf-document-domain-is-empty-string.html
r211250 r211373 3 3 <head> 4 4 <script src="/js-test-resources/ui-helper.js"></script> 5 <script src="resources/tap-run-test-hyperlink.js"></script> 5 6 <script> 6 7 if (window.testRunner) { … … 8 9 testRunner.dumpChildFramesAsText(); 9 10 } 10 11 function runTest(frame)12 {13 if (!window.testRunner)14 return;15 16 // FIXME: For some reason the (x, y) coordinates of the hyperlink "Run test" is offset 2 pixels17 // in legacy WebKit (why?).18 var fudgeFactor = UIHelper.isWebKit2() ? 0 : 2;19 UIHelper.wait(UIHelper.activateAt(frame.offsetLeft + 8 + fudgeFactor, frame.offsetTop + 8 + fudgeFactor));20 }21 11 </script> 22 12 </head> 23 13 <body> 24 <iframe src="resources/document-domain-is-empty-string.rtf" onload="runTest(this )"></iframe>14 <iframe src="resources/document-domain-is-empty-string.rtf" onload="runTest(this, 8 /* offsetInFrame */)"></iframe> 25 15 </body> 26 16 </html> -
trunk/LayoutTests/http/tests/quicklook/submit-form-blocked.html
r207155 r211373 2 2 <html> 3 3 <head> 4 <script src="resources/tap-at-point-and-notify-done.js"></script> 4 <script src="/js-test-resources/ui-helper.js"></script> 5 <script src="resources/tap-run-test-hyperlink.js"></script> 5 6 <script> 6 7 if (window.testRunner) { 7 8 testRunner.dumpAsText(); 8 testRunner.waitUntilDone();9 9 } 10 10 </script> … … 12 12 <body> 13 13 <p>This test verifies that form submission is blocked using QuickLook to preview a Microsoft Word document. This test PASSED only if a security error is logged to the console.</p> 14 <iframe src="resources/submit-form-blocked.docx" onload=" tapAtPointAndNotifyDone(this.offsetLeft + 5, this.offsetTop + 5)"></iframe>14 <iframe src="resources/submit-form-blocked.docx" onload="runTest(this)"></iframe> 15 15 </body> 16 16 </html> -
trunk/LayoutTests/http/tests/quicklook/top-navigation-blocked.html
r207155 r211373 2 2 <html> 3 3 <head> 4 <script src="resources/tap-at-point-and-notify-done.js"></script> 4 <script src="/js-test-resources/ui-helper.js"></script> 5 <script src="resources/tap-run-test-hyperlink.js"></script> 5 6 <script> 6 7 if (window.testRunner) { 7 8 testRunner.dumpAsText(); 8 9 testRunner.dumpChildFramesAsText(); 9 testRunner.waitUntilDone();10 10 } 11 11 </script> 12 12 </head> 13 13 <body> 14 <iframe src="resources/top-navigation-blocked.docx" onload=" tapAtPointAndNotifyDone(this.offsetLeft + 5, this.offsetTop + 5)"></iframe>14 <iframe src="resources/top-navigation-blocked.docx" onload="runTest(this)"></iframe> 15 15 </body> 16 16 </html> -
trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations
r211095 r211373 2 2 # 3 3 # See http://trac.webkit.org/wiki/TestExpectations for more information on this file. 4 5 # FIXME: uiController.singleTapAtPoint() is not implemented in DumpRenderTree. And6 # we cannot write these tests in terms of EventSender without identifying which7 # test tool is being used to run the test, which is not straightforward at the time8 # of writing (10/07/2016).9 http/tests/quicklook/at-import-stylesheet-blocked.html10 http/tests/quicklook/base-url-blocked.html11 http/tests/quicklook/cross-origin-iframe-blocked.html12 http/tests/quicklook/document-domain-is-empty-string.html13 http/tests/quicklook/external-stylesheet-blocked.html14 http/tests/quicklook/hide-referer-on-navigation.html15 http/tests/quicklook/resources/fail.html16 http/tests/quicklook/submit-form-blocked.html17 http/tests/quicklook/top-navigation-blocked.html18 4 19 5 # Selectively re-enable viewport tests that work
Note: See TracChangeset
for help on using the changeset viewer.