WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
94058
[BlackBerry] [DRT] 5 tests failed for incorrect JS console message format
https://bugs.webkit.org/show_bug.cgi?id=94058
Summary
[BlackBerry] [DRT] 5 tests failed for incorrect JS console message format
Xiaobo Wang
Reported
2012-08-14 18:58:14 PDT
From RIM PR #191441 Failed cases: 1 fast/frames/sandboxed-iframe-history-denied.html 2 fast/frames/sandboxed-iframe-navigation-targetlink.html 3 fast/frames/sandboxed-iframe-navigation-top-by-name-denied.html 4 fast/frames/sandboxed-iframe-navigation-top-denied.html 5 fast/frames/seamless/seamless-window-location-sandbox.html All tests failed because of incorrect console message format. Need to fix in DumpRenderTree code. Here's the text diff for one of the tests. ---/tmp/developer/layout-test-results/fast/frames/sandboxed-iframe-navigation-top-denied-expected.txt +++/tmp/developer/layout-test-results/fast/frames/sandboxed-iframe-navigation-top-denied-actual.txt @@ -1,4 +1,6 @@ -CONSOLE MESSAGE: Unsafe JavaScript attempt to initiate a navigation change for frame with URL navigate-top-to-fail.html. +CONSOLE MESSAGE: line 0: Unsafe JavaScript attempt to initiate a navigation change for frame with URL file:///developer/LayoutTests/fast/frames/sandboxed-iframe-navigation-top-denied.html from frame with URL file:///developer/LayoutTests/fast/frames/resources/navigate-top-to-fail.html. + +JS Console: :0: Unsafe JavaScript attempt to initiate a navigation change for frame with URL file:///developer/LayoutTests/fast/frames/sandboxed-iframe-navigation-top-denied.html from frame with URL file:///developer/LayoutTests/fast/frames/resources/navigate-top-to-fail.html. This test verifies that a sandboxed IFrame cannot navigate the top-level frame without allow-top-navigation. This test passes if the navigation does not occur.
Attachments
patch
(5.23 KB, patch)
2012-08-14 19:58 PDT
,
Xiaobo Wang
rwlbuis
: review+
Details
Formatted Diff
Diff
patch updated
(5.20 KB, patch)
2012-08-16 01:18 PDT
,
Xiaobo Wang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Xiaobo Wang
Comment 1
2012-08-14 19:58:08 PDT
Created
attachment 158486
[details]
patch Patch for this issue. The Source part is patched by Rob Buis.
Xiaobo Wang
Comment 2
2012-08-15 01:58:16 PDT
Adding Yong, Antonio, and George. Can any of you help to review?
Rob Buis
Comment 3
2012-08-15 05:47:38 PDT
Comment on
attachment 158486
[details]
patch Thanks for this patch, looks good!
Yong Li
Comment 4
2012-08-15 07:08:38 PDT
Comment on
attachment 158486
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=158486&action=review
> Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp:653 > + String remaining = message.substring(pos, message.length() - pos);
", message.length() - pos" is not necessary
> Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp:657 > + baseName = remaining.substring(indexBase + 1, remaining.length() - indexBase - 1);
ditto. Also it should be called "fileName" rather than "baseName"? "Base" sounds like base URL / the folder path...
Xiaobo Wang
Comment 5
2012-08-15 19:22:09 PDT
(In reply to
comment #4
)
> (From update of
attachment 158486
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=158486&action=review
> > > Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp:653 > > + String remaining = message.substring(pos, message.length() - pos); > > ", message.length() - pos" is not necessary > > > Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp:657 > > + baseName = remaining.substring(indexBase + 1, remaining.length() - indexBase - 1); > > ditto. Also it should be called "fileName" rather than "baseName"? "Base" sounds like base URL / the folder path...
Good suggestions Yong. I agree "fileName" is better. Actually I borrowed the name from the UNIX command "basename" which usually returns the file name of a full path. Will update the patch soon.
Xiaobo Wang
Comment 6
2012-08-16 01:18:23 PDT
Created
attachment 158745
[details]
patch updated Updated according to comments from Yong Li.
Yong Li
Comment 7
2012-08-16 07:17:27 PDT
Comment on
attachment 158745
[details]
patch updated View in context:
https://bugs.webkit.org/attachment.cgi?id=158745&action=review
> Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp:662 > + printf("%s\n", newMessage.utf8().data());
I have introduced a class ReadOnlyLatinString that will give better performance if you are sure latin1() won't lose any info and in most cases the String has a 8-bit internal buffer. But this is minor thing, especially this is only for DRT.
WebKit Review Bot
Comment 8
2012-08-16 07:55:10 PDT
Comment on
attachment 158745
[details]
patch updated Clearing flags on attachment: 158745 Committed
r125778
: <
http://trac.webkit.org/changeset/125778
>
WebKit Review Bot
Comment 9
2012-08-16 07:55:14 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug