Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Issue 302043002: Add testRunner callbacks for better handling of view-source frames (Closed)

Created:
6 years, 6 months ago by Tom Sepez
Modified:
6 years, 6 months ago
Reviewers:
tkent
CC:
chromium-reviews, darin-cc_chromium.org, jam, jochen+watch_chromium.org
Visibility:
Public.

Description

testRunner.setViewSorceForFrame() allows us test an interaction between the view-souce feature and the XSSAuditor in blink. The current technique for testing view-source pages is to use a hack in the content_shell's dump-render-tree mode to turn on view-source for the main page when the path /viewsource/ is present in the URL. To test XSS reflections, however, there needs to be a query string containing the reflection (because putting it in the path would lead to horribly named files). To get a query string, we traditionally load a main page which then loads the more complex URL in a iframe. Presently, there's no way to make that iframe a view-source frame (since some guy removed the viewsource="true" attribute from HTML because it was dangerous). There are also two other methods that are exposed to javascript: dumpAsMarkup() and dumpChildFramesAsMarkup(). These give the test scripts the ability to control the format of the output. This is needed to simplify diffing the results of these kinds of tests. CL https://codereview.chromium.org/301813002/ is blocked on this. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274304

Patch Set 1 #

Patch Set 2 : Fix "enabled" #

Patch Set 3 : Add DumpChildFramesAsMarkup for recursive dumps. #

Patch Set 4 : Consolidate frame header dumping. #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -22 lines) Patch
M content/shell/renderer/test_runner/test_runner.h View 1 2 4 chunks +16 lines, -0 lines 0 comments Download
M content/shell/renderer/test_runner/test_runner.cc View 1 2 12 chunks +42 lines, -0 lines 0 comments Download
M content/shell/renderer/test_runner/web_test_proxy.cc View 1 2 3 4 4 chunks +35 lines, -22 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Tom Sepez
+tkent for OWNERS review.
6 years, 6 months ago (2014-05-29 21:07:44 UTC) #1
tkent
lgtm
6 years, 6 months ago (2014-05-30 00:52:47 UTC) #2
Tom Sepez
@tkent - Sorry, I made a few more changes. Let me know if it's still ...
6 years, 6 months ago (2014-05-30 16:37:38 UTC) #3
tkent
lgtm. I wonder if we need both of dumpAsMarkup and dumpChildFramesAsMarkup. Can dumpChildFramesAsMarkup cover all ...
6 years, 6 months ago (2014-06-01 23:28:31 UTC) #4
Tom Sepez
The CQ bit was checked by tsepez@chromium.org
6 years, 6 months ago (2014-06-02 16:59:35 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tsepez@chromium.org/302043002/80001
6 years, 6 months ago (2014-06-02 17:00:04 UTC) #6
Tom Sepez
> I wonder if we need both of dumpAsMarkup and dumpChildFramesAsMarkup. Can > dumpChildFramesAsMarkup cover ...
6 years, 6 months ago (2014-06-02 17:00:50 UTC) #7
Tom Sepez
> dumpChildFrames() should be sufficient, but there's a lot of files to change. Filed https://code.google.com/p/chromium/issues/detail?id=379827 ...
6 years, 6 months ago (2014-06-02 17:52:11 UTC) #8
commit-bot: I haz the power
6 years, 6 months ago (2014-06-02 19:27:17 UTC) #9
Message was sent while issue was closed.
Change committed as 274304

Powered by Google App Engine
This is Rietveld 408576698