blob: fca703bd4b7554f500ff8eac91e33409457ccb62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/basictypes.h"
#include "base/file_path.h"
#include "build/build_config.h"
#include "chrome/test/ui/ui_test.h"
#include "net/base/net_util.h"
class IFrameTest : public UITest {
protected:
void NavigateAndVerifyTitle(const char* url, const wchar_t* page_title) {
FilePath test_file(test_data_directory_);
test_file = test_file.AppendASCII(url);
NavigateToURL(net::FilePathToFileURL(test_file));
EXPECT_EQ(std::wstring(page_title), GetActiveTabTitle());
}
};
TEST_F(IFrameTest, Crash) {
NavigateAndVerifyTitle("iframe.html", L"iframe test");
}
#if defined(OS_LINUX)
// Flakily crashes on linux: http://crbug.com/70192
#define MAYBE_InEmptyFrame DISABLED_InEmptyFrame
#else
#define MAYBE_InEmptyFrame InEmptyFrame
#endif
TEST_F(IFrameTest, MAYBE_InEmptyFrame) {
NavigateAndVerifyTitle("iframe_in_empty_frame.html", L"iframe test");
}
|