| OLD | NEW |
| 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 <deque> | 5 #include <deque> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 virtual ~PrerenderBrowserTest() {} | 976 virtual ~PrerenderBrowserTest() {} |
| 977 | 977 |
| 978 content::SessionStorageNamespace* GetSessionStorageNamespace() const { | 978 content::SessionStorageNamespace* GetSessionStorageNamespace() const { |
| 979 WebContents* web_contents = | 979 WebContents* web_contents = |
| 980 current_browser()->tab_strip_model()->GetActiveWebContents(); | 980 current_browser()->tab_strip_model()->GetActiveWebContents(); |
| 981 if (!web_contents) | 981 if (!web_contents) |
| 982 return NULL; | 982 return NULL; |
| 983 return web_contents->GetController().GetDefaultSessionStorageNamespace(); | 983 return web_contents->GetController().GetDefaultSessionStorageNamespace(); |
| 984 } | 984 } |
| 985 | 985 |
| 986 virtual void SetUp() OVERRIDE { | |
| 987 // TODO(danakj): The GPU Video Decoder needs real GL bindings. | |
| 988 // crbug.com/269087 | |
| 989 UseRealGLBindings(); | |
| 990 | |
| 991 InProcessBrowserTest::SetUp(); | |
| 992 } | |
| 993 | |
| 994 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 986 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
| 995 #if defined(FULL_SAFE_BROWSING) | 987 #if defined(FULL_SAFE_BROWSING) |
| 996 SafeBrowsingService::RegisterFactory(safe_browsing_factory_.get()); | 988 SafeBrowsingService::RegisterFactory(safe_browsing_factory_.get()); |
| 997 #endif | 989 #endif |
| 998 } | 990 } |
| 999 | 991 |
| 1000 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { | 992 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE { |
| 1001 #if defined(FULL_SAFE_BROWSING) | 993 #if defined(FULL_SAFE_BROWSING) |
| 1002 SafeBrowsingService::RegisterFactory(NULL); | 994 SafeBrowsingService::RegisterFactory(NULL); |
| 1003 #endif | 995 #endif |
| (...skipping 2783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3787 const NavigationController& controller = web_contents->GetController(); | 3779 const NavigationController& controller = web_contents->GetController(); |
| 3788 // First entry is about:blank, second is prerender_page.html. | 3780 // First entry is about:blank, second is prerender_page.html. |
| 3789 EXPECT_TRUE(controller.GetPendingEntry() == NULL); | 3781 EXPECT_TRUE(controller.GetPendingEntry() == NULL); |
| 3790 EXPECT_EQ(2, controller.GetEntryCount()); | 3782 EXPECT_EQ(2, controller.GetEntryCount()); |
| 3791 EXPECT_EQ(GURL(content::kAboutBlankURL), | 3783 EXPECT_EQ(GURL(content::kAboutBlankURL), |
| 3792 controller.GetEntryAtIndex(0)->GetURL()); | 3784 controller.GetEntryAtIndex(0)->GetURL()); |
| 3793 EXPECT_EQ(dest_url(), controller.GetEntryAtIndex(1)->GetURL()); | 3785 EXPECT_EQ(dest_url(), controller.GetEntryAtIndex(1)->GetURL()); |
| 3794 } | 3786 } |
| 3795 | 3787 |
| 3796 } // namespace prerender | 3788 } // namespace prerender |
| OLD | NEW |