| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "app/message_box_flags.h" | 9 #include "app/message_box_flags.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 scoped_refptr<TabProxy> tab2(browser->GetTab(1)); | 101 scoped_refptr<TabProxy> tab2(browser->GetTab(1)); |
| 102 ASSERT_TRUE(tab2.get()); | 102 ASSERT_TRUE(tab2.get()); |
| 103 GURL tab2_url; | 103 GURL tab2_url; |
| 104 ASSERT_TRUE(tab2->GetCurrentURL(&tab2_url)); | 104 ASSERT_TRUE(tab2->GetCurrentURL(&tab2_url)); |
| 105 | 105 |
| 106 EXPECT_NE(tab1_url.spec(), tab2_url.spec()); | 106 EXPECT_NE(tab1_url.spec(), tab2_url.spec()); |
| 107 | 107 |
| 108 gfx::Rect bounds; | 108 gfx::Rect bounds; |
| 109 ASSERT_TRUE(window->GetViewBounds(VIEW_ID_TAB_0, &bounds, false)); | 109 ASSERT_TRUE(window->GetViewBounds(VIEW_ID_TAB_0, &bounds, false)); |
| 110 EXPECT_GT(bounds.x(), 0); | |
| 111 EXPECT_GT(bounds.width(), 0); | 110 EXPECT_GT(bounds.width(), 0); |
| 112 EXPECT_GT(bounds.height(), 0); | 111 EXPECT_GT(bounds.height(), 0); |
| 113 | 112 |
| 114 gfx::Rect bounds2; | 113 gfx::Rect bounds2; |
| 115 ASSERT_TRUE(window->GetViewBounds(VIEW_ID_TAB_LAST, &bounds2, false)); | 114 ASSERT_TRUE(window->GetViewBounds(VIEW_ID_TAB_LAST, &bounds2, false)); |
| 115 EXPECT_GT(bounds2.x(), 0); |
| 116 EXPECT_GT(bounds2.width(), 0); | 116 EXPECT_GT(bounds2.width(), 0); |
| 117 EXPECT_GT(bounds2.height(), 0); | 117 EXPECT_GT(bounds2.height(), 0); |
| 118 | 118 |
| 119 // The tab logic is mirrored in RTL locales, so what is to the right in | 119 // The tab logic is mirrored in RTL locales, so what is to the right in |
| 120 // LTR locales is now on the left with RTL ones. | 120 // LTR locales is now on the left with RTL ones. |
| 121 string16 browser_locale; | 121 string16 browser_locale; |
| 122 | 122 |
| 123 EXPECT_TRUE(automation()->GetBrowserLocale(&browser_locale)); | 123 EXPECT_TRUE(automation()->GetBrowserLocale(&browser_locale)); |
| 124 | 124 |
| 125 const std::string& locale_utf8 = UTF16ToUTF8(browser_locale); | 125 const std::string& locale_utf8 = UTF16ToUTF8(browser_locale); |
| (...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1504 | 1504 |
| 1505 // Allow some time for the popup to show up and close. | 1505 // Allow some time for the popup to show up and close. |
| 1506 PlatformThread::Sleep(sleep_timeout_ms()); | 1506 PlatformThread::Sleep(sleep_timeout_ms()); |
| 1507 | 1507 |
| 1508 std::wstring expected(L"string"); | 1508 std::wstring expected(L"string"); |
| 1509 std::wstring jscript = CreateJSString(L"\"" + expected + L"\""); | 1509 std::wstring jscript = CreateJSString(L"\"" + expected + L"\""); |
| 1510 std::wstring actual; | 1510 std::wstring actual; |
| 1511 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual)); | 1511 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", jscript, &actual)); |
| 1512 ASSERT_EQ(expected, actual); | 1512 ASSERT_EQ(expected, actual); |
| 1513 } | 1513 } |
| OLD | NEW |