| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 ASSERT_EQ( | 54 ASSERT_EQ( |
| 55 base::StringPrintf("www.google.com.bo:%d/test.html", port), | 55 base::StringPrintf("www.google.com.bo:%d/test.html", port), |
| 56 last->page_title()); | 56 last->page_title()); |
| 57 ASSERT_EQ("{\"prerender\":true}", | 57 ASSERT_EQ("{\"prerender\":true}", |
| 58 ActivityLogPolicy::Util::Serialize(last->other())); | 58 ActivityLogPolicy::Util::Serialize(last->other())); |
| 59 ASSERT_EQ("", last->api_name()); | 59 ASSERT_EQ("", last->api_name()); |
| 60 ASSERT_EQ("", last->SerializeArgUrl()); | 60 ASSERT_EQ("", last->SerializeArgUrl()); |
| 61 } | 61 } |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 IN_PROC_BROWSER_TEST_F(ActivityLogPrerenderTest, TestScriptInjected) { | 64 #if defined(USE_AURA) |
| 65 #if defined (USE_AURA) | |
| 66 // This tests fails in Aura, but it is the only one in this set so | 65 // This tests fails in Aura, but it is the only one in this set so |
| 67 // we disable it for now. Tracking bug: 292299. | 66 // we disable it for now. Tracking bug: 292299. |
| 68 return; | 67 #define MAYBE_TestScriptInjected DISABLED_TestScriptInjected |
| 68 #else |
| 69 #define MAYBE_TestScriptInjected TestScriptInjected |
| 69 #endif | 70 #endif |
| 71 |
| 72 IN_PROC_BROWSER_TEST_F(ActivityLogPrerenderTest, MAYBE_TestScriptInjected) { |
| 70 host_resolver()->AddRule("*", "127.0.0.1"); | 73 host_resolver()->AddRule("*", "127.0.0.1"); |
| 71 StartEmbeddedTestServer(); | 74 StartEmbeddedTestServer(); |
| 72 int port = embedded_test_server()->port(); | 75 int port = embedded_test_server()->port(); |
| 73 | 76 |
| 74 // Get the extension (chrome/test/data/extensions/activity_log) | 77 // Get the extension (chrome/test/data/extensions/activity_log) |
| 75 const Extension* ext = | 78 const Extension* ext = |
| 76 LoadExtension(test_data_dir_.AppendASCII("activity_log")); | 79 LoadExtension(test_data_dir_.AppendASCII("activity_log")); |
| 77 ASSERT_TRUE(ext); | 80 ASSERT_TRUE(ext); |
| 78 | 81 |
| 79 ActivityLog* activity_log = ActivityLog::GetInstance(profile()); | 82 ActivityLog* activity_log = ActivityLog::GetInstance(profile()); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 "", | 120 "", |
| 118 0, | 121 0, |
| 119 base::Bind( | 122 base::Bind( |
| 120 ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port)); | 123 ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port)); |
| 121 | 124 |
| 122 // Allow invocation of Prerender_Arguments | 125 // Allow invocation of Prerender_Arguments |
| 123 base::MessageLoop::current()->Run(); | 126 base::MessageLoop::current()->Run(); |
| 124 } | 127 } |
| 125 | 128 |
| 126 } // namespace extensions | 129 } // namespace extensions |
| OLD | NEW |