| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/strings/stringprintf.h" | 5 #include "base/strings/stringprintf.h" |
| 6 #include "chrome/browser/extensions/activity_log/activity_log.h" | 6 #include "chrome/browser/extensions/activity_log/activity_log.h" |
| 7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
| 8 #include "chrome/browser/extensions/extension_browsertest.h" | 8 #include "chrome/browser/extensions/extension_browsertest.h" |
| 9 #include "chrome/browser/prerender/prerender_handle.h" | 9 #include "chrome/browser/prerender/prerender_handle.h" |
| 10 #include "chrome/browser/prerender/prerender_manager.h" | 10 #include "chrome/browser/prerender/prerender_manager.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 content::WindowedNotificationObserver page_observer( | 94 content::WindowedNotificationObserver page_observer( |
| 95 content::NOTIFICATION_LOAD_STOP, | 95 content::NOTIFICATION_LOAD_STOP, |
| 96 content::NotificationService::AllSources()); | 96 content::NotificationService::AllSources()); |
| 97 | 97 |
| 98 GURL url(base::StringPrintf( | 98 GURL url(base::StringPrintf( |
| 99 "http://www.google.com.bo:%u/test.html", | 99 "http://www.google.com.bo:%u/test.html", |
| 100 port)); | 100 port)); |
| 101 | 101 |
| 102 const gfx::Size kSize(640, 480); | 102 const gfx::Size kSize(640, 480); |
| 103 scoped_ptr<prerender::PrerenderHandle> prerender_handle( | 103 scoped_ptr<prerender::PrerenderHandle> prerender_handle( |
| 104 prerender_manager->AddPrerenderFromLocalPredictor( | 104 prerender_manager->AddPrerenderFromOmnibox( |
| 105 url, | 105 url, |
| 106 web_contents->GetController().GetDefaultSessionStorageNamespace(), | 106 web_contents->GetController().GetDefaultSessionStorageNamespace(), |
| 107 kSize)); | 107 kSize)); |
| 108 | 108 |
| 109 page_observer.Wait(); | 109 page_observer.Wait(); |
| 110 | 110 |
| 111 activity_log->GetFilteredActions( | 111 activity_log->GetFilteredActions( |
| 112 ext->id(), | 112 ext->id(), |
| 113 Action::ACTION_ANY, | 113 Action::ACTION_ANY, |
| 114 "", | 114 "", |
| 115 "", | 115 "", |
| 116 "", | 116 "", |
| 117 -1, | 117 -1, |
| 118 base::Bind( | 118 base::Bind( |
| 119 ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port)); | 119 ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port)); |
| 120 | 120 |
| 121 // Allow invocation of Prerender_Arguments | 121 // Allow invocation of Prerender_Arguments |
| 122 base::MessageLoop::current()->Run(); | 122 base::MessageLoop::current()->Run(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 } // namespace extensions | 125 } // namespace extensions |
| OLD | NEW |