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

Side by Side Diff: chrome/browser/profiles/host_zoom_map_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: Fix rebase bug. 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 "content/public/browser/host_zoom_map.h" 5 #include "content/public/browser/host_zoom_map.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 private: 134 private:
135 scoped_ptr<net::test_server::HttpResponse> HandleRequest( 135 scoped_ptr<net::test_server::HttpResponse> HandleRequest(
136 const net::test_server::HttpRequest& request) { 136 const net::test_server::HttpRequest& request) {
137 return scoped_ptr<net::test_server::HttpResponse>( 137 return scoped_ptr<net::test_server::HttpResponse>(
138 new net::test_server::BasicHttpResponse); 138 new net::test_server::BasicHttpResponse);
139 } 139 }
140 140
141 // BrowserTestBase: 141 // BrowserTestBase:
142 void SetUpOnMainThread() override { 142 void SetUpOnMainThread() override {
143 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 143 ASSERT_TRUE(embedded_test_server()->Start());
144 embedded_test_server()->RegisterRequestHandler(base::Bind( 144 embedded_test_server()->RegisterRequestHandler(base::Bind(
145 &HostZoomMapBrowserTest::HandleRequest, base::Unretained(this))); 145 &HostZoomMapBrowserTest::HandleRequest, base::Unretained(this)));
146 host_resolver()->AddRule("*", "127.0.0.1"); 146 host_resolver()->AddRule("*", "127.0.0.1");
147 } 147 }
148 148
149 DISALLOW_COPY_AND_ASSIGN(HostZoomMapBrowserTest); 149 DISALLOW_COPY_AND_ASSIGN(HostZoomMapBrowserTest);
150 }; 150 };
151 151
152 #define PARTITION_KEY_PLACEHOLDER "NNN" 152 #define PARTITION_KEY_PLACEHOLDER "NNN"
153 153
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 HostZoomMap::GetDefaultForBrowserContext(child_profile); 425 HostZoomMap::GetDefaultForBrowserContext(child_profile);
426 ASSERT_TRUE(parent_host_zoom_map); 426 ASSERT_TRUE(parent_host_zoom_map);
427 ASSERT_TRUE(child_host_zoom_map); 427 ASSERT_TRUE(child_host_zoom_map);
428 EXPECT_NE(parent_host_zoom_map, child_host_zoom_map); 428 EXPECT_NE(parent_host_zoom_map, child_host_zoom_map);
429 EXPECT_NE(new_default_zoom_level, child_host_zoom_map->GetDefaultZoomLevel()); 429 EXPECT_NE(new_default_zoom_level, child_host_zoom_map->GetDefaultZoomLevel());
430 430
431 parent_profile->GetZoomLevelPrefs()->SetDefaultZoomLevelPref( 431 parent_profile->GetZoomLevelPrefs()->SetDefaultZoomLevelPref(
432 new_default_zoom_level); 432 new_default_zoom_level);
433 EXPECT_EQ(new_default_zoom_level, child_host_zoom_map->GetDefaultZoomLevel()); 433 EXPECT_EQ(new_default_zoom_level, child_host_zoom_map->GetDefaultZoomLevel());
434 } 434 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698