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 | 6 |
7 #include "chrome/browser/extensions/activity_log/activity_log.h" | 7 #include "chrome/browser/extensions/activity_log/activity_log.h" |
8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
10 #include "chrome/common/extensions/extension_builder.h" | 10 #include "chrome/common/extensions/extension_builder.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } | 43 } |
44 | 44 |
45 private: | 45 private: |
46 CommandLine saved_cmdline_; | 46 CommandLine saved_cmdline_; |
47 }; | 47 }; |
48 | 48 |
49 #if defined(OS_WIN) && !defined(NDEBUG) | 49 #if defined(OS_WIN) && !defined(NDEBUG) |
50 // TODO(karenlees): fix flakiness on win debug - crbug.com/299393 | 50 // TODO(karenlees): fix flakiness on win debug - crbug.com/299393 |
51 #define MAYBE_TriggerEvent DISABLED_TriggerEvent | 51 #define MAYBE_TriggerEvent DISABLED_TriggerEvent |
52 #else | 52 #else |
53 #define MAYBE_TriggerEvent TriggerEvent | 53 // Disabled while waiting for Blink roll to avoid |
| 54 // https://codereview.chromium.org/52203002 |
| 55 #define MAYBE_TriggerEvent DISABLED_TriggerEvent |
54 #endif | 56 #endif |
55 | 57 |
56 // The test extension sends a message to its 'friend'. The test completes | 58 // The test extension sends a message to its 'friend'. The test completes |
57 // if it successfully sees the 'friend' receive the message. | 59 // if it successfully sees the 'friend' receive the message. |
58 IN_PROC_BROWSER_TEST_F(ActivityLogApiTest, MAYBE_TriggerEvent) { | 60 IN_PROC_BROWSER_TEST_F(ActivityLogApiTest, MAYBE_TriggerEvent) { |
59 ActivityLog::GetInstance(profile())->SetWatchdogAppActive(true); | 61 ActivityLog::GetInstance(profile())->SetWatchdogAppActive(true); |
60 | 62 |
61 host_resolver()->AddRule("*", "127.0.0.1"); | 63 host_resolver()->AddRule("*", "127.0.0.1"); |
62 ASSERT_TRUE(StartEmbeddedTestServer()); | 64 ASSERT_TRUE(StartEmbeddedTestServer()); |
63 embedded_test_server()->RegisterRequestHandler( | 65 embedded_test_server()->RegisterRequestHandler( |
64 base::Bind(&ActivityLogApiTest::HandleRequest, base::Unretained(this))); | 66 base::Bind(&ActivityLogApiTest::HandleRequest, base::Unretained(this))); |
65 | 67 |
66 const Extension* friend_extension = LoadExtensionIncognito( | 68 const Extension* friend_extension = LoadExtensionIncognito( |
67 test_data_dir_.AppendASCII("activity_log_private/friend")); | 69 test_data_dir_.AppendASCII("activity_log_private/friend")); |
68 ASSERT_TRUE(friend_extension); | 70 ASSERT_TRUE(friend_extension); |
69 ASSERT_TRUE(RunExtensionTest("activity_log_private/test")); | 71 ASSERT_TRUE(RunExtensionTest("activity_log_private/test")); |
70 ActivityLog::GetInstance(profile())->SetWatchdogAppActive(false); | 72 ActivityLog::GetInstance(profile())->SetWatchdogAppActive(false); |
71 } | 73 } |
72 | 74 |
73 } // namespace extensions | 75 } // namespace extensions |
74 | 76 |
OLD | NEW |