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

Issue 3433026: Add a unit test for refresh in mshtml to see where we're not tagging the user... (Closed)

Created:
10 years, 2 months ago by tommi (sloooow) - chröme
Modified:
9 years, 7 months ago
Reviewers:
robertshield
CC:
chromium-reviews, amit
Visibility:
Public.

Description

Add a unit test for refresh in mshtml to see where we're not tagging the user agent TEST=The test currently fails, but you can run it! BUG=55758 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=60838

Patch Set 1 #

Total comments: 14

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -5 lines) Patch
A chrome_frame/test/data/mshtml_refresh_test.html View 1 chunk +22 lines, -0 lines 0 comments Download
A chrome_frame/test/data/mshtml_refresh_test_popup.html View 1 chunk +20 lines, -0 lines 0 comments Download
M chrome_frame/test/test_with_web_server.h View 1 1 chunk +4 lines, -3 lines 0 comments Download
M chrome_frame/test/test_with_web_server.cc View 1 4 chunks +104 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
tommi (sloooow) - chröme
10 years, 2 months ago (2010-09-27 14:30:49 UTC) #1
robertshield
Some nits. Feel free to ignore the token-replacement design nits for this CL, but I ...
10 years, 2 months ago (2010-09-27 17:26:23 UTC) #2
amit
On Mon, Sep 27, 2010 at 10:26 AM, <robertshield@chromium.org> wrote: > Some nits. Feel free ...
10 years, 2 months ago (2010-09-27 17:35:28 UTC) #3
tommi (sloooow) - chröme
http://codereview.chromium.org/3433026/diff/1/3 File chrome_frame/test/data/mshtml_refresh_test_popup.html (right): http://codereview.chromium.org/3433026/diff/1/3#newcode6 chrome_frame/test/data/mshtml_refresh_test_popup.html:6: // window.opener.location.href = window.opener.location.href; On 2010/09/27 17:26:23, robertshield wrote: ...
10 years, 2 months ago (2010-09-27 17:45:47 UTC) #4
tommi (sloooow) - chröme
I think so, but it will take some time and I'd have to do the ...
10 years, 2 months ago (2010-09-27 18:31:02 UTC) #5
robertshield
LGTM. http://codereview.chromium.org/3433026/diff/1/3 File chrome_frame/test/data/mshtml_refresh_test_popup.html (right): http://codereview.chromium.org/3433026/diff/1/3#newcode6 chrome_frame/test/data/mshtml_refresh_test_popup.html:6: // window.opener.location.href = window.opener.location.href; On 2010/09/27 17:45:48, tommi ...
10 years, 2 months ago (2010-09-27 18:50:14 UTC) #6
tommi (sloooow) - chröme
On Mon, Sep 27, 2010 at 2:50 PM, <robertshield@chromium.org> wrote: > LGTM. > > > ...
10 years, 2 months ago (2010-09-27 19:00:36 UTC) #7
amit
10 years, 2 months ago (2010-09-27 20:39:37 UTC) #8
On Mon, Sep 27, 2010 at 11:30 AM, Tommi <tommi@chromium.org> wrote:

> I think so, but it will take some time and I'd have to do the templating
> etc anyway.
> Do you think it is worth it?
>
I am assuming this is in response to the mock web server question :)
In that case I feel that using mock server will be a totally different
approach and would allow you the contain the test expectations in the test
itself instead of having a class like UaTemplateFileResponse I was curious
to see if that's doable for this test. If it is doable and not too painful,
then it's better to use/enhance our mock web server.

>
> On Mon, Sep 27, 2010 at 1:35 PM, Amit Joshi <amit@chromium.org> wrote:
>
>>
>>
>> On Mon, Sep 27, 2010 at 10:26 AM, <robertshield@chromium.org> wrote:
>>
>>> Some nits. Feel free to ignore the token-replacement design nits for this
>>> CL,
>>> but I feel they should be addressed soon-ish before they get out of hand.
>>>
>>>
>>> http://codereview.chromium.org/3433026/diff/1/3
>>> File chrome_frame/test/data/mshtml_refresh_test_popup.html (right):
>>>
>>> http://codereview.chromium.org/3433026/diff/1/3#newcode6
>>> chrome_frame/test/data/mshtml_refresh_test_popup.html:6: //
>>> window.opener.location.href = window.opener.location.href;
>>> Do we want to add a test that this is indeed the same behaviour?
>>>
>>> http://codereview.chromium.org/3433026/diff/1/4
>>> File chrome_frame/test/test_with_web_server.cc (right):
>>>
>>> http://codereview.chromium.org/3433026/diff/1/4#newcode1035
>>> chrome_frame/test/test_with_web_server.cc:1035: class
>>> UaTemplateFileResponse : public test_server::FileResponse {
>>> While this is fine for this CL, I'm a little worried about the design
>>> here. It leads to there being no single place where the replacement
>>> tokens for the test html pages are defined which isn't very
>>> maintainable.
>>>
>>> It would be cleaner to have a single token replacement mechanism.
>>>
>> Is it possible to use mock web server here?
>>
>>
>>>
>>> http://codereview.chromium.org/3433026/diff/1/4#newcode1048
>>> chrome_frame/test/test_with_web_server.cc:1048: virtual size_t
>>> ContentLength() const {
>>> Also a ContentLength() accessor isn't the first place I'd look for token
>>> replacement code ;-) The const on this method is a lie.
>>>
>>> http://codereview.chromium.org/3433026/diff/1/4#newcode1052
>>> chrome_frame/test/test_with_web_server.cc:1052: size_t length =
>>> __super::ContentLength();
>>> I know this is unlikely to be compiled on non-msvc, but could we have a
>>> typedef test_server::FileResponse Super;
>>> near the top instead?
>>>
>>> http://codereview.chromium.org/3433026/diff/1/4#newcode1092
>>> chrome_frame/test/test_with_web_server.cc:1092: SimpleWebServerTest
>>> server(46664);
>>> could this devilish looking number be constantized? it is used in a few
>>> places here...
>>>
>>> http://codereview.chromium.org/3433026/diff/1/4#newcode1094
>>> chrome_frame/test/test_with_web_server.cc:1094: arraysize(kPages),
>>> GetCFTestFilePath());
>>> I think you should either have wrappers for all of the specializations
>>> of PopulateStaticFileListT or for none of them.
>>>
>>>
>>> http://codereview.chromium.org/3433026/show
>>>
>>
>>
>

Powered by Google App Engine
This is Rietveld 408576698