Reviewed by Adam.
- Layout tests fix. We need a way to remove machine-dependent
information from paths in layout test results. The UIDelegate now does
this.
* DumpRenderTree/DumpRenderTree.h:
* DumpRenderTree/win/DumpRenderTree.cpp:
(urlSuitableForTestResult):
* DumpRenderTree/win/DumpRenderTreeWin.h:
* DumpRenderTree/win/ResourceLoadDelegate.cpp:
* DumpRenderTree/win/UIDelegate.cpp:
(UIDelegate::webViewAddMessageToConsole):
LayoutTests:
Reviewed by Adam.
- Layout tests fix. Removed machine dependant results and generated new
results without machine specific information.
* fast/dom/frame-loading-via-document-write-expected.txt: Added.
* http/tests/security/frame-loading-via-document-write-expected.txt: Added.
* http/tests/security/local-CSS-from-remote-expected.txt:
* http/tests/security/local-JavaScript-from-remote-expected.txt:
* http/tests/security/local-iFrame-from-remote-expected.txt:
* http/tests/security/local-image-from-remote-expected.txt:
* platform/mac/fast/dom/frame-loading-via-document-write-expected.checksum: Removed.
* platform/mac/fast/dom/frame-loading-via-document-write-expected.png: Removed.
* platform/mac/fast/dom/frame-loading-via-document-write-expected.txt: Removed.
* platform/mac/http/tests/security: Removed.
* platform/mac/http/tests/security/frame-loading-via-document-write-expected.checksum: Removed.
* platform/mac/http/tests/security/frame-loading-via-document-write-expected.png: Removed.
* platform/mac/http/tests/security/frame-loading-via-document-write-expected.txt: Removed.
* platform/win/Skipped:
* platform/win/http: Removed.
* platform/win/http/tests: Removed.
* platform/win/http/tests/security: Removed.
* platform/win/http/tests/security/frame-loading-via-document-write-expected.txt: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28705
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-12-13 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Layout tests fix. Removed machine dependant results and generated new
+ results without machine specific information.
+
+ * fast/dom/frame-loading-via-document-write-expected.txt: Added.
+ * http/tests/security/frame-loading-via-document-write-expected.txt: Added.
+ * http/tests/security/local-CSS-from-remote-expected.txt:
+ * http/tests/security/local-JavaScript-from-remote-expected.txt:
+ * http/tests/security/local-iFrame-from-remote-expected.txt:
+ * http/tests/security/local-image-from-remote-expected.txt:
+ * platform/mac/fast/dom/frame-loading-via-document-write-expected.checksum: Removed.
+ * platform/mac/fast/dom/frame-loading-via-document-write-expected.png: Removed.
+ * platform/mac/fast/dom/frame-loading-via-document-write-expected.txt: Removed.
+ * platform/mac/http/tests/security: Removed.
+ * platform/mac/http/tests/security/frame-loading-via-document-write-expected.checksum: Removed.
+ * platform/mac/http/tests/security/frame-loading-via-document-write-expected.png: Removed.
+ * platform/mac/http/tests/security/frame-loading-via-document-write-expected.txt: Removed.
+ * platform/win/Skipped:
+ * platform/win/http: Removed.
+ * platform/win/http/tests: Removed.
+ * platform/win/http/tests/security: Removed.
+ * platform/win/http/tests/security/frame-loading-via-document-write-expected.txt: Removed.
+
2007-12-13 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Adele.
-CONSOLE MESSAGE: line 0: Not allowed to load local resource: file://C:/cygwin/home/PyongHopscotch/WebKit/OpenSource/LayoutTests/fast/dom/resources/abe.png
+CONSOLE MESSAGE: line 0: Not allowed to load local resource: abe.png
--------
-CONSOLE MESSAGE: line 0: Not allowed to load local resource: file://C:/cygwin/home/PyongHopscotch/WebKit/OpenSource/LayoutTests/http/tests/security/resources/cssStyle.css
+CONSOLE MESSAGE: line 0: Not allowed to load local resource: cssStyle.css
This test is to see if a remote file can include a local CSS style.
Currently this test cannot be run manually on Windows because we do not have a function like pathToLocalResource() outside of DRT.
-CONSOLE MESSAGE: line 0: Not allowed to load local resource: file://C:/cygwin/home/PyongHopscotch/WebKit/OpenSource/LayoutTests/http/tests/security/resources/localScript.js
+CONSOLE MESSAGE: line 0: Not allowed to load local resource: localScript.js
This test is to see if a remote file can run a local script.
Currently this test cannot be run manually on Windows because we do not have a function like pathToLocalResource() outside of DRT.
-CONSOLE MESSAGE: line 0: Not allowed to load local resource: file://C:/cygwin/home/PyongHopscotch/WebKit/OpenSource/LayoutTests/http/tests/security/resources/localPage.html
+CONSOLE MESSAGE: line 0: Not allowed to load local resource: localPage.html
This test is to see if a remote file can include a local page in an iFrame.
Currently this test cannot be run manually on Windows because we do not have a function like pathToLocalResource() outside of DRT.
-CONSOLE MESSAGE: line 0: Not allowed to load local resource: file://C:/cygwin/home/PyongHopscotch/WebKit/OpenSource/LayoutTests/http/tests/security/resources/compass.jpg
+CONSOLE MESSAGE: line 0: Not allowed to load local resource: compass.jpg
This test is to see if a remote file can include a local image.
Currently this test cannot be run manually on Windows because we do not have a function like pathToLocalResource() outside of DRT.
+++ /dev/null
-d0cde9b945399195425306c086c31364
\ No newline at end of file
+++ /dev/null
-27e576b9e74a6968b20050557cababb5
\ No newline at end of file
+++ /dev/null
-CONSOLE MESSAGE: line 0: Not allowed to load local resource: file:////tmp/LayoutTests/fast/dom/resources/abe.png
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderFrameSet {FRAMESET} at (0,0) size 800x600
- RenderFrame {FRAME} at (0,0) size 800x196
- layer at (0,0) size 800x196
- RenderView at (0,0) size 800x196
- layer at (0,0) size 800x196
- RenderBlock {HTML} at (0,0) size 800x196
- RenderBody {BODY} at (8,8) size 784x180
- RenderBlock {DIV} at (0,0) size 784x54
- RenderInline {SPAN} at (0,0) size 221x18
- RenderText {#text} at (0,0) size 221x18
- text run at (0,0) width 221: "This page was successfully loaded."
- RenderBR {BR} at (221,14) size 0x0
- RenderInline {SPAN} at (0,0) size 124x18
- RenderText {#text} at (0,18) size 124x18
- text run at (0,18) width 124: "My protocol is http:"
- RenderBR {BR} at (124,32) size 0x0
- RenderInline {SPAN} at (0,0) size 125x18
- RenderText {#text} at (0,36) size 125x18
- text run at (0,36) width 125: "My referrer is blank"
- RenderBR {BR} at (125,50) size 0x0
- RenderFrame {FRAME} at (0,202) size 800x196
- layer at (0,0) size 800x196
- RenderView at (0,0) size 800x196
- layer at (0,0) size 800x58
- RenderBlock {HTML} at (0,0) size 800x58
- RenderBody {BODY} at (8,8) size 784x42
- RenderTable {TABLE} at (0,0) size 133x42
- RenderTableSection {TBODY} at (0,0) size 133x42
- RenderTableRow {TR} at (0,2) size 133x38
- RenderTableCell {TD} at (2,2) size 129x38 [r=0 c=0 rs=1 cs=1]
- RenderBlock {DIV} at (1,1) size 127x18
- RenderText {#text} at (0,0) size 127x18
- text run at (0,0) width 127: "Image NOT loaded."
- RenderBlock (anonymous) at (1,19) size 127x18
- RenderImage {IMG} at (0,14) size 0x0
- RenderFrame {FRAME} at (0,404) size 800x196
- layer at (0,0) size 800x196
- RenderView at (0,0) size 800x196
- layer at (0,0) size 800x64
- RenderBlock {HTML} at (0,0) size 800x64
- RenderBody {BODY} at (8,8) size 784x48
- RenderTable {TABLE} at (0,0) size 95x48
- RenderTableSection {TBODY} at (0,0) size 95x48
- RenderTableRow {TR} at (0,2) size 95x44
- RenderTableCell {TD} at (2,2) size 91x44 [r=0 c=0 rs=1 cs=1]
- RenderBlock {DIV} at (1,1) size 89x18
- RenderText {#text} at (0,0) size 89x18
- text run at (0,0) width 89: "Image loaded."
- RenderBlock (anonymous) at (1,19) size 89x24
- RenderImage {IMG} at (0,0) size 20x20
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# Access violation when trying to run local script. <rdar://5631705>
-fast/dom/frame-loading-via-document-write.html
-fast/loader/local-iFrame-source-from-local.html
-fast/loader/local-image-from-local.html
-fast/loader/local-CSS-from-local.html
-fast/loader/local-JavaScript-from-local.html
-http/tests/security/local-JavaScript-from-remote.html
-http/tests/security/local-iFrame-from-remote.html
-http/tests/security/local-CSS-from-remote.html
-http/tests/security/local-user-CSS-from-remote.html
-http/tests/security/frame-loading-via-document-write.html
-http/tests/security/local-image-from-remote.html
-
# Should be moved to platform/mac <rdar://5621425>
http/tests/misc/willCacheResponse-delegate-callback.html
+2007-12-13 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Adam.
+
+ - Layout tests fix. We need a way to remove machine-dependent
+ information from paths in layout test results. The UIDelegate now does
+ this.
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (urlSuitableForTestResult):
+ * DumpRenderTree/win/DumpRenderTreeWin.h:
+ * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::webViewAddMessageToConsole):
+
2007-12-13 Alp Toker <alp@atoker.com>
Build fix for DRT breakage introduced in r28690.
extern CFRunLoopTimerRef waitToDumpWatchdog;
#endif
+#include <string>
+
+std::wstring urlSuitableForTestResult(const std::wstring& url);
+
class LayoutTestController;
extern volatile bool done;
#include <io.h>
#include <windows.h>
#include <stdio.h>
+#include <shlwapi.h>
using std::wstring;
const unsigned maxViewWidth = 800;
const unsigned maxViewHeight = 600;
+wstring urlSuitableForTestResult(const wstring& url)
+{
+ if (!url.c_str() || !url.find(L"file://"))
+ return url;
+
+ return PathFindFileNameW(url.c_str());
+}
+
static LRESULT CALLBACK DumpRenderTreeWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
extern HWND webViewWindow;
+#include <string>
+
+std::wstring urlSuitableForTestResult(const std::wstring& url);
+
#endif // DumpRenderTreeWin_h
#include "LayoutTestController.h"
#include <wtf/HashMap.h>
#include <wtf/Vector.h>
-#include <string>
#include <sstream>
using std::wstring;
return wstring(str, ::SysStringLen(str));
}
-static wstring urlSuitableForTestResult(const wstring& url)
-{
- // FIXME: This should convert file:/// URLs like the Mac version does.
- // It's currently not done because the only tests that use file:/// URLs
- // are the webarchive tests and we don't support those on Windows.
- return url;
-}
-
wstring wstringFromInt(int i)
{
std::wostringstream ss;
#include <WebKit/IWebViewPrivate.h>
#include <stdio.h>
+using std::wstring;
+
UIDelegate::UIDelegate()
: m_refCount(1)
{
/* [in] */ BSTR url,
/* [in] */ BOOL isError)
{
- printf("CONSOLE MESSAGE: line %d: %S\n", lineNumber, message ? message : L"");
-
+ wstring newMessage;
+ if (message) {
+ newMessage = message;
+ int fileProtocol = newMessage.find(L"file://");
+ if (fileProtocol)
+ newMessage = newMessage.substr(0, fileProtocol) + urlSuitableForTestResult(newMessage);
+ }
+
+ printf("CONSOLE MESSAGE: line %d: %S\n", lineNumber, message ? newMessage.c_str() : L"");
return S_OK;
}