| 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 "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 std::wstring jscript2 = CreateJSStringForDOMQuery(L"myspan"); | 631 std::wstring jscript2 = CreateJSStringForDOMQuery(L"myspan"); |
| 632 ASSERT_TRUE(tab->ExecuteAndExtractString(xpath2, jscript2, &actual)); | 632 ASSERT_TRUE(tab->ExecuteAndExtractString(xpath2, jscript2, &actual)); |
| 633 ASSERT_EQ(L"SPAN", actual); | 633 ASSERT_EQ(L"SPAN", actual); |
| 634 | 634 |
| 635 std::wstring xpath3 = L"/html/body/iframe\n/html/body/iframe"; | 635 std::wstring xpath3 = L"/html/body/iframe\n/html/body/iframe"; |
| 636 std::wstring jscript3 = CreateJSStringForDOMQuery(L"mydiv"); | 636 std::wstring jscript3 = CreateJSStringForDOMQuery(L"mydiv"); |
| 637 ASSERT_TRUE(tab->ExecuteAndExtractString(xpath3, jscript3, &actual)); | 637 ASSERT_TRUE(tab->ExecuteAndExtractString(xpath3, jscript3, &actual)); |
| 638 ASSERT_EQ(L"DIV", actual); | 638 ASSERT_EQ(L"DIV", actual); |
| 639 } | 639 } |
| 640 | 640 |
| 641 TEST_F(AutomationProxyTest, BlockedPopupTest) { | 641 // Flaky, http://crbug.com/70937 |
| 642 TEST_F(AutomationProxyTest, FLAKY_BlockedPopupTest) { |
| 642 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); | 643 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); |
| 643 ASSERT_TRUE(window.get()); | 644 ASSERT_TRUE(window.get()); |
| 644 | 645 |
| 645 scoped_refptr<TabProxy> tab(window->GetTab(0)); | 646 scoped_refptr<TabProxy> tab(window->GetTab(0)); |
| 646 ASSERT_TRUE(tab.get()); | 647 ASSERT_TRUE(tab.get()); |
| 647 | 648 |
| 648 FilePath filename(test_data_directory_); | 649 FilePath filename(test_data_directory_); |
| 649 filename = filename.AppendASCII("constrained_files"); | 650 filename = filename.AppendASCII("constrained_files"); |
| 650 filename = filename.AppendASCII("constrained_window.html"); | 651 filename = filename.AppendASCII("constrained_window.html"); |
| 651 | 652 |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1749 int diff_pixels_count = 0; | 1750 int diff_pixels_count = 0; |
| 1750 for (int x = 0; x < img_size.width(); ++x) { | 1751 for (int x = 0; x < img_size.width(); ++x) { |
| 1751 for (int y = 0; y < img_size.height(); ++y) { | 1752 for (int y = 0; y < img_size.height(); ++y) { |
| 1752 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) { | 1753 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) { |
| 1753 ++diff_pixels_count; | 1754 ++diff_pixels_count; |
| 1754 } | 1755 } |
| 1755 } | 1756 } |
| 1756 } | 1757 } |
| 1757 ASSERT_EQ(diff_pixels_count, 0); | 1758 ASSERT_EQ(diff_pixels_count, 0); |
| 1758 } | 1759 } |
| OLD | NEW |