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