OLD | NEW |
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/platform_thread.h" | 7 #include "base/platform_thread.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "chrome/test/ui/ui_test.h" | 9 #include "chrome/test/ui/ui_test.h" |
10 #include "chrome/test/automation/automation_proxy.h" | 10 #include "chrome/test/automation/automation_proxy.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 GetNewTab(automation(), test_page); | 88 GetNewTab(automation(), test_page); |
89 revisit_time = GetActiveTabTitle(); | 89 revisit_time = GetActiveTabTitle(); |
90 | 90 |
91 EXPECT_NE(reload_time, revisit_time); | 91 EXPECT_NE(reload_time, revisit_time); |
92 } | 92 } |
93 } | 93 } |
94 | 94 |
95 // Appends a new tab to the test chrome window and loads the specified URL. | 95 // Appends a new tab to the test chrome window and loads the specified URL. |
96 void CacheTest::GetNewTab(AutomationProxy* automationProxy, | 96 void CacheTest::GetNewTab(AutomationProxy* automationProxy, |
97 const GURL& tab_url) { | 97 const GURL& tab_url) { |
98 scoped_ptr<BrowserProxy> window_proxy(automationProxy->GetBrowserWindow(0)); | 98 scoped_refptr<BrowserProxy> window_proxy(automationProxy->GetBrowserWindow(0))
; |
99 ASSERT_TRUE(window_proxy.get()); | 99 ASSERT_TRUE(window_proxy.get()); |
100 ASSERT_TRUE(window_proxy->AppendTab(tab_url)); | 100 ASSERT_TRUE(window_proxy->AppendTab(tab_url)); |
101 } | 101 } |
102 | 102 |
103 // Tests that a cached copy of the page is not used when max-age=0 headers | 103 // Tests that a cached copy of the page is not used when max-age=0 headers |
104 // are specified. | 104 // are specified. |
105 TEST_F(CacheTest, NoCacheMaxAge) { | 105 TEST_F(CacheTest, NoCacheMaxAge) { |
106 RunCacheTest(L"nocachetime/maxage", false, false); | 106 RunCacheTest(L"nocachetime/maxage", false, false); |
107 } | 107 } |
108 | 108 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 // is specified, even though the page has not yet expired. | 170 // is specified, even though the page has not yet expired. |
171 TEST_F(CacheTest, NoStoreMaxAge) { | 171 TEST_F(CacheTest, NoStoreMaxAge) { |
172 RunCacheTest(L"cache/no-store/max-age", false, false); | 172 RunCacheTest(L"cache/no-store/max-age", false, false); |
173 } | 173 } |
174 | 174 |
175 // Tests that a cached copy of the page is not transformed when no-transform | 175 // Tests that a cached copy of the page is not transformed when no-transform |
176 // header is specified. | 176 // header is specified. |
177 TEST_F(CacheTest, NoTransform) { | 177 TEST_F(CacheTest, NoTransform) { |
178 RunCacheTest(L"cache/no-transform", false, false); | 178 RunCacheTest(L"cache/no-transform", false, false); |
179 } | 179 } |
OLD | NEW |