OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/service_worker/service_worker_version.h" | 5 #include "content/browser/service_worker/service_worker_version.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <tuple> | 8 #include <tuple> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/test/histogram_tester.h" | 13 #include "base/test/histogram_tester.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "content/browser/service_worker/embedded_worker_registry.h" | 15 #include "content/browser/service_worker/embedded_worker_registry.h" |
16 #include "content/browser/service_worker/embedded_worker_status.h" | 16 #include "content/browser/service_worker/embedded_worker_status.h" |
17 #include "content/browser/service_worker/embedded_worker_test_helper.h" | 17 #include "content/browser/service_worker/embedded_worker_test_helper.h" |
18 #include "content/browser/service_worker/service_worker_context_core.h" | 18 #include "content/browser/service_worker/service_worker_context_core.h" |
19 #include "content/browser/service_worker/service_worker_registration.h" | 19 #include "content/browser/service_worker/service_worker_registration.h" |
20 #include "content/browser/service_worker/service_worker_test_utils.h" | 20 #include "content/browser/service_worker/service_worker_test_utils.h" |
21 #include "content/common/service_worker/service_worker_utils.h" | 21 #include "content/common/service_worker/service_worker_utils.h" |
22 #include "content/public/test/mock_render_process_host.h" | 22 #include "content/public/test/mock_render_process_host.h" |
23 #include "content/public/test/test_browser_thread_bundle.h" | 23 #include "content/public/test/test_browser_thread_bundle.h" |
24 #include "content/public/test/test_service.mojom.h" | 24 #include "content/public/test/test_service.mojom.h" |
25 #include "content/public/test/test_utils.h" | 25 #include "content/public/test/test_utils.h" |
26 #include "mojo/public/cpp/bindings/strong_binding.h" | 26 #include "mojo/public/cpp/bindings/strong_binding.h" |
27 #include "services/shell/public/cpp/interface_registry.h" | 27 #include "services/service_manager/public/cpp/interface_registry.h" |
28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
29 | 29 |
30 // IPC messages for testing --------------------------------------------------- | 30 // IPC messages for testing --------------------------------------------------- |
31 | 31 |
32 #define IPC_MESSAGE_IMPL | 32 #define IPC_MESSAGE_IMPL |
33 #include "ipc/ipc_message_macros.h" | 33 #include "ipc/ipc_message_macros.h" |
34 | 34 |
35 #define IPC_MESSAGE_START TestMsgStart | 35 #define IPC_MESSAGE_START TestMsgStart |
36 | 36 |
37 IPC_MESSAGE_CONTROL0(TestMsg_Message) | 37 IPC_MESSAGE_CONTROL0(TestMsg_Message) |
(...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1739 histogram_tester_.ExpectTotalCount(kLinkMouseDown, 1); | 1739 histogram_tester_.ExpectTotalCount(kLinkMouseDown, 1); |
1740 histogram_tester_.ExpectTotalCount(kLinkTapDown, 0); | 1740 histogram_tester_.ExpectTotalCount(kLinkTapDown, 0); |
1741 EXPECT_EQ(SERVICE_WORKER_OK, status); | 1741 EXPECT_EQ(SERVICE_WORKER_OK, status); |
1742 StopWorker(); | 1742 StopWorker(); |
1743 // The UMA for kLinkMouseDown must be recorded when the worker stopped. | 1743 // The UMA for kLinkMouseDown must be recorded when the worker stopped. |
1744 histogram_tester_.ExpectTotalCount(kLinkMouseDown, 1); | 1744 histogram_tester_.ExpectTotalCount(kLinkMouseDown, 1); |
1745 histogram_tester_.ExpectTotalCount(kLinkTapDown, 1); | 1745 histogram_tester_.ExpectTotalCount(kLinkTapDown, 1); |
1746 } | 1746 } |
1747 | 1747 |
1748 } // namespace content | 1748 } // namespace content |
OLD | NEW |