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

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

Issue 385103002: Enables temporary disabled tests in service_worker_browsertest.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/browser/fileapi/chrome_blob_storage_context.h" 10 #include "content/browser/fileapi/chrome_blob_storage_context.h"
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 ActivateTestHelper("/service_worker/worker_activate_rejected.js", 594 ActivateTestHelper("/service_worker/worker_activate_rejected.js",
595 SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED); 595 SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED);
596 } 596 }
597 597
598 IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, 598 IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest,
599 InstallWithWaitUntil_Rejected) { 599 InstallWithWaitUntil_Rejected) {
600 InstallTestHelper("/service_worker/worker_install_rejected.js", 600 InstallTestHelper("/service_worker/worker_install_rejected.js",
601 SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED); 601 SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED);
602 } 602 }
603 603
604 IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, 604 IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, FetchEvent_Response) {
605 DISABLED_FetchEvent_Response) {
606 ServiceWorkerFetchEventResult result; 605 ServiceWorkerFetchEventResult result;
607 ServiceWorkerResponse response; 606 ServiceWorkerResponse response;
608 scoped_ptr<webkit_blob::BlobDataHandle> blob_data_handle; 607 scoped_ptr<webkit_blob::BlobDataHandle> blob_data_handle;
609 FetchTestHelper("/service_worker/fetch_event.js", 608 FetchTestHelper("/service_worker/fetch_event.js",
610 &result, &response, &blob_data_handle); 609 &result, &response, &blob_data_handle);
611 ASSERT_EQ(SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE, result); 610 ASSERT_EQ(SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE, result);
612 EXPECT_EQ(301, response.status_code); 611 EXPECT_EQ(301, response.status_code);
613 EXPECT_EQ("Moved Permanently", response.status_text); 612 EXPECT_EQ("Moved Permanently", response.status_text);
614 std::map<std::string, std::string> expected_headers; 613 std::map<std::string, std::string> expected_headers;
615 expected_headers["content-language"] = "fi"; 614 expected_headers["content-language"] = "fi";
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 sync_run_loop.QuitClosure(), 663 sync_run_loop.QuitClosure(),
665 &status)); 664 &status));
666 sync_run_loop.Run(); 665 sync_run_loop.Run();
667 ASSERT_EQ(SERVICE_WORKER_OK, status); 666 ASSERT_EQ(SERVICE_WORKER_OK, status);
668 667
669 // Should 200 after sync event. 668 // Should 200 after sync event.
670 FetchOnRegisteredWorker(&result, &response, &blob_data_handle); 669 FetchOnRegisteredWorker(&result, &response, &blob_data_handle);
671 EXPECT_EQ(200, response.status_code); 670 EXPECT_EQ(200, response.status_code);
672 } 671 }
673 672
674 IN_PROC_BROWSER_TEST_F(ServiceWorkerBrowserTest, DISABLED_Reload) { 673 IN_PROC_BROWSER_TEST_F(ServiceWorkerBrowserTest, Reload) {
675 const std::string kPageUrl = "/service_worker/reload.html"; 674 const std::string kPageUrl = "/service_worker/reload.html";
676 const std::string kWorkerUrl = "/service_worker/fetch_event_reload.js"; 675 const std::string kWorkerUrl = "/service_worker/fetch_event_reload.js";
677 { 676 {
678 scoped_refptr<WorkerActivatedObserver> observer = 677 scoped_refptr<WorkerActivatedObserver> observer =
679 new WorkerActivatedObserver(wrapper()); 678 new WorkerActivatedObserver(wrapper());
680 observer->Init(); 679 observer->Init();
681 public_context()->RegisterServiceWorker( 680 public_context()->RegisterServiceWorker(
682 embedded_test_server()->GetURL(kPageUrl), 681 embedded_test_server()->GetURL(kPageUrl),
683 embedded_test_server()->GetURL(kWorkerUrl), 682 embedded_test_server()->GetURL(kWorkerUrl),
684 base::Bind(&ExpectResultAndRun, true, base::Bind(&base::DoNothing))); 683 base::Bind(&ExpectResultAndRun, true, base::Bind(&base::DoNothing)));
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO, 821 base::Bind(&ServiceWorkerBlackBoxBrowserTest::FindRegistrationOnIO,
823 this, 822 this,
824 embedded_test_server()->GetURL("/service_worker/empty.html"), 823 embedded_test_server()->GetURL("/service_worker/empty.html"),
825 &status, 824 &status,
826 &script_url)); 825 &script_url));
827 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status); 826 EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, status);
828 } 827 }
829 } 828 }
830 829
831 } // namespace content 830 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698