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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 ActivityLog* activity_log = ActivityLog::GetInstance(profile()); | 242 ActivityLog* activity_log = ActivityLog::GetInstance(profile()); |
243 ASSERT_TRUE(GetDatabaseEnabled()); | 243 ASSERT_TRUE(GetDatabaseEnabled()); |
244 GURL url("http://www.google.com"); | 244 GURL url("http://www.google.com"); |
245 | 245 |
246 prerender::PrerenderManager* prerender_manager = | 246 prerender::PrerenderManager* prerender_manager = |
247 prerender::PrerenderManagerFactory::GetForProfile( | 247 prerender::PrerenderManagerFactory::GetForProfile( |
248 Profile::FromBrowserContext(profile())); | 248 Profile::FromBrowserContext(profile())); |
249 | 249 |
250 const gfx::Size kSize(640, 480); | 250 const gfx::Size kSize(640, 480); |
251 scoped_ptr<prerender::PrerenderHandle> prerender_handle( | 251 scoped_ptr<prerender::PrerenderHandle> prerender_handle( |
252 prerender_manager->AddPrerenderFromLocalPredictor( | 252 prerender_manager->AddPrerenderFromOmnibox( |
253 url, | 253 url, |
254 web_contents()->GetController().GetDefaultSessionStorageNamespace(), | 254 web_contents()->GetController().GetDefaultSessionStorageNamespace(), |
255 kSize)); | 255 kSize)); |
256 | 256 |
257 const std::vector<content::WebContents*> contentses = | 257 const std::vector<content::WebContents*> contentses = |
258 prerender_manager->GetAllPrerenderingContents(); | 258 prerender_manager->GetAllPrerenderingContents(); |
259 ASSERT_EQ(1U, contentses.size()); | 259 ASSERT_EQ(1U, contentses.size()); |
260 content::WebContents *contents = contentses[0]; | 260 content::WebContents *contents = contentses[0]; |
261 ASSERT_TRUE(prerender_manager->IsWebContentsPrerendering(contents, NULL)); | 261 ASSERT_TRUE(prerender_manager->IsWebContentsPrerendering(contents, NULL)); |
262 | 262 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 kExtensionId, | 402 kExtensionId, |
403 Action::ACTION_ANY, | 403 Action::ACTION_ANY, |
404 "", | 404 "", |
405 "", | 405 "", |
406 "", | 406 "", |
407 -1, | 407 -1, |
408 base::Bind(ActivityLogTest::RetrieveActions_ArgUrlApiCalls)); | 408 base::Bind(ActivityLogTest::RetrieveActions_ArgUrlApiCalls)); |
409 } | 409 } |
410 | 410 |
411 } // namespace extensions | 411 } // namespace extensions |
OLD | NEW |