Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: content/browser/service_worker/service_worker_version_unittest.cc

Issue 1259213002: Move Service Worker %2f path validation logic from browser into Blink (1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix remaining nits. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "content/browser/message_port_service.h" 7 #include "content/browser/message_port_service.h"
8 #include "content/browser/service_worker/embedded_worker_registry.h" 8 #include "content/browser/service_worker/embedded_worker_registry.h"
9 #include "content/browser/service_worker/embedded_worker_test_helper.h" 9 #include "content/browser/service_worker/embedded_worker_test_helper.h"
10 #include "content/browser/service_worker/service_worker_context_core.h" 10 #include "content/browser/service_worker/service_worker_context_core.h"
11 #include "content/browser/service_worker/service_worker_registration.h" 11 #include "content/browser/service_worker/service_worker_registration.h"
12 #include "content/browser/service_worker/service_worker_test_utils.h" 12 #include "content/browser/service_worker/service_worker_test_utils.h"
13 #include "content/browser/service_worker/service_worker_utils.h"
14 #include "content/browser/service_worker/service_worker_version.h" 13 #include "content/browser/service_worker/service_worker_version.h"
14 #include "content/common/service_worker/service_worker_utils.h"
15 #include "content/public/test/test_browser_thread_bundle.h" 15 #include "content/public/test/test_browser_thread_bundle.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 17
18 // IPC messages for testing --------------------------------------------------- 18 // IPC messages for testing ---------------------------------------------------
19 19
20 #define IPC_MESSAGE_IMPL 20 #define IPC_MESSAGE_IMPL
21 #include "ipc/ipc_message_macros.h" 21 #include "ipc/ipc_message_macros.h"
22 22
23 #define IPC_MESSAGE_START TestMsgStart 23 #define IPC_MESSAGE_START TestMsgStart
24 24
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 base::TimeTicks::Now() - 741 base::TimeTicks::Now() -
742 base::TimeDelta::FromMinutes( 742 base::TimeDelta::FromMinutes(
743 ServiceWorkerVersion::kStartWorkerTimeoutMinutes + 1); 743 ServiceWorkerVersion::kStartWorkerTimeoutMinutes + 1);
744 version_->timeout_timer_.user_task().Run(); 744 version_->timeout_timer_.user_task().Run();
745 base::RunLoop().RunUntilIdle(); 745 base::RunLoop().RunUntilIdle();
746 EXPECT_EQ(SERVICE_WORKER_ERROR_TIMEOUT, status); 746 EXPECT_EQ(SERVICE_WORKER_ERROR_TIMEOUT, status);
747 EXPECT_EQ(ServiceWorkerVersion::STOPPED, version_->running_status()); 747 EXPECT_EQ(ServiceWorkerVersion::STOPPED, version_->running_status());
748 } 748 }
749 749
750 } // namespace content 750 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698