| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/gtk/omnibox/omnibox_popup_view_gtk.h" | 5 #include "chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete.h" | 10 #include "chrome/browser/autocomplete/autocomplete.h" |
| 11 #include "chrome/browser/autocomplete/autocomplete_match.h" | 11 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| 12 #include "chrome/browser/ui/gtk/gtk_util.h" | 12 #include "ui/base/gtk/gtk_hig_constants.h" |
| 13 #include "testing/platform_test.h" | 13 #include "testing/platform_test.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 const float kLargeWidth = 10000; | 17 const float kLargeWidth = 10000; |
| 18 | 18 |
| 19 const GdkColor kContentTextColor = GDK_COLOR_RGB(0x00, 0x00, 0x00); | 19 const GdkColor kContentTextColor = GDK_COLOR_RGB(0x00, 0x00, 0x00); |
| 20 const GdkColor kDimContentTextColor = GDK_COLOR_RGB(0x80, 0x80, 0x80); | 20 const GdkColor kDimContentTextColor = GDK_COLOR_RGB(0x80, 0x80, 0x80); |
| 21 const GdkColor kURLTextColor = GDK_COLOR_RGB(0x00, 0x88, 0x00); | 21 const GdkColor kURLTextColor = GDK_COLOR_RGB(0x00, 0x88, 0x00); |
| 22 | 22 |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 &kDimContentTextColor, | 365 &kDimContentTextColor, |
| 366 &kURLTextColor, | 366 &kURLTextColor, |
| 367 std::string()); | 367 std::string()); |
| 368 | 368 |
| 369 // One color for the entire string, and it's not the one we passed | 369 // One color for the entire string, and it's not the one we passed |
| 370 // in. | 370 // in. |
| 371 EXPECT_EQ(kContents.length(), RunLengthForAttrType(0U, kContents.length(), | 371 EXPECT_EQ(kContents.length(), RunLengthForAttrType(0U, kContents.length(), |
| 372 PANGO_ATTR_FOREGROUND)); | 372 PANGO_ATTR_FOREGROUND)); |
| 373 EXPECT_TRUE(RunHasColor(0U, kContents.length(), kURLTextColor)); | 373 EXPECT_TRUE(RunHasColor(0U, kContents.length(), kURLTextColor)); |
| 374 } | 374 } |
| OLD | NEW |