| OLD | NEW |
| 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 | 679 |
| 680 // Start on a different URL to force a new renderer process. | 680 // Start on a different URL to force a new renderer process. |
| 681 Shell* new_shell = CreateBrowser(); | 681 Shell* new_shell = CreateBrowser(); |
| 682 NavigateToURL(new_shell, GURL(url::kAboutBlankURL)); | 682 NavigateToURL(new_shell, GURL(url::kAboutBlankURL)); |
| 683 NavigateAndWaitForTitle(new_shell, "version_change_blocked.html", "#tab2", | 683 NavigateAndWaitForTitle(new_shell, "version_change_blocked.html", "#tab2", |
| 684 "setVersion(3) blocked"); | 684 "setVersion(3) blocked"); |
| 685 | 685 |
| 686 base::string16 expected_title16(ASCIIToUTF16("setVersion(3) complete")); | 686 base::string16 expected_title16(ASCIIToUTF16("setVersion(3) complete")); |
| 687 TitleWatcher title_watcher(new_shell->web_contents(), expected_title16); | 687 TitleWatcher title_watcher(new_shell->web_contents(), expected_title16); |
| 688 | 688 |
| 689 base::KillProcess( | 689 shell()->web_contents()->GetRenderProcessHost()->Shutdown(0, true); |
| 690 shell()->web_contents()->GetRenderProcessHost()->GetHandle(), 0, true); | |
| 691 shell()->Close(); | 690 shell()->Close(); |
| 692 | 691 |
| 693 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); | 692 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); |
| 694 } | 693 } |
| 695 | 694 |
| 696 // Verify that a "close" event is fired at database connections when | 695 // Verify that a "close" event is fired at database connections when |
| 697 // the backing store is deleted. | 696 // the backing store is deleted. |
| 698 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, ForceCloseEventTest) { | 697 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, ForceCloseEventTest) { |
| 699 NavigateAndWaitForTitle(shell(), "force_close_event.html", NULL, | 698 NavigateAndWaitForTitle(shell(), "force_close_event.html", NULL, |
| 700 "connection ready"); | 699 "connection ready"); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 717 command_line->AppendSwitch(switches::kSingleProcess); | 716 command_line->AppendSwitch(switches::kSingleProcess); |
| 718 } | 717 } |
| 719 }; | 718 }; |
| 720 | 719 |
| 721 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, | 720 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, |
| 722 RenderThreadShutdownTest) { | 721 RenderThreadShutdownTest) { |
| 723 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); | 722 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); |
| 724 } | 723 } |
| 725 | 724 |
| 726 } // namespace content | 725 } // namespace content |
| OLD | NEW |