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

Side by Side Diff: chrome/common/net/cache_uitest.cc

Issue 17030: Revert 7508.7509 and 7510 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_plugin_unittest.cc ('k') | chrome/test/ui/inspector_controller_uitest.cc » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <string> 5 #include <string>
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/test/ui/ui_test.h" 8 #include "chrome/test/ui/ui_test.h"
9 #include "chrome/test/automation/automation_proxy.h" 9 #include "chrome/test/automation/automation_proxy.h"
10 #include "chrome/test/automation/browser_proxy.h" 10 #include "chrome/test/automation/browser_proxy.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Appends a new tab to the test chrome window and loads the specified 47 // Appends a new tab to the test chrome window and loads the specified
48 // URL. The new tab will try to get the URL from the cache before requesting 48 // URL. The new tab will try to get the URL from the cache before requesting
49 // the server for it. 49 // the server for it.
50 void GetNewTab(AutomationProxy* automationProxy, const GURL& tab_url); 50 void GetNewTab(AutomationProxy* automationProxy, const GURL& tab_url);
51 }; 51 };
52 52
53 // Runs the cache test for the specified path. 53 // Runs the cache test for the specified path.
54 void CacheTest::RunCacheTest(const std::wstring &url, 54 void CacheTest::RunCacheTest(const std::wstring &url,
55 bool expect_new_tab_cached, 55 bool expect_new_tab_cached,
56 bool expect_delayed_reload) { 56 bool expect_delayed_reload) {
57 scoped_refptr<HTTPTestServer> server = 57 TestServer server(L"chrome/test/data");
58 HTTPTestServer::CreateServer(L"chrome/test/data"); 58 GURL test_page(server.TestServerPageW(url));
59 ASSERT_TRUE(NULL != server.get());
60 GURL test_page(server->TestServerPageW(url));
61 59
62 NavigateToURL(test_page); 60 NavigateToURL(test_page);
63 std::wstring original_time = GetActiveTabTitle(); 61 std::wstring original_time = GetActiveTabTitle();
64 62
65 Sleep(kWaitForCacheUpdateMsec); 63 Sleep(kWaitForCacheUpdateMsec);
66 64
67 GetNewTab(automation(), test_page); 65 GetNewTab(automation(), test_page);
68 std::wstring revisit_time = GetActiveTabTitle(); 66 std::wstring revisit_time = GetActiveTabTitle();
69 67
70 if (expect_new_tab_cached) { 68 if (expect_new_tab_cached) {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 TEST_F(CacheTest, NoStoreMaxAge) { 168 TEST_F(CacheTest, NoStoreMaxAge) {
171 RunCacheTest(L"cache/no-store/max-age", false, false); 169 RunCacheTest(L"cache/no-store/max-age", false, false);
172 } 170 }
173 171
174 // Tests that a cached copy of the page is not transformed when no-transform 172 // Tests that a cached copy of the page is not transformed when no-transform
175 // header is specified. 173 // header is specified.
176 TEST_F(CacheTest, NoTransform) { 174 TEST_F(CacheTest, NoTransform) {
177 RunCacheTest(L"cache/no-transform", false, false); 175 RunCacheTest(L"cache/no-transform", false, false);
178 } 176 }
179 177
OLDNEW
« no previous file with comments | « chrome/common/chrome_plugin_unittest.cc ('k') | chrome/test/ui/inspector_controller_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698