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

Issue 6306004: More ChromeFrame perf test fixes to account for the changes in the UITest fun... (Closed)

Created:
9 years, 11 months ago by ananta
Modified:
9 years, 6 months ago
Reviewers:
amit
CC:
chromium-reviews, amit
Visibility:
Public.

Description

More ChromeFrame perf test fixes to account for the changes in the UITest functions which return the chrome browser process pid. In ChromeFrame we don't use the launcher which results in a crash while running a number of perf tests. Added a helper function to return the browser pid. Added a handler for intercepting and debugging pure call errors in chrome frame perf tests. BUG=none TEST=ChromeFrame perf tests should run to completion. TBR=amit Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71755

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -4 lines) Patch
M chrome_frame/test/perf/chrome_frame_perftest.cc View 3 chunks +14 lines, -4 lines 0 comments Download
M chrome_frame/test/perf/run_all.cc View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
ananta
9 years, 11 months ago (2011-01-19 03:13:29 UTC) #1
amit
9 years, 11 months ago (2011-01-19 04:36:14 UTC) #2
The change looks good. Why is the default purecall handler not good enough?
does it put up a modal dialog and block tests?

On Tue, Jan 18, 2011 at 7:13 PM, <ananta@chromium.org> wrote:

> Reviewers: amit,
>
> Description:
> More ChromeFrame perf test fixes to account for the changes in the UITest
> functions which
> return the chrome browser process pid. In ChromeFrame we don't use the
> launcher
> which results
> in a crash while running a number of perf tests. Added a helper function to
> return the browser
> pid.
>
> Added a handler for intercepting and debugging pure call errors in chrome
> frame
> perf tests.
>
> BUG=none
> TEST=ChromeFrame perf tests should run to completion.
> TBR=amit
>
>
> Please review this at http://codereview.chromium.org/6306004/
>
> SVN Base: svn://svn.chromium.org/chrome/trunk/src/
>
> Affected files:
>  M     chrome_frame/test/perf/chrome_frame_perftest.cc
>  M     chrome_frame/test/perf/run_all.cc
>
>
> Index: chrome_frame/test/perf/chrome_frame_perftest.cc
> ===================================================================
> --- chrome_frame/test/perf/chrome_frame_perftest.cc     (revision 71693)
> +++ chrome_frame/test/perf/chrome_frame_perftest.cc     (working copy)
> @@ -658,10 +658,20 @@
>     printf("\n");
>   }
>
> +  base::ProcessId chrome_browser_process_id() {
> +    base::NamedProcessIterator iter(L"chrome.exe", NULL);
> +    const base::ProcessEntry* entry = iter.NextProcessEntry();
> +    if (entry) {
> +      return entry->pid();
> +    }
> +    return -1;
> +  }
> +
>   ChromeProcessList GetBrowserChildren() {
> -    ChromeProcessList list =
> GetRunningChromeProcesses(browser_process_id());
> +    ChromeProcessList list = GetRunningChromeProcesses(
> +        chrome_browser_process_id());
>     ChromeProcessList::iterator browser =
> -        std::find(list.begin(), list.end(), browser_process_id());
> +        std::find(list.begin(), list.end(), chrome_browser_process_id());
>     if (browser != list.end()) {
>       list.erase(browser);
>     }
> @@ -670,7 +680,7 @@
>
>   void AccountProcessMemoryUsage(DWORD process_id) {
>     ProcessMemoryInfo process_memory_info(
> -        process_id, process_id == browser_process_id(), this);
> +        process_id, process_id == chrome_browser_process_id(), this);
>
>     ASSERT_TRUE(process_memory_info.GetMemoryConsumptionDetails());
>
> @@ -824,7 +834,7 @@
>     // redirect.
>     if (!test_completed_) {
>       // Measure memory usage for the browser process.
> -      AccountProcessMemoryUsage(browser_process_id());
> +      AccountProcessMemoryUsage(chrome_browser_process_id());
>       // Measure memory usage for the current process.
>       AccountProcessMemoryUsage(GetCurrentProcessId());
>
> Index: chrome_frame/test/perf/run_all.cc
> ===================================================================
> --- chrome_frame/test/perf/run_all.cc   (revision 71693)
> +++ chrome_frame/test/perf/run_all.cc   (working copy)
> @@ -10,11 +10,17 @@
>  #include "chrome_frame/test_utils.h"
>  #include "chrome_frame/utils.h"
>
> +void PureCall() {
> +  __debugbreak();
> +}
> +
>  int main(int argc, char **argv) {
>   base::PerfTestSuite perf_suite(argc, argv);
>   chrome::RegisterPathProvider();
>   base::PlatformThread::SetName("ChromeFrame perf tests");
>
> +  _set_purecall_handler(PureCall);
> +
>   SetConfigBool(kChromeFrameHeadlessMode, true);
>   SetConfigBool(kChromeFrameUnpinnedMode, true);
>
>
>
>

Powered by Google App Engine
This is Rietveld 408576698