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

Side by Side Diff: chrome/browser/extensions/api/system_display/system_display_apitest.cc

Issue 507783003: Add GetActiveScreen to DisplayInfoProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/extensions/api/system_display/system_display_api.h" 5 #include "chrome/browser/extensions/api/system_display/system_display_api.h"
6 6
7 #include "base/debug/leak_annotations.h" 7 #include "base/debug/leak_annotations.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "chrome/browser/extensions/api/system_display/display_info_provider.h" 9 #include "chrome/browser/extensions/api/system_display/display_info_provider.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 const std::string& display_id, 124 const std::string& display_id,
125 const api::system_display::DisplayProperties& params, 125 const api::system_display::DisplayProperties& params,
126 std::string* error) OVERRIDE { 126 std::string* error) OVERRIDE {
127 // Should get called only once per test case. 127 // Should get called only once per test case.
128 EXPECT_FALSE(set_info_value_); 128 EXPECT_FALSE(set_info_value_);
129 set_info_value_ = params.ToValue(); 129 set_info_value_ = params.ToValue();
130 set_info_display_id_ = display_id; 130 set_info_display_id_ = display_id;
131 return true; 131 return true;
132 } 132 }
133 133
134 virtual gfx::Screen* GetActiveScreen() OVERRIDE { return NULL; }
135
134 scoped_ptr<base::DictionaryValue> GetSetInfoValue() { 136 scoped_ptr<base::DictionaryValue> GetSetInfoValue() {
135 return set_info_value_.Pass(); 137 return set_info_value_.Pass();
136 } 138 }
137 139
138 std::string GetSetInfoDisplayId() const { 140 std::string GetSetInfoDisplayId() const {
139 return set_info_display_id_; 141 return set_info_display_id_;
140 } 142 }
141 143
142 private: 144 private:
143 // Update the content of the |unit| obtained for |display| using 145 // Update the content of the |unit| obtained for |display| using
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 EXPECT_EQ(1, utils::GetInteger(overscan, "left")); 300 EXPECT_EQ(1, utils::GetInteger(overscan, "left"));
299 EXPECT_EQ(2, utils::GetInteger(overscan, "top")); 301 EXPECT_EQ(2, utils::GetInteger(overscan, "top"));
300 EXPECT_EQ(3, utils::GetInteger(overscan, "right")); 302 EXPECT_EQ(3, utils::GetInteger(overscan, "right"));
301 EXPECT_EQ(4, utils::GetInteger(overscan, "bottom")); 303 EXPECT_EQ(4, utils::GetInteger(overscan, "bottom"));
302 304
303 EXPECT_EQ("display_id", provider_->GetSetInfoDisplayId()); 305 EXPECT_EQ("display_id", provider_->GetSetInfoDisplayId());
304 } 306 }
305 #endif // defined(OS_CHROMEOS) 307 #endif // defined(OS_CHROMEOS)
306 308
307 } // namespace extensions 309 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698