Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: Source/WebKit/chromium/tests/RenderTableRowTest.cpp

Issue 16896019: Replace RenderArena with PartitionAlloc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 15 matching lines...) Expand all
26 #include "config.h" 26 #include "config.h"
27 27
28 #include "core/rendering/RenderTableRow.h" 28 #include "core/rendering/RenderTableRow.h"
29 29
30 #include "FrameTestHelpers.h" 30 #include "FrameTestHelpers.h"
31 #include "WebFrame.h" 31 #include "WebFrame.h"
32 #include "WebFrameImpl.h" 32 #include "WebFrameImpl.h"
33 #include "WebView.h" 33 #include "WebView.h"
34 #include "core/dom/Document.h" 34 #include "core/dom/Document.h"
35 #include "core/page/Frame.h" 35 #include "core/page/Frame.h"
36 #include "core/rendering/RenderArena.h"
37 36
38 #include <gtest/gtest.h> 37 #include <gtest/gtest.h>
39 38
40 using namespace WebKit; 39 using namespace WebKit;
41 40
42 namespace WebCore { 41 namespace WebCore {
43 42
44 namespace { 43 namespace {
45 44
46 class RenderTableRowDeathTest : public testing::Test { 45 class RenderTableRowDeathTest : public testing::Test {
47 // 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
48 // but the code needs it. 47 // but the code needs it.
49 static Frame* frame() 48 static Frame* frame()
50 { 49 {
51 static WebView* webView; 50 static WebView* webView;
52 51
53 if (webView) 52 if (webView)
54 return static_cast<WebFrameImpl*>(webView->mainFrame())->frame(); 53 return static_cast<WebFrameImpl*>(webView->mainFrame())->frame();
55 54
56 webView = FrameTestHelpers::createWebViewAndLoad("about:blank"); 55 webView = FrameTestHelpers::createWebViewAndLoad("about:blank");
57 webView->setFocus(true); 56 webView->setFocus(true);
58 return static_cast<WebFrameImpl*>(webView->mainFrame())->frame(); 57 return static_cast<WebFrameImpl*>(webView->mainFrame())->frame();
59 } 58 }
60 59
61 static Document* document() 60 static Document* document()
62 { 61 {
63 return frame()->document(); 62 return frame()->document();
64 } 63 }
65 64
66 static RenderArena* arena()
67 {
68 return document()->renderArena();
69 }
70
71 virtual void SetUp() 65 virtual void SetUp()
72 { 66 {
73 m_row = RenderTableRow::createAnonymous(document()); 67 m_row = RenderTableRow::createAnonymous(document());
74 } 68 }
75 69
76 virtual void TearDown() 70 virtual void TearDown()
77 { 71 {
78 m_row->destroy(); 72 m_row->destroy();
79 } 73 }
80 74
(...skipping 26 matching lines...) Expand all
107 TEST_F(RenderTableRowDeathTest, CrashIfSettingUnsetRowIndex) 101 TEST_F(RenderTableRowDeathTest, CrashIfSettingUnsetRowIndex)
108 { 102 {
109 ASSERT_DEATH(m_row->setRowIndex(unsetRowIndex), ""); 103 ASSERT_DEATH(m_row->setRowIndex(unsetRowIndex), "");
110 } 104 }
111 105
112 #endif 106 #endif
113 107
114 } 108 }
115 109
116 } // namespace WebCore 110 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698