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

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

Issue 10026001: Convert LoadTimingObserver ui_test to be a browser_test. I'm renabling it in the process to see if … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « chrome/browser/net/load_timing_observer_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/test/automation/tab_proxy.h"
6 #include "chrome/test/ui/ui_test.h"
7 #include "googleurl/src/gurl.h"
8 #include "net/test/test_server.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 class LoadTimingObserverUITest : public UITest {
12 public:
13 LoadTimingObserverUITest()
14 : http_server_(net::TestServer::TYPE_HTTP,
15 net::TestServer::kLocalhost,
16 FilePath()) {
17 dom_automation_enabled_ = true;
18 }
19
20 protected:
21 net::TestServer http_server_;
22 };
23
24 // http://crbug.com/102030
25 // http://crbug.com/114390
26 TEST_F(LoadTimingObserverUITest, DISABLED_CacheHitAfterRedirect) {
27 ASSERT_TRUE(http_server_.Start());
28 GURL cached_page = http_server_.GetURL("cachetime");
29 std::string redirect = "server-redirect?" + cached_page.spec();
30 NavigateToURL(cached_page);
31 NavigateToURL(http_server_.GetURL(redirect));
32 scoped_refptr<TabProxy> tab_proxy = GetActiveTab();
33 int response_start = 0;
34 int response_end = 0;
35 ASSERT_TRUE(tab_proxy->ExecuteAndExtractInt(
36 L"", L"window.domAutomationController.send("
37 L"window.performance.timing.responseStart - "
38 L"window.performance.timing.navigationStart)", &response_start));
39 ASSERT_TRUE(tab_proxy->ExecuteAndExtractInt(
40 L"", L"window.domAutomationController.send("
41 L"window.performance.timing.responseEnd - "
42 L"window.performance.timing.navigationStart)", &response_end));
43 EXPECT_LE(response_start, response_end);
44 }
OLDNEW
« no previous file with comments | « chrome/browser/net/load_timing_observer_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698