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

Issue 3136019: Fix a few test failures when landing http://trac.webkit.org/changeset/57178.... (Closed)

Created:
10 years, 4 months ago by Johnny(Jianning) Ding
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ben+cc_chromium.org, Erik does not do reviews, Paweł Hajdan Jr., Aaron Boodman, pam+watch_chromium.org, brettw-cc_chromium.org, Chris Evans, inferno
Visibility:
Public.

Description

Fix a few test failures when landing http://trac.webkit.org/changeset/57178. http://trac.webkit.org/changeset/57178 broke some tests in browser_test and ui_test. In the test RedirectTest.ClientCancelled, it needs a user-initiated event to trigger the redirect, now it uses "javaScript:click()". When landing r57178, the call of window.open which is inside the call of javaScript:click() was treated as non user-initiated, so the in-page location change was treated as client redirect and the redirect was recoreded, that is why this test was failed when landing r57178. (Please refer to the logic in FrameLoaderClientImpl::dispatchDidNavigateWithinPage.) In the tests AppApiTest.AppProcess, ExtensionBrowserTest.WindowOpenExtension and ExtensionBrowserTest.WindowOpenInvalidExtension, they assume the new tabs opened by window.open in current window. But when landing r57178, since those calls of window.open were treated as non user-initiated, the disposition type of new tabs were changed to Popup, which caused a few new tabs were created instead of a few new tabs in current window (Please refer to RenderView::show), which cause those tests were failed when landing r57178.), that is why those tests were failed when landing r57178. BUG=17655 TEST=RedirectTest.ClientCancelled, AppApiTest.AppProcess, ExtensionBrowserTest.WindowOpenExtension, ExtensionBrowserTest.WindowOpenInvalidExtension Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=56834

Patch Set 1 #

Total comments: 12

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -19 lines) Patch
M chrome/browser/extensions/app_process_apitest.cc View 1 2 5 chunks +22 lines, -14 lines 0 comments Download
M chrome/browser/extensions/extension_browsertests_misc.cc View 1 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/history/redirect_uitest.cc View 1 4 chunks +25 lines, -2 lines 0 comments Download
M chrome/test/data/cancelled_redirect_test.html View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Johnny(Jianning) Ding
10 years, 4 months ago (2010-08-18 19:09:34 UTC) #1
Matt Perry
Cool, thanks for fixing these! LGTM with a few small comments addressed. http://codereview.chromium.org/3136019/diff/1/2 File chrome/browser/extensions/app_process_apitest.cc ...
10 years, 4 months ago (2010-08-18 19:34:12 UTC) #2
Johnny(Jianning) Ding
http://codereview.chromium.org/3136019/diff/1/2 File chrome/browser/extensions/app_process_apitest.cc (right): http://codereview.chromium.org/3136019/diff/1/2#newcode25 chrome/browser/extensions/app_process_apitest.cc:25: bool newtab_process_should_equal_with_opener) { On 2010/08/18 19:34:12, Matt Perry wrote: ...
10 years, 4 months ago (2010-08-19 06:40:58 UTC) #3
Matt Perry
OK, LGTM http://codereview.chromium.org/3136019/diff/8001/9001 File chrome/browser/extensions/app_process_apitest.cc (right): http://codereview.chromium.org/3136019/diff/8001/9001#newcode100 chrome/browser/extensions/app_process_apitest.cc:100: ASSERT_EQ(static_cast<size_t>(1), you can use 1u
10 years, 4 months ago (2010-08-19 18:19:19 UTC) #4
Johnny(Jianning) Ding
10 years, 4 months ago (2010-08-20 06:21:36 UTC) #5
Yes, yes! Thanks!
On 2010/08/19 18:19:19, Matt Perry wrote:
> OK, LGTM
> 
> http://codereview.chromium.org/3136019/diff/8001/9001
> File chrome/browser/extensions/app_process_apitest.cc (right):
> 
> http://codereview.chromium.org/3136019/diff/8001/9001#newcode100
> chrome/browser/extensions/app_process_apitest.cc:100:
> ASSERT_EQ(static_cast<size_t>(1),
> you can use 1u

Powered by Google App Engine
This is Rietveld 408576698