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 | |
249 const gfx::Size kSize(640, 480); | 247 const gfx::Size kSize(640, 480); |
250 scoped_ptr<prerender::PrerenderHandle> prerender_handle( | 248 scoped_ptr<prerender::PrerenderHandle> prerender_handle( |
251 prerender_manager->AddPrerenderFromLocalPredictor( | 249 prerender_manager->AddPrerenderFromLocalPredictor( |
252 url, | 250 url, |
253 web_contents()->GetController().GetDefaultSessionStorageNamespace(), | 251 web_contents()->GetController().GetDefaultSessionStorageNamespace(), |
254 kSize)); | 252 kSize)); |
255 | 253 |
256 const std::vector<content::WebContents*> contentses = | 254 const std::vector<content::WebContents*> contentses = |
257 prerender_manager->GetAllPrerenderingContents(); | 255 prerender_manager->GetAllPrerenderingContents(); |
258 ASSERT_EQ(1U, contentses.size()); | 256 ASSERT_EQ(1U, contentses.size()); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 kExtensionId, | 399 kExtensionId, |
402 Action::ACTION_ANY, | 400 Action::ACTION_ANY, |
403 "", | 401 "", |
404 "", | 402 "", |
405 "", | 403 "", |
406 -1, | 404 -1, |
407 base::Bind(ActivityLogTest::RetrieveActions_ArgUrlApiCalls)); | 405 base::Bind(ActivityLogTest::RetrieveActions_ArgUrlApiCalls)); |
408 } | 406 } |
409 | 407 |
410 } // namespace extensions | 408 } // namespace extensions |
OLD | NEW |