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

Side by Side Diff: chrome/browser/net/load_timing_observer_browsertest.cc

Issue 10386207: Mark LoadTimingObserverTest.CacheHitAfterRedirect as flaky (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
« 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 #include "chrome/test/base/in_process_browser_test.h" 6 #include "chrome/test/base/in_process_browser_test.h"
7 #include "chrome/test/base/ui_test_utils.h" 7 #include "chrome/test/base/ui_test_utils.h"
8 #include "content/public/browser/web_contents.h" 8 #include "content/public/browser/web_contents.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "net/test/test_server.h" 10 #include "net/test/test_server.h"
11 11
12 class LoadTimingObserverTest : public InProcessBrowserTest { 12 class LoadTimingObserverTest : public InProcessBrowserTest {
13 public: 13 public:
14 LoadTimingObserverTest() { 14 LoadTimingObserverTest() {
15 EnableDOMAutomation(); 15 EnableDOMAutomation();
16 } 16 }
17 17
18 protected: 18 protected:
19 }; 19 };
20 20
21 // http://crbug.com/102030 21 // http://crbug.com/102030
22 IN_PROC_BROWSER_TEST_F(LoadTimingObserverTest, CacheHitAfterRedirect) { 22 IN_PROC_BROWSER_TEST_F(LoadTimingObserverTest, FLAKY_CacheHitAfterRedirect) {
23 ASSERT_TRUE(test_server()->Start()); 23 ASSERT_TRUE(test_server()->Start());
24 GURL cached_page = test_server()->GetURL("cachetime"); 24 GURL cached_page = test_server()->GetURL("cachetime");
25 std::string redirect = "server-redirect?" + cached_page.spec(); 25 std::string redirect = "server-redirect?" + cached_page.spec();
26 ui_test_utils::NavigateToURL(browser(), cached_page); 26 ui_test_utils::NavigateToURL(browser(), cached_page);
27 ui_test_utils::NavigateToURL(browser(), test_server()->GetURL(redirect)); 27 ui_test_utils::NavigateToURL(browser(), test_server()->GetURL(redirect));
28 28
29 int response_start = 0; 29 int response_start = 0;
30 int response_end = 0; 30 int response_end = 0;
31 content::RenderViewHost* render_view_host = 31 content::RenderViewHost* render_view_host =
32 browser()->GetSelectedWebContents()->GetRenderViewHost(); 32 browser()->GetSelectedWebContents()->GetRenderViewHost();
33 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractInt( 33 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractInt(
34 render_view_host, L"", 34 render_view_host, L"",
35 L"window.domAutomationController.send(" 35 L"window.domAutomationController.send("
36 L"window.performance.timing.responseStart - " 36 L"window.performance.timing.responseStart - "
37 L"window.performance.timing.navigationStart)", &response_start)); 37 L"window.performance.timing.navigationStart)", &response_start));
38 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractInt( 38 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractInt(
39 render_view_host, L"", 39 render_view_host, L"",
40 L"window.domAutomationController.send(" 40 L"window.domAutomationController.send("
41 L"window.performance.timing.responseEnd - " 41 L"window.performance.timing.responseEnd - "
42 L"window.performance.timing.navigationStart)", &response_end)); 42 L"window.performance.timing.navigationStart)", &response_end));
43 EXPECT_LE(response_start, response_end); 43 EXPECT_LE(response_start, response_end);
44 } 44 }
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