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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 ASSERT_TRUE(browser.get()); | 127 ASSERT_TRUE(browser.get()); |
128 scoped_refptr<WindowProxy> window(browser->GetWindow()); | 128 scoped_refptr<WindowProxy> window(browser->GetWindow()); |
129 ASSERT_TRUE(window.get()); | 129 ASSERT_TRUE(window.get()); |
130 | 130 |
131 scoped_refptr<TabProxy> tab1(browser->GetTab(0)); | 131 scoped_refptr<TabProxy> tab1(browser->GetTab(0)); |
132 ASSERT_TRUE(tab1.get()); | 132 ASSERT_TRUE(tab1.get()); |
133 GURL tab1_url; | 133 GURL tab1_url; |
134 ASSERT_TRUE(tab1->GetCurrentURL(&tab1_url)); | 134 ASSERT_TRUE(tab1->GetCurrentURL(&tab1_url)); |
135 | 135 |
136 // Add another tab so we can simulate dragging. | 136 // Add another tab so we can simulate dragging. |
137 ASSERT_TRUE(browser->AppendTab(GURL("about:"))); | 137 ASSERT_TRUE(browser->AppendTab(GURL(chrome::kChromeUIVersionURL))); |
138 | 138 |
139 scoped_refptr<TabProxy> tab2(browser->GetTab(1)); | 139 scoped_refptr<TabProxy> tab2(browser->GetTab(1)); |
140 ASSERT_TRUE(tab2.get()); | 140 ASSERT_TRUE(tab2.get()); |
141 GURL tab2_url; | 141 GURL tab2_url; |
142 ASSERT_TRUE(tab2->GetCurrentURL(&tab2_url)); | 142 ASSERT_TRUE(tab2->GetCurrentURL(&tab2_url)); |
143 | 143 |
144 EXPECT_NE(tab1_url.spec(), tab2_url.spec()); | 144 EXPECT_NE(tab1_url.spec(), tab2_url.spec()); |
145 | 145 |
146 gfx::Rect bounds; | 146 gfx::Rect bounds; |
147 ASSERT_TRUE(window->GetViewBounds(VIEW_ID_TAB_0, &bounds, false)); | 147 ASSERT_TRUE(window->GetViewBounds(VIEW_ID_TAB_0, &bounds, false)); |
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1650 int diff_pixels_count = 0; | 1650 int diff_pixels_count = 0; |
1651 for (int x = 0; x < img_size.width(); ++x) { | 1651 for (int x = 0; x < img_size.width(); ++x) { |
1652 for (int y = 0; y < img_size.height(); ++y) { | 1652 for (int y = 0; y < img_size.height(); ++y) { |
1653 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) { | 1653 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) { |
1654 ++diff_pixels_count; | 1654 ++diff_pixels_count; |
1655 } | 1655 } |
1656 } | 1656 } |
1657 } | 1657 } |
1658 ASSERT_EQ(diff_pixels_count, 0); | 1658 ASSERT_EQ(diff_pixels_count, 0); |
1659 } | 1659 } |
OLD | NEW |