| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/scoped_ptr.h" | 5 #include "base/scoped_ptr.h" |
| 6 #include "chrome/browser/instant/instant_loader.h" | 6 #include "chrome/browser/instant/instant_loader.h" |
| 7 #include "chrome/browser/instant/instant_loader_delegate.h" | 7 #include "chrome/browser/instant/instant_loader_delegate.h" |
| 8 #include "chrome/browser/instant/instant_loader_manager.h" | 8 #include "chrome/browser/instant/instant_loader_manager.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 return gfx::Rect(); | 23 return gfx::Rect(); |
| 24 } | 24 } |
| 25 | 25 |
| 26 virtual bool ShouldCommitInstantOnMouseUp() { | 26 virtual bool ShouldCommitInstantOnMouseUp() { |
| 27 return false; | 27 return false; |
| 28 } | 28 } |
| 29 | 29 |
| 30 virtual void CommitInstantLoader(InstantLoader* loader) { | 30 virtual void CommitInstantLoader(InstantLoader* loader) { |
| 31 } | 31 } |
| 32 | 32 |
| 33 virtual void InstantLoaderDoesntSupportInstant(InstantLoader* loader, | 33 virtual void InstantLoaderDoesntSupportInstant(InstantLoader* loader) { |
| 34 bool needs_reload, | |
| 35 const GURL& url_to_load) { | |
| 36 } | 34 } |
| 37 | 35 |
| 38 virtual void AddToBlacklist(InstantLoader* loader, const GURL& url) { | 36 virtual void AddToBlacklist(InstantLoader* loader, const GURL& url) { |
| 39 } | 37 } |
| 40 | 38 |
| 41 private: | 39 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(InstantLoaderDelegateImpl); | 40 DISALLOW_COPY_AND_ASSIGN(InstantLoaderDelegateImpl); |
| 43 }; | 41 }; |
| 44 | 42 |
| 45 } | 43 } |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 EXPECT_TRUE(manager.WillUpateChangeActiveLoader(1)); | 268 EXPECT_TRUE(manager.WillUpateChangeActiveLoader(1)); |
| 271 ASSERT_TRUE(manager.active_loader()); | 269 ASSERT_TRUE(manager.active_loader()); |
| 272 MarkReady(manager.active_loader()); | 270 MarkReady(manager.active_loader()); |
| 273 | 271 |
| 274 // Add a loader with id 1 and test again. | 272 // Add a loader with id 1 and test again. |
| 275 manager.UpdateLoader(1, &loader); | 273 manager.UpdateLoader(1, &loader); |
| 276 EXPECT_TRUE(manager.WillUpateChangeActiveLoader(0)); | 274 EXPECT_TRUE(manager.WillUpateChangeActiveLoader(0)); |
| 277 EXPECT_FALSE(manager.WillUpateChangeActiveLoader(1)); | 275 EXPECT_FALSE(manager.WillUpateChangeActiveLoader(1)); |
| 278 } | 276 } |
| 279 | 277 |
| OLD | NEW |