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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 AutomationProxyTest() { | 90 AutomationProxyTest() { |
91 dom_automation_enabled_ = true; | 91 dom_automation_enabled_ = true; |
92 launch_arguments_.AppendSwitchASCII(switches::kLang, "en-US"); | 92 launch_arguments_.AppendSwitchASCII(switches::kLang, "en-US"); |
93 } | 93 } |
94 }; | 94 }; |
95 | 95 |
96 TEST_F(AutomationProxyTest, GetBrowserWindowCount) { | 96 TEST_F(AutomationProxyTest, GetBrowserWindowCount) { |
97 int window_count = 0; | 97 int window_count = 0; |
98 EXPECT_TRUE(automation()->GetBrowserWindowCount(&window_count)); | 98 EXPECT_TRUE(automation()->GetBrowserWindowCount(&window_count)); |
99 EXPECT_EQ(1, window_count); | 99 EXPECT_EQ(1, window_count); |
100 #ifdef NDEBUG | 100 #if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON) |
101 ASSERT_FALSE(automation()->GetBrowserWindowCount(NULL)); | 101 ASSERT_FALSE(automation()->GetBrowserWindowCount(NULL)); |
102 #endif | 102 #endif |
103 } | 103 } |
104 | 104 |
105 TEST_F(AutomationProxyTest, GetBrowserWindow) { | 105 TEST_F(AutomationProxyTest, GetBrowserWindow) { |
106 { | 106 { |
107 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); | 107 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); |
108 ASSERT_TRUE(window.get()); | 108 ASSERT_TRUE(window.get()); |
109 } | 109 } |
110 | 110 |
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1659 int diff_pixels_count = 0; | 1659 int diff_pixels_count = 0; |
1660 for (int x = 0; x < img_size.width(); ++x) { | 1660 for (int x = 0; x < img_size.width(); ++x) { |
1661 for (int y = 0; y < img_size.height(); ++y) { | 1661 for (int y = 0; y < img_size.height(); ++y) { |
1662 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) { | 1662 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) { |
1663 ++diff_pixels_count; | 1663 ++diff_pixels_count; |
1664 } | 1664 } |
1665 } | 1665 } |
1666 } | 1666 } |
1667 ASSERT_EQ(diff_pixels_count, 0); | 1667 ASSERT_EQ(diff_pixels_count, 0); |
1668 } | 1668 } |
OLD | NEW |