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

Side by Side Diff: chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc

Issue 2643323002: [Flake] Disable PageLoadMetricsBrowserTest.AbortClose on Win7 (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/files/scoped_temp_dir.h" 5 #include "base/files/scoped_temp_dir.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/test/histogram_tester.h" 7 #include "base/test/histogram_tester.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "chrome/browser/page_load_metrics/metrics_web_contents_observer.h" 9 #include "chrome/browser/page_load_metrics/metrics_web_contents_observer.h"
10 #include "chrome/browser/page_load_metrics/observers/aborts_page_load_metrics_ob server.h" 10 #include "chrome/browser/page_load_metrics/observers/aborts_page_load_metrics_ob server.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 chrome::NavigateParams params2(browser(), url, ui::PAGE_TRANSITION_RELOAD); 372 chrome::NavigateParams params2(browser(), url, ui::PAGE_TRANSITION_RELOAD);
373 content::TestNavigationManager manager2( 373 content::TestNavigationManager manager2(
374 browser()->tab_strip_model()->GetActiveWebContents(), url); 374 browser()->tab_strip_model()->GetActiveWebContents(), url);
375 chrome::Navigate(&params2); 375 chrome::Navigate(&params2);
376 376
377 manager2.WaitForNavigationFinished(); 377 manager2.WaitForNavigationFinished();
378 histogram_tester_.ExpectTotalCount( 378 histogram_tester_.ExpectTotalCount(
379 internal::kHistogramAbortReloadBeforeCommit, 1); 379 internal::kHistogramAbortReloadBeforeCommit, 1);
380 } 380 }
381 381
382 IN_PROC_BROWSER_TEST_F(PageLoadMetricsBrowserTest, AbortClose) { 382 // TODO(crbug.com/675061): Flaky on Win7 dbg.
383 #if defined(OS_WIN)
384 #define MAYBE_AbortClose DISABLED_AbortClose
385 #else
386 #define MAYBE_AbortClose AbortClose
387 #endif
388 IN_PROC_BROWSER_TEST_F(PageLoadMetricsBrowserTest, MAYBE_AbortClose) {
383 ASSERT_TRUE(embedded_test_server()->Start()); 389 ASSERT_TRUE(embedded_test_server()->Start());
384 390
385 GURL url(embedded_test_server()->GetURL("/title1.html")); 391 GURL url(embedded_test_server()->GetURL("/title1.html"));
386 chrome::NavigateParams params(browser(), url, ui::PAGE_TRANSITION_LINK); 392 chrome::NavigateParams params(browser(), url, ui::PAGE_TRANSITION_LINK);
387 content::TestNavigationManager manager( 393 content::TestNavigationManager manager(
388 browser()->tab_strip_model()->GetActiveWebContents(), url); 394 browser()->tab_strip_model()->GetActiveWebContents(), url);
389 395
390 chrome::Navigate(&params); 396 chrome::Navigate(&params);
391 EXPECT_TRUE(manager.WaitForRequestStart()); 397 EXPECT_TRUE(manager.WaitForRequestStart());
392 398
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 ui_test_utils::NavigateToURL(browser(), embedded_test_server()->GetURL( 570 ui_test_utils::NavigateToURL(browser(), embedded_test_server()->GetURL(
565 "/page_load_metrics/large.html")); 571 "/page_load_metrics/large.html"));
566 NavigateToUntrackedUrl(); 572 NavigateToUntrackedUrl();
567 573
568 histogram_tester_.ExpectTotalCount(internal::kHistogramTotalBytes, 1); 574 histogram_tester_.ExpectTotalCount(internal::kHistogramTotalBytes, 1);
569 575
570 // Verify that there is a single sample recorded in the 10kB bucket (the size 576 // Verify that there is a single sample recorded in the 10kB bucket (the size
571 // of the main HTML response). 577 // of the main HTML response).
572 histogram_tester_.ExpectBucketCount(internal::kHistogramTotalBytes, 10, 1); 578 histogram_tester_.ExpectBucketCount(internal::kHistogramTotalBytes, 10, 1);
573 } 579 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698