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

Side by Side Diff: content/browser/indexed_db/indexed_db_browsertest.cc

Issue 1411073005: Migrating tests to use EmbeddedTestServer (/content) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/command_line.h" 6 #include "base/command_line.h"
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 #include "base/files/file_enumerator.h" 8 #include "base/files/file_enumerator.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 if (!base::ReadFileToString(resource_path, &file_contents)) 686 if (!base::ReadFileToString(resource_path, &file_contents))
687 return scoped_ptr<net::test_server::HttpResponse>(); 687 return scoped_ptr<net::test_server::HttpResponse>();
688 http_response->set_content(file_contents); 688 http_response->set_content(file_contents);
689 return http_response.Pass(); 689 return http_response.Pass();
690 } 690 }
691 691
692 } // namespace 692 } // namespace
693 693
694 IN_PROC_BROWSER_TEST_P(IndexedDBBrowserTest, OperationOnCorruptedOpenDatabase) { 694 IN_PROC_BROWSER_TEST_P(IndexedDBBrowserTest, OperationOnCorruptedOpenDatabase) {
695 ASSERT_TRUE(embedded_test_server()->Started() || 695 ASSERT_TRUE(embedded_test_server()->Started() ||
696 embedded_test_server()->InitializeAndWaitUntilReady()); 696 embedded_test_server()->Start());
697 const GURL& origin_url = embedded_test_server()->base_url(); 697 const GURL& origin_url = embedded_test_server()->base_url();
698 embedded_test_server()->RegisterRequestHandler( 698 embedded_test_server()->RegisterRequestHandler(
699 base::Bind(&CorruptDBRequestHandler, 699 base::Bind(&CorruptDBRequestHandler,
700 base::Unretained(GetContext()), 700 base::Unretained(GetContext()),
701 origin_url, 701 origin_url,
702 s_corrupt_db_test_prefix, 702 s_corrupt_db_test_prefix,
703 this)); 703 this));
704 704
705 std::string test_file = s_corrupt_db_test_prefix + 705 std::string test_file = s_corrupt_db_test_prefix +
706 "corrupted_open_db_detection.html#" + GetParam(); 706 "corrupted_open_db_detection.html#" + GetParam();
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 command_line->AppendSwitch(switches::kSingleProcess); 835 command_line->AppendSwitch(switches::kSingleProcess);
836 } 836 }
837 }; 837 };
838 838
839 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, 839 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess,
840 RenderThreadShutdownTest) { 840 RenderThreadShutdownTest) {
841 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); 841 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html"));
842 } 842 }
843 843
844 } // namespace content 844 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698