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

Side by Side Diff: Source/web/tests/RenderTableCellTest.cpp

Issue 23671002: Refactoring: Add toWebFrameImpl() interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Corrected as per review commments. Created 7 years, 3 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
« no previous file with comments | « Source/web/tests/PopupMenuTest.cpp ('k') | Source/web/tests/RenderTableRowTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/web/tests/PopupMenuTest.cpp ('k') | Source/web/tests/RenderTableRowTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698