| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <string> | 5 #include <string> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/extensions/activity_log/activity_log.h" | 9 #include "chrome/browser/extensions/activity_log/activity_log.h" |
| 10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #if defined(OS_WIN) | 55 #if defined(OS_WIN) |
| 56 // TODO(pmarch): fix flakiness on win debug - http://crbug.com/299393 | 56 // TODO(pmarch): fix flakiness on win debug - http://crbug.com/299393 |
| 57 #define MAYBE_TriggerEvent DISABLED_TriggerEvent | 57 #define MAYBE_TriggerEvent DISABLED_TriggerEvent |
| 58 #else | 58 #else |
| 59 #define MAYBE_TriggerEvent TriggerEvent | 59 #define MAYBE_TriggerEvent TriggerEvent |
| 60 #endif | 60 #endif |
| 61 | 61 |
| 62 // The test extension sends a message to its 'friend'. The test completes | 62 // The test extension sends a message to its 'friend'. The test completes |
| 63 // if it successfully sees the 'friend' receive the message. | 63 // if it successfully sees the 'friend' receive the message. |
| 64 IN_PROC_BROWSER_TEST_F(ActivityLogApiTest, MAYBE_TriggerEvent) { | 64 IN_PROC_BROWSER_TEST_F(ActivityLogApiTest, MAYBE_TriggerEvent) { |
| 65 #if defined(OS_MACOSX) | |
| 66 if (base::mac::IsOSSnowLeopard()) { | |
| 67 // This test flakes on 10.6 only. http://crbug.com/499176 | |
| 68 return; | |
| 69 } | |
| 70 #endif | |
| 71 ActivityLog::GetInstance(profile())->SetWatchdogAppActiveForTesting(true); | 65 ActivityLog::GetInstance(profile())->SetWatchdogAppActiveForTesting(true); |
| 72 | 66 |
| 73 host_resolver()->AddRule("*", "127.0.0.1"); | 67 host_resolver()->AddRule("*", "127.0.0.1"); |
| 74 ASSERT_TRUE(StartEmbeddedTestServer()); | 68 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 75 embedded_test_server()->RegisterRequestHandler( | 69 embedded_test_server()->RegisterRequestHandler( |
| 76 base::Bind(&ActivityLogApiTest::HandleRequest, base::Unretained(this))); | 70 base::Bind(&ActivityLogApiTest::HandleRequest, base::Unretained(this))); |
| 77 | 71 |
| 78 const Extension* friend_extension = LoadExtensionIncognito( | 72 const Extension* friend_extension = LoadExtensionIncognito( |
| 79 test_data_dir_.AppendASCII("activity_log_private/friend")); | 73 test_data_dir_.AppendASCII("activity_log_private/friend")); |
| 80 ASSERT_TRUE(friend_extension); | 74 ASSERT_TRUE(friend_extension); |
| 81 ASSERT_TRUE(RunExtensionTest("activity_log_private/test")); | 75 ASSERT_TRUE(RunExtensionTest("activity_log_private/test")); |
| 82 ActivityLog::GetInstance(profile())->SetWatchdogAppActiveForTesting(false); | 76 ActivityLog::GetInstance(profile())->SetWatchdogAppActiveForTesting(false); |
| 83 } | 77 } |
| 84 | 78 |
| 85 } // namespace extensions | 79 } // namespace extensions |
| 86 | 80 |
| OLD | NEW |