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

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: 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 "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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 ZoomLevelChangeObserver observer(browser()->profile()); 446 ZoomLevelChangeObserver observer(browser()->profile());
447 447
448 web_contents->SetPageScale(1.5); 448 web_contents->SetPageScale(1.5);
449 observer.BlockUntilZoomLevelForHostHasChanged(test_host); 449 observer.BlockUntilZoomLevelForHostHasChanged(test_host);
450 EXPECT_FALSE(content::HostZoomMap::PageScaleFactorIsOne(web_contents)); 450 EXPECT_FALSE(content::HostZoomMap::PageScaleFactorIsOne(web_contents));
451 451
452 web_contents->SetPageScale(1.f); 452 web_contents->SetPageScale(1.f);
453 observer.BlockUntilZoomLevelForHostHasChanged(test_host); 453 observer.BlockUntilZoomLevelForHostHasChanged(test_host);
454 EXPECT_TRUE(content::HostZoomMap::PageScaleFactorIsOne(web_contents)); 454 EXPECT_TRUE(content::HostZoomMap::PageScaleFactorIsOne(web_contents));
455 } 455 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/printing_layout_browsertest.cc ('k') | chrome/browser/profiles/profile_window_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698