Index: chrome/browser/extensions/api/system_info_display/system_info_display_apitest.cc |
diff --git a/chrome/browser/extensions/api/system_info_display/system_info_display_apitest.cc b/chrome/browser/extensions/api/system_info_display/system_info_display_apitest.cc |
index 35107f79bf31d7cd9b9ded7cae098ce650ec9e9e..fcb0e2a9a1d9cc4ac142112cc8dc44e6b4f76905 100644 |
--- a/chrome/browser/extensions/api/system_info_display/system_info_display_apitest.cc |
+++ b/chrome/browser/extensions/api/system_info_display/system_info_display_apitest.cc |
@@ -3,6 +3,7 @@ |
// found in the LICENSE file. |
#include "base/command_line.h" |
#include "base/message_loop.h" |
+#include "base/strings/string_number_conversions.h" |
#include "chrome/browser/extensions/api/system_info_display/display_info_provider.h" |
#include "chrome/browser/extensions/extension_apitest.h" |
#include "chrome/browser/extensions/extension_test_message_listener.h" |
@@ -19,17 +20,26 @@ class MockDisplayInfoProvider : public DisplayInfoProvider { |
info->clear(); |
for (int i = 0; i < 2; i++) { |
Greg Spencer (Chromium)
2013/06/10 19:17:42
Don't you want to go to i < 4 to catch all the rot
tbarzic
2013/06/10 19:53:51
done, but I don't think that this adds any test co
|
linked_ptr<DisplayUnitInfo> unit(new DisplayUnitInfo()); |
- unit->id = "DISPLAY"; |
- unit->name = "DISPLAY NAME"; |
+ unit->id = base::IntToString(i); |
+ unit->name = "DISPLAY NAME FOR " + unit->id; |
+ if (i == 1) |
+ unit->mirroring_source_id = "0"; |
unit->is_primary = i == 0 ? true : false; |
unit->is_internal = i == 0 ? true : false; |
unit->is_enabled = true; |
+ unit->rotation = 90 * i; |
unit->dpi_x = 96.0; |
unit->dpi_y = 96.0; |
unit->bounds.left = 0; |
unit->bounds.top = 0; |
unit->bounds.width = 1280; |
unit->bounds.height = 720; |
+ if (i == 0) { |
+ unit->visible_area.left = 20; |
+ unit->visible_area.top = 40; |
+ unit->visible_area.width = 1280; |
+ unit->visible_area.height = 720; |
+ } |
unit->work_area.left = 0; |
unit->work_area.top = 0; |
unit->work_area.width = 960; |