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 // Disabled while waiting for Blink roll to avoid | 53 #define MAYBE_TriggerEvent TriggerEvent |
54 // https://codereview.chromium.org/52203002 | |
55 #define MAYBE_TriggerEvent DISABLED_TriggerEvent | |
56 #endif | 54 #endif |
57 | 55 |
58 // The test extension sends a message to its 'friend'. The test completes | 56 // The test extension sends a message to its 'friend'. The test completes |
59 // if it successfully sees the 'friend' receive the message. | 57 // if it successfully sees the 'friend' receive the message. |
60 IN_PROC_BROWSER_TEST_F(ActivityLogApiTest, MAYBE_TriggerEvent) { | 58 IN_PROC_BROWSER_TEST_F(ActivityLogApiTest, MAYBE_TriggerEvent) { |
61 ActivityLog::GetInstance(profile())->SetWatchdogAppActive(true); | 59 ActivityLog::GetInstance(profile())->SetWatchdogAppActive(true); |
62 | 60 |
63 host_resolver()->AddRule("*", "127.0.0.1"); | 61 host_resolver()->AddRule("*", "127.0.0.1"); |
64 ASSERT_TRUE(StartEmbeddedTestServer()); | 62 ASSERT_TRUE(StartEmbeddedTestServer()); |
65 embedded_test_server()->RegisterRequestHandler( | 63 embedded_test_server()->RegisterRequestHandler( |
66 base::Bind(&ActivityLogApiTest::HandleRequest, base::Unretained(this))); | 64 base::Bind(&ActivityLogApiTest::HandleRequest, base::Unretained(this))); |
67 | 65 |
68 const Extension* friend_extension = LoadExtensionIncognito( | 66 const Extension* friend_extension = LoadExtensionIncognito( |
69 test_data_dir_.AppendASCII("activity_log_private/friend")); | 67 test_data_dir_.AppendASCII("activity_log_private/friend")); |
70 ASSERT_TRUE(friend_extension); | 68 ASSERT_TRUE(friend_extension); |
71 ASSERT_TRUE(RunExtensionTest("activity_log_private/test")); | 69 ASSERT_TRUE(RunExtensionTest("activity_log_private/test")); |
72 ActivityLog::GetInstance(profile())->SetWatchdogAppActive(false); | 70 ActivityLog::GetInstance(profile())->SetWatchdogAppActive(false); |
73 } | 71 } |
74 | 72 |
75 } // namespace extensions | 73 } // namespace extensions |
76 | 74 |
OLD | NEW |