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

Side by Side Diff: chrome/browser/chrome_site_per_process_browsertest.cc

Issue 1409163006: Migrating tests to use EmbeddedTestServer (/chrome/browser misc) (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 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" 8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
(...skipping 14 matching lines...) Expand all
25 public: 25 public:
26 ChromeSitePerProcessTest() {} 26 ChromeSitePerProcessTest() {}
27 ~ChromeSitePerProcessTest() override {} 27 ~ChromeSitePerProcessTest() override {}
28 28
29 void SetUpCommandLine(base::CommandLine* command_line) override { 29 void SetUpCommandLine(base::CommandLine* command_line) override {
30 content::IsolateAllSitesForTesting(command_line); 30 content::IsolateAllSitesForTesting(command_line);
31 } 31 }
32 32
33 void SetUpOnMainThread() override { 33 void SetUpOnMainThread() override {
34 host_resolver()->AddRule("*", "127.0.0.1"); 34 host_resolver()->AddRule("*", "127.0.0.1");
35 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 35 ASSERT_TRUE(embedded_test_server()->Start());
36 content::SetupCrossSiteRedirector(embedded_test_server()); 36 content::SetupCrossSiteRedirector(embedded_test_server());
37 } 37 }
38 38
39 private: 39 private:
40 DISALLOW_COPY_AND_ASSIGN(ChromeSitePerProcessTest); 40 DISALLOW_COPY_AND_ASSIGN(ChromeSitePerProcessTest);
41 }; 41 };
42 42
43 // Verify that browser shutdown path works correctly when there's a 43 // Verify that browser shutdown path works correctly when there's a
44 // RenderFrameProxyHost for a child frame. 44 // RenderFrameProxyHost for a child frame.
45 IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessTest, RenderFrameProxyHostShutdown) { 45 IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessTest, RenderFrameProxyHostShutdown) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 content::DOMMessageQueue msg_queue; 113 content::DOMMessageQueue msg_queue;
114 EXPECT_TRUE(NavigateIframeToURL(active_web_contents, "test", frame_url)); 114 EXPECT_TRUE(NavigateIframeToURL(active_web_contents, "test", frame_url));
115 115
116 // Ensure the page finishes loading without crashing. 116 // Ensure the page finishes loading without crashing.
117 std::string status; 117 std::string status;
118 while (msg_queue.WaitForMessage(&status)) { 118 while (msg_queue.WaitForMessage(&status)) {
119 if (status == "\"DONE\"") 119 if (status == "\"DONE\"")
120 break; 120 break;
121 } 121 }
122 } 122 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_service_worker_browsertest.cc ('k') | chrome/browser/chrome_switches_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698