| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 last->SerializePageUrl()); | 64 last->SerializePageUrl()); |
| 65 ASSERT_EQ(base::StringPrintf("www.google.com.bo:%u/title1.html", port), | 65 ASSERT_EQ(base::StringPrintf("www.google.com.bo:%u/title1.html", port), |
| 66 last->page_title()); | 66 last->page_title()); |
| 67 ASSERT_EQ("{\"prerender\":true}", | 67 ASSERT_EQ("{\"prerender\":true}", |
| 68 ActivityLogPolicy::Util::Serialize(last->other())); | 68 ActivityLogPolicy::Util::Serialize(last->other())); |
| 69 ASSERT_EQ("", last->api_name()); | 69 ASSERT_EQ("", last->api_name()); |
| 70 ASSERT_EQ("", last->SerializeArgUrl()); | 70 ASSERT_EQ("", last->SerializeArgUrl()); |
| 71 } | 71 } |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 IN_PROC_BROWSER_TEST_F(ActivityLogPrerenderTest, TestScriptInjected) { | 74 // https://crbug.com/724553 |
| 75 #if defined(OS_MACOSX) && defined(ADDRESS_SANITIZER) |
| 76 #define MAYBE_TestScriptInjected DISABLED_TestScriptInjected |
| 77 #else |
| 78 #define MAYBE_TestScriptInjected TestScriptInjected |
| 79 #endif // defined(OS_MACOSX) && defined(ADDRESS_SANITIZER) |
| 80 |
| 81 IN_PROC_BROWSER_TEST_F(ActivityLogPrerenderTest, MAYBE_TestScriptInjected) { |
| 75 ASSERT_TRUE(StartEmbeddedTestServer()); | 82 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 76 uint16_t port = embedded_test_server()->port(); | 83 uint16_t port = embedded_test_server()->port(); |
| 77 | 84 |
| 78 // Get the extension (chrome/test/data/extensions/activity_log) | 85 // Get the extension (chrome/test/data/extensions/activity_log) |
| 79 const Extension* ext = | 86 const Extension* ext = |
| 80 LoadExtension(test_data_dir_.AppendASCII("activity_log")); | 87 LoadExtension(test_data_dir_.AppendASCII("activity_log")); |
| 81 ASSERT_TRUE(ext); | 88 ASSERT_TRUE(ext); |
| 82 | 89 |
| 83 ActivityLog* activity_log = ActivityLog::GetInstance(profile()); | 90 ActivityLog* activity_log = ActivityLog::GetInstance(profile()); |
| 84 activity_log->SetWatchdogAppActiveForTesting(true); | 91 activity_log->SetWatchdogAppActiveForTesting(true); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 activity_log->GetFilteredActions( | 127 activity_log->GetFilteredActions( |
| 121 ext->id(), Action::ACTION_ANY, "", "", "", -1, | 128 ext->id(), Action::ACTION_ANY, "", "", "", -1, |
| 122 base::Bind(ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port, | 129 base::Bind(ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port, |
| 123 run_loop.QuitWhenIdleClosure())); | 130 run_loop.QuitWhenIdleClosure())); |
| 124 | 131 |
| 125 // Allow invocation of Prerender_Arguments | 132 // Allow invocation of Prerender_Arguments |
| 126 run_loop.Run(); | 133 run_loop.Run(); |
| 127 } | 134 } |
| 128 | 135 |
| 129 } // namespace extensions | 136 } // namespace extensions |
| OLD | NEW |