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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 } | 522 } |
523 | 523 |
524 void TimeoutWorkerOnIOThread() { | 524 void TimeoutWorkerOnIOThread() { |
525 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 525 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
526 version_->SimulatePingTimeoutForTesting(); | 526 version_->SimulatePingTimeoutForTesting(); |
527 } | 527 } |
528 | 528 |
529 void AddControlleeOnIOThread() { | 529 void AddControlleeOnIOThread() { |
530 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 530 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
531 std::unique_ptr<ServiceWorkerProviderHost> host( | 531 std::unique_ptr<ServiceWorkerProviderHost> host( |
532 new ServiceWorkerProviderHost(33 /* dummy render process id */, | 532 new ServiceWorkerProviderHost( |
533 MSG_ROUTING_NONE /* render_frame_id */, | 533 33 /* dummy render process id */, |
534 1 /* dummy provider_id */, | 534 MSG_ROUTING_NONE /* render_frame_id */, 1 /* dummy provider_id */, |
535 SERVICE_WORKER_PROVIDER_FOR_WINDOW, | 535 SERVICE_WORKER_PROVIDER_FOR_WINDOW, |
536 wrapper()->context()->AsWeakPtr(), NULL)); | 536 ServiceWorkerProviderHost::FrameSecurityLevel::SECURE, |
| 537 wrapper()->context()->AsWeakPtr(), NULL)); |
537 host->SetDocumentUrl( | 538 host->SetDocumentUrl( |
538 embedded_test_server()->GetURL("/service_worker/host")); | 539 embedded_test_server()->GetURL("/service_worker/host")); |
539 host->AssociateRegistration(registration_.get(), | 540 host->AssociateRegistration(registration_.get(), |
540 false /* notify_controllerchange */); | 541 false /* notify_controllerchange */); |
541 wrapper()->context()->AddProviderHost(std::move(host)); | 542 wrapper()->context()->AddProviderHost(std::move(host)); |
542 } | 543 } |
543 | 544 |
544 void AddWaitingWorkerOnIOThread(const std::string& worker_url) { | 545 void AddWaitingWorkerOnIOThread(const std::string& worker_url) { |
545 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 546 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
546 scoped_refptr<ServiceWorkerVersion> waiting_version( | 547 scoped_refptr<ServiceWorkerVersion> waiting_version( |
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1866 NavigateToTestPage(); | 1867 NavigateToTestPage(); |
1867 // The V8 code cache must be stored to the CacheStorage which must be bigger | 1868 // The V8 code cache must be stored to the CacheStorage which must be bigger |
1868 // than 12 byte. | 1869 // than 12 byte. |
1869 EXPECT_GT(GetSideDataSize(), kV8CacheTimeStampDataSize); | 1870 EXPECT_GT(GetSideDataSize(), kV8CacheTimeStampDataSize); |
1870 | 1871 |
1871 NavigateToTestPage(); | 1872 NavigateToTestPage(); |
1872 EXPECT_GT(GetSideDataSize(), kV8CacheTimeStampDataSize); | 1873 EXPECT_GT(GetSideDataSize(), kV8CacheTimeStampDataSize); |
1873 } | 1874 } |
1874 | 1875 |
1875 } // namespace content | 1876 } // namespace content |
OLD | NEW |