| 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 "app/app_switches.h" | 7 #include "app/app_switches.h" |
| 8 #include "app/message_box_flags.h" | 8 #include "app/message_box_flags.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 880 CreateFunctor(loop, &TimedMessageLoopRunner::QuitAfter, ms)) | 880 CreateFunctor(loop, &TimedMessageLoopRunner::QuitAfter, ms)) |
| 881 | 881 |
| 882 template <typename T> T** ReceivePointer(scoped_ptr<T>& p) { // NOLINT | 882 template <typename T> T** ReceivePointer(scoped_ptr<T>& p) { // NOLINT |
| 883 return reinterpret_cast<T**>(&p); | 883 return reinterpret_cast<T**>(&p); |
| 884 } | 884 } |
| 885 | 885 |
| 886 template <typename T> T** ReceivePointer(scoped_refptr<T>& p) { // NOLINT | 886 template <typename T> T** ReceivePointer(scoped_refptr<T>& p) { // NOLINT |
| 887 return reinterpret_cast<T**>(&p); | 887 return reinterpret_cast<T**>(&p); |
| 888 } | 888 } |
| 889 | 889 |
| 890 ExternalTabUITest::ExternalTabUITest() : UITest(MessageLoop::TYPE_UI) { | 890 ExternalTabUITest::ExternalTabUITest() : UITest(MessageLoop::TYPE_UI) {} |
| 891 launcher_.reset(CreateProxyLauncher()); | |
| 892 } | |
| 893 | 891 |
| 894 // Replace the default automation proxy with our mock client. | 892 // Replace the default automation proxy with our mock client. |
| 895 ProxyLauncher* ExternalTabUITest::CreateProxyLauncher() { | 893 ProxyLauncher* ExternalTabUITest::CreateProxyLauncher() { |
| 896 return new ExternalTabUITestMockLauncher(&mock_); | 894 return new ExternalTabUITestMockLauncher(&mock_); |
| 897 } | 895 } |
| 898 | 896 |
| 899 // Create with specifying a url | 897 // Create with specifying a url |
| 900 // Flaky, http://crbug.com/32293 | 898 // Flaky, http://crbug.com/32293 |
| 901 TEST_F(ExternalTabUITest, FLAKY_CreateExternalTab1) { | 899 TEST_F(ExternalTabUITest, FLAKY_CreateExternalTab1) { |
| 902 scoped_refptr<TabProxy> tab; | 900 scoped_refptr<TabProxy> tab; |
| (...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1747 int diff_pixels_count = 0; | 1745 int diff_pixels_count = 0; |
| 1748 for (int x = 0; x < img_size.width(); ++x) { | 1746 for (int x = 0; x < img_size.width(); ++x) { |
| 1749 for (int y = 0; y < img_size.height(); ++y) { | 1747 for (int y = 0; y < img_size.height(); ++y) { |
| 1750 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) { | 1748 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) { |
| 1751 ++diff_pixels_count; | 1749 ++diff_pixels_count; |
| 1752 } | 1750 } |
| 1753 } | 1751 } |
| 1754 } | 1752 } |
| 1755 ASSERT_EQ(diff_pixels_count, 0); | 1753 ASSERT_EQ(diff_pixels_count, 0); |
| 1756 } | 1754 } |
| OLD | NEW |