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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/test/ui/ui_test.h" | 8 #include "chrome/test/ui/ui_test.h" |
9 #include "net/base/net_util.h" | 9 #include "net/base/net_util.h" |
10 | 10 |
11 class IFrameTest : public UITest { | 11 class IFrameTest : public UITest { |
12 protected: | 12 protected: |
13 void NavigateAndVerifyTitle(const char* url, const wchar_t* page_title) { | 13 void NavigateAndVerifyTitle(const char* url, const wchar_t* page_title) { |
14 FilePath test_file(test_data_directory_); | 14 FilePath test_file(test_data_directory_); |
15 test_file = test_file.AppendASCII(url); | 15 test_file = test_file.AppendASCII(url); |
16 | 16 |
17 NavigateToURL(net::FilePathToFileURL(test_file)); | 17 NavigateToURL(net::FilePathToFileURL(test_file)); |
18 EXPECT_EQ(std::wstring(page_title), GetActiveTabTitle()); | 18 EXPECT_EQ(std::wstring(page_title), GetActiveTabTitle()); |
19 } | 19 } |
20 }; | 20 }; |
21 | 21 |
22 TEST_F(IFrameTest, Crash) { | 22 TEST_F(IFrameTest, Crash) { |
23 NavigateAndVerifyTitle("iframe.html", L"iframe test"); | 23 NavigateAndVerifyTitle("iframe.html", L"iframe test"); |
24 } | 24 } |
25 | 25 |
26 #if defined(OS_CHROMEOS) | 26 // Flakily crashes on all oses: http://crbug.com/70192 |
27 // Flakily crashes on ChromeOS: http://crbug.com/70192 | 27 TEST_F(IFrameTest, DISABLED_InEmptyFrame) { |
28 #define MAYBE_InEmptyFrame DISABLED_InEmptyFrame | |
29 #else | |
30 #define MAYBE_InEmptyFrame InEmptyFrame | |
31 #endif | |
32 TEST_F(IFrameTest, MAYBE_InEmptyFrame) { | |
33 NavigateAndVerifyTitle("iframe_in_empty_frame.html", L"iframe test"); | 28 NavigateAndVerifyTitle("iframe_in_empty_frame.html", L"iframe test"); |
34 } | 29 } |
OLD | NEW |