OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 namespace { | 43 namespace { |
44 | 44 |
45 class RenderTableCellDeathTest : public testing::Test { | 45 class RenderTableCellDeathTest : public testing::Test { |
46 // It's unfortunate that we have to get the whole browser stack to test one
RenderObject | 46 // It's unfortunate that we have to get the whole browser stack to test one
RenderObject |
47 // but the code needs it. | 47 // but the code needs it. |
48 static Frame* frame() | 48 static Frame* frame() |
49 { | 49 { |
50 static WebView* webView; | 50 static WebView* webView; |
51 | 51 |
52 if (webView) | 52 if (webView) |
53 return static_cast<WebFrameImpl*>(webView->mainFrame())->frame(); | 53 return toWebFrameImpl(webView->mainFrame())->frame(); |
54 | 54 |
55 webView = FrameTestHelpers::createWebViewAndLoad("about:blank"); | 55 webView = FrameTestHelpers::createWebViewAndLoad("about:blank"); |
56 webView->setFocus(true); | 56 webView->setFocus(true); |
57 return static_cast<WebFrameImpl*>(webView->mainFrame())->frame(); | 57 return toWebFrameImpl(webView->mainFrame())->frame(); |
58 } | 58 } |
59 | 59 |
60 static Document* document() | 60 static Document* document() |
61 { | 61 { |
62 return frame()->document(); | 62 return frame()->document(); |
63 } | 63 } |
64 | 64 |
65 virtual void SetUp() | 65 virtual void SetUp() |
66 { | 66 { |
67 m_cell = RenderTableCell::createAnonymous(document()); | 67 m_cell = RenderTableCell::createAnonymous(document()); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 TEST_F(RenderTableCellDeathTest, CrashIfSettingUnsetColumnIndex) | 101 TEST_F(RenderTableCellDeathTest, CrashIfSettingUnsetColumnIndex) |
102 { | 102 { |
103 ASSERT_DEATH(m_cell->setCol(unsetColumnIndex), ""); | 103 ASSERT_DEATH(m_cell->setCol(unsetColumnIndex), ""); |
104 } | 104 } |
105 | 105 |
106 #endif | 106 #endif |
107 | 107 |
108 } | 108 } |
109 | 109 |
110 } // namespace WebCore | 110 } // namespace WebCore |
OLD | NEW |