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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
10 #include "chrome/browser/extensions/activity_log/activity_action_constants.h" | 10 #include "chrome/browser/extensions/activity_log/activity_action_constants.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 .Build(); | 237 .Build(); |
238 extension_service_->AddExtension(extension.get()); | 238 extension_service_->AddExtension(extension.get()); |
239 ActivityLog* activity_log = ActivityLog::GetInstance(profile()); | 239 ActivityLog* activity_log = ActivityLog::GetInstance(profile()); |
240 ASSERT_TRUE(GetDatabaseEnabled()); | 240 ASSERT_TRUE(GetDatabaseEnabled()); |
241 GURL url("http://www.google.com"); | 241 GURL url("http://www.google.com"); |
242 | 242 |
243 prerender::PrerenderManager* prerender_manager = | 243 prerender::PrerenderManager* prerender_manager = |
244 prerender::PrerenderManagerFactory::GetForProfile( | 244 prerender::PrerenderManagerFactory::GetForProfile( |
245 Profile::FromBrowserContext(profile())); | 245 Profile::FromBrowserContext(profile())); |
246 | 246 |
| 247 prerender_manager->OnCookieStoreLoaded(); |
| 248 |
247 const gfx::Size kSize(640, 480); | 249 const gfx::Size kSize(640, 480); |
248 scoped_ptr<prerender::PrerenderHandle> prerender_handle( | 250 scoped_ptr<prerender::PrerenderHandle> prerender_handle( |
249 prerender_manager->AddPrerenderFromLocalPredictor( | 251 prerender_manager->AddPrerenderFromLocalPredictor( |
250 url, | 252 url, |
251 web_contents()->GetController().GetDefaultSessionStorageNamespace(), | 253 web_contents()->GetController().GetDefaultSessionStorageNamespace(), |
252 kSize)); | 254 kSize)); |
253 | 255 |
254 const std::vector<content::WebContents*> contentses = | 256 const std::vector<content::WebContents*> contentses = |
255 prerender_manager->GetAllPrerenderingContents(); | 257 prerender_manager->GetAllPrerenderingContents(); |
256 ASSERT_EQ(1U, contentses.size()); | 258 ASSERT_EQ(1U, contentses.size()); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 kExtensionId, | 401 kExtensionId, |
400 Action::ACTION_ANY, | 402 Action::ACTION_ANY, |
401 "", | 403 "", |
402 "", | 404 "", |
403 "", | 405 "", |
404 -1, | 406 -1, |
405 base::Bind(ActivityLogTest::RetrieveActions_ArgUrlApiCalls)); | 407 base::Bind(ActivityLogTest::RetrieveActions_ArgUrlApiCalls)); |
406 } | 408 } |
407 | 409 |
408 } // namespace extensions | 410 } // namespace extensions |
OLD | NEW |