Chromium Code Reviews| 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 "extensions/common/extension_builder.h" | 10 #include "extensions/common/extension_builder.h" |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 response->set_code(net::HTTP_OK); | 39 response->set_code(net::HTTP_OK); |
| 40 response->set_content("<html><head><title>ActivityLogTest</title>" | 40 response->set_content("<html><head><title>ActivityLogTest</title>" |
| 41 "</head><body>Hello World</body></html>"); | 41 "</head><body>Hello World</body></html>"); |
| 42 return response.PassAs<HttpResponse>(); | 42 return response.PassAs<HttpResponse>(); |
| 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) | |
| 50 // TODO(karenlees): fix flakiness on win debug - crbug.com/299393 | |
|
felt
2014/07/15 16:42:52
why is this TODO being reassigned from pmarch to k
| |
| 51 #define MAYBE_TriggerEvent DISABLED_TriggerEvent | |
| 52 #else | |
| 53 #define MAYBE_TriggerEvent TriggerEvent | |
| 54 #endif | |
| 55 | |
| 49 // 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 |
| 50 // if it successfully sees the 'friend' receive the message. | 57 // if it successfully sees the 'friend' receive the message. |
| 51 // TODO(pmarch): Enable this test once modifications to Blink are done, | 58 IN_PROC_BROWSER_TEST_F(ActivityLogApiTest, MAYBE_TriggerEvent) { |
| 52 // crbug.com/388287. | |
| 53 IN_PROC_BROWSER_TEST_F(ActivityLogApiTest, DISABLED_TriggerEvent) { | |
| 54 ActivityLog::GetInstance(profile())->SetWatchdogAppActiveForTesting(true); | 59 ActivityLog::GetInstance(profile())->SetWatchdogAppActiveForTesting(true); |
| 55 | 60 |
| 56 host_resolver()->AddRule("*", "127.0.0.1"); | 61 host_resolver()->AddRule("*", "127.0.0.1"); |
| 57 ASSERT_TRUE(StartEmbeddedTestServer()); | 62 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 58 embedded_test_server()->RegisterRequestHandler( | 63 embedded_test_server()->RegisterRequestHandler( |
| 59 base::Bind(&ActivityLogApiTest::HandleRequest, base::Unretained(this))); | 64 base::Bind(&ActivityLogApiTest::HandleRequest, base::Unretained(this))); |
| 60 | 65 |
| 61 const Extension* friend_extension = LoadExtensionIncognito( | 66 const Extension* friend_extension = LoadExtensionIncognito( |
| 62 test_data_dir_.AppendASCII("activity_log_private/friend")); | 67 test_data_dir_.AppendASCII("activity_log_private/friend")); |
| 63 ASSERT_TRUE(friend_extension); | 68 ASSERT_TRUE(friend_extension); |
| 64 ASSERT_TRUE(RunExtensionTest("activity_log_private/test")); | 69 ASSERT_TRUE(RunExtensionTest("activity_log_private/test")); |
| 65 ActivityLog::GetInstance(profile())->SetWatchdogAppActiveForTesting(false); | 70 ActivityLog::GetInstance(profile())->SetWatchdogAppActiveForTesting(false); |
| 66 } | 71 } |
| 67 | 72 |
| 68 } // namespace extensions | 73 } // namespace extensions |
| 69 | 74 |
| OLD | NEW |