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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 } | 521 } |
522 | 522 |
523 void TimeoutWorkerOnIOThread() { | 523 void TimeoutWorkerOnIOThread() { |
524 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 524 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
525 version_->SimulatePingTimeoutForTesting(); | 525 version_->SimulatePingTimeoutForTesting(); |
526 } | 526 } |
527 | 527 |
528 void AddControlleeOnIOThread() { | 528 void AddControlleeOnIOThread() { |
529 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 529 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
530 std::unique_ptr<ServiceWorkerProviderHost> host( | 530 std::unique_ptr<ServiceWorkerProviderHost> host( |
531 new ServiceWorkerProviderHost(33 /* dummy render process id */, | 531 new ServiceWorkerProviderHost( |
532 MSG_ROUTING_NONE /* render_frame_id */, | 532 33 /* dummy render process id */, |
533 1 /* dummy provider_id */, | 533 MSG_ROUTING_NONE /* render_frame_id */, 1 /* dummy provider_id */, |
534 SERVICE_WORKER_PROVIDER_FOR_WINDOW, | 534 SERVICE_WORKER_PROVIDER_FOR_WINDOW, |
535 wrapper()->context()->AsWeakPtr(), NULL)); | 535 ServiceWorkerProviderHost::FrameSecurityLevel::SECURE, |
| 536 wrapper()->context()->AsWeakPtr(), NULL)); |
536 host->SetDocumentUrl( | 537 host->SetDocumentUrl( |
537 embedded_test_server()->GetURL("/service_worker/host")); | 538 embedded_test_server()->GetURL("/service_worker/host")); |
538 host->AssociateRegistration(registration_.get(), | 539 host->AssociateRegistration(registration_.get(), |
539 false /* notify_controllerchange */); | 540 false /* notify_controllerchange */); |
540 wrapper()->context()->AddProviderHost(std::move(host)); | 541 wrapper()->context()->AddProviderHost(std::move(host)); |
541 } | 542 } |
542 | 543 |
543 void AddWaitingWorkerOnIOThread(const std::string& worker_url) { | 544 void AddWaitingWorkerOnIOThread(const std::string& worker_url) { |
544 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 545 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
545 scoped_refptr<ServiceWorkerVersion> waiting_version( | 546 scoped_refptr<ServiceWorkerVersion> waiting_version( |
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1834 NavigateToTestPage(); | 1835 NavigateToTestPage(); |
1835 // The V8 code cache must be stored to the CacheStorage which must be bigger | 1836 // The V8 code cache must be stored to the CacheStorage which must be bigger |
1836 // than 12 byte. | 1837 // than 12 byte. |
1837 EXPECT_GT(GetSideDataSize(), kV8CacheTimeStampDataSize); | 1838 EXPECT_GT(GetSideDataSize(), kV8CacheTimeStampDataSize); |
1838 | 1839 |
1839 NavigateToTestPage(); | 1840 NavigateToTestPage(); |
1840 EXPECT_GT(GetSideDataSize(), kV8CacheTimeStampDataSize); | 1841 EXPECT_GT(GetSideDataSize(), kV8CacheTimeStampDataSize); |
1841 } | 1842 } |
1842 | 1843 |
1843 } // namespace content | 1844 } // namespace content |
OLD | NEW |