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

Side by Side Diff: chrome/browser/net/client_hints_unittest.cc

Issue 11970002: Added Client-Hints. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Changed Client Hint names to match spec Created 7 years, 10 months 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/net/client_hints.h"
6
7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 class ClientHintsTest : public testing::Test {
12 protected:
13 ClientHintsTest() {}
14
15 virtual void SetUp() OVERRIDE {
16 client_hints_ = new ClientHints();
17 client_hints_->UpdateScreenInfo(100, 200, 1.567);
18 }
19
20 virtual void TearDown() OVERRIDE {
21 client_hints_ = NULL;
22 }
23
24 scoped_refptr<ClientHints> client_hints_;
25 };
26
27 TEST_F(ClientHintsTest, HintsWellFormatted) {
28 std::string hint = client_hints_->GetScreenInfoHints();
29 EXPECT_EQ("dh=200, dw=100, dpr=1.57", hint);
30 }
31
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698